Welcome to MPXJ! This library provides a set of facilities to allow project information to be manipulated in Java. MPXJ supports three file formats, Microsoft Project Exchange (MPX), Microsoft Project (MPP,MPT), and Microsoft Project Data Interchange (MSPDI).
The library is currently based around a set of data structures modelled on the data described by the MPX file format. All manipulation of project data takes place using these data structures, which can be read from or written to the various supported file formats. The following notes explain what facilities MPXJ offers for each file format.
MPX: The MPX file format can be read by all versions of Microsoft Project, and written by all versions up to Microsoft Project 98. MPXJ allows MPX files to be created, read and written. See http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q270139 for a definition of the file format.
MPP: The MPP file format is Microsoft's proprietary way of storing project data. MPXJ supports read only access to MPP files produced by Microsoft Project 98, Microsoft Project 2000, Microsoft Project 2002, and Microsoft Project 2003. MPP template files, with the suffix MPT are also supported.
MSPDI: The MSPDI file format is Microsoft's XML file format for storing project data. Microsoft Project 2002 and Microsoft Project 2003 can read and write MSPDI files. MPXJ allows MSPDI files to be created, read, and written. Documentation on the Project 2003 MSPDI file format can be downloaded from the MSDN web site as part of the Office 2003 XML Reference Schemas package. The equivalent documentation for Project 2007 can also be downloaded from the MSDN web site as part of the Microsoft Office Project 2007 SDK.
The latest release of MPXJ can be downloaded by following this link. The library is fairly simple to use, and to illustrate this, a small number of sample files have been included in the utility source package of the distribution.
The MPP functionality depends on the POI library produced by the Apache Jakarta project. In order to use the MPP functionality the POI JAR file must be present on your classpath. A copy of this library can be found in the lib directory of the distribution.
The MSPDI functionality depends on the Sun JAXB implementation as distributed in the Java Web Services Developer Pack version 1.4. In order to use the MSPDI functionality the JAXB JAR files must be present on your classpath. Copies of the relevant libraries can be found in the lib directory of the distribution. The original distribution from which these redistributable files have been taken can be found at: http://java.sun.com/webservices/downloads/webservicespack.html
Should you wish to run the JUnit tests provided with MPXJ, you need to be aware that the JUnit classloader doesn't get on well with JAXB, so it is recommended that you execute the JUnit test runner with the -noloading command line option, or otherwise disable class reloading.
If you want to build MPXJ yourself using the supplied source and ant build.xml file, there are a few points to note:
The XML schema file from which the JAXB code has been generated is supplied by Microsoft as part of the Microsoft Project 2002 and Microsoft Project 2003 distributions. The file name is mspdi.xsd. This file is not distributed as part of MPXJ, but it can be found on the Microsoft Project 2002 and 2003 CDs, and can also be downloaded from the MSDN web site (look for the link to the Office 2003 Reference Schemas).
If you are able to obtain a copy of this file, you can rebuild the JAXB source using the xjc target found in the ant build.xml file. Note that the xjc target is platform specific, you will need to change the reference to the xjc tool to be xjc.bat or xjc.sh depending on your operating system. You will also need to set the properties indicated in build.xml to tell it where to find xjc and the xsd file.
We're keen to hear from you about how you are using MPXJ, please drop me a note. If you use MPXJ as a part of an application that you redistribute, commercially or otherwise, drop us a line and we'll include a link to your website on the MPXJ page
Please let us know what features you'd like to see added to MPXJ. In addition, the MPP functionality is not complete as we have had to reverse engineer the data from the MPP file format, so we need to know if you have MPP files that can't be read, or don't contain the data you expect. The more of this feedback you can give us, the better we can make MPXJ!
Are you developing a commercial product that uses MPXJ? Do you want to integrate MPXJ into your application? Is MPXJ missing a feature critical to your business? If the answer to any of these questions is yes, we can help you! We offer commercial development services and consultancy for users of MPXJ at competitive rates. Please get in touch by mailing me to see how we can work together.
MPXJ is distributed under the terms of the GNU LGPL, a copy of which can be found in the legal directory of the distribution.
As mentioned above, the MPP functionality depends on the use of the POI library. The license for this library can be found in the legal directory of the distribution. To comply with the Apache license, we must state that "this product includes software developed by the Apache Software Foundation (http://www.apache.org/)."
A copy of the JUnit library is provided for you convenience to allow you to run the regression tests provided with MPXJ. The license for JUnit can be found in the legal directory of the distribution.