Basics
------

planconvert converts some project file formats into Calligra Plan file format.
It is written in Java and uses MPXJ for reading other file formats, see:
https://www.mpxj.org

This means that planconvert *should* be able to convert from all the file formats MPXJ supports, but:
* Planner has it own importer.
* Primavera suretrack and Sage 100 Contractor has unknown extensions so cannot be imported.

Testing is limeted since available files are limeted.
See test files in testdata.

Note that the MS .mpd files (database files) need a java-odbc bridge which I don't think is available on linux.

Dependencies
------------
To run anything you need a java runtime environment, version 8
e.g: openjdk-8-jre for ubuntu systems.

This is also needed to run filters.

To run tests, build new stuff etc you need ant.

Schema classes
--------------
Schema classes are generated from the plan-<version>.dtd file.
See property 'plan.dtd.dir' in build.xml.

Jobs execution
--------------
Everything is done using 'ant' and the different jobs are defined in build.xml.

Making changes
--------------
You need to update the build.xml file:

1) New mpxj version:
    a) In build.xml: Change property 'mpxj.version' to the new version.
    b) Execute: 'ant get-mpxj'
       This will download and unsip mpxj into 'mpxj.dir'.

2) New plan dtd version:
    a) In build.xml: Change property 'plan.version' to the new version
    b) If mpxj is not present, execute 'ant get-mpxj'
    c) Execute: 'ant xjc'
       This will create new schema classes.
    d) Update PlanWriter to deal with changes
    e) Execute 'ant jar'
    f) Commit when everything works ;)

Regenerate everything
---------------------
Execute: 'ant all'

Changes to planConvert
----------------------
Execute: 'ant jar'

Run tests
---------
Note: These are not auto tests, you must run them manually AND check results manually!

Execute: 'ant test'

The test is run on files found in: ${test.data.dir}

You can also test any single file using this command:
java -cp jar/planconvert.jar TestConvert <test file> <result file>

Mpxj has a lot of test files in: ${mpxj.dir}/junit/data
You can have all these files converted if you change ${test.data.dir} to point there.


The test writes result files to ${result.dir} and a log file to ${test.dir}

Running
-------
Execute: 'ant run'
