How to check out docx4j

Assumptions

These instructions assume you are running Eclipse

Prerequisites

Maven, and the Eclipse plugin

Instructions

1. Ensure you have subclipse installed.

2. File > New > Project ...

3. Choose the item SVN (Checkout Projects from SVN)

4. Create a new repository location

http://dev.plutext.org/svn/PROJECTNAME

for example, if PROJECTNAME was docx4j, your URL would be:

http://dev.plutext.org/svn/docx4j

Click Next.

5. Expand trunk, then click on PROJECTNAME and click next

6. Click finish to accept the default (ie check out using new project wizard)

7. Then select Java > Java Project; click Next

8. Choose a project name (eg docx4j) then click Next

9. Click Finish (we'll define the Java build settings in a later step)

After a couple of other dialog boxes, you should have the new project in your workspace.

Now, we need to configure the class path etc within Eclipse so that it can build.

1. Build Path > Configure Build Path > Java Build Path > Source tab

Click on src, then press the remove button

Then click "add folder" and navigate through to src/main/java and tick 'java'

2. Make sure you have Maven installed, and the Maven2 plugin for Eclipse installed (http://m2eclipse.codehaus.org/update/ - 0.0.12 is available from there, so its a better site to use than m2eclipse.codehaus.org)

If you have just installed Maven, before trying to do anything with the Maven2 plugin, make sure that Maven has created its .m2 directory. To do this, run Maven from a command prompt. For example, do "mvn install" from within the new project directory you just created in your workspace.

(is it necessary to do a Maven build first in any event, to cause the jars to be downloaded?)

3. (Optional) Right click on project > Maven 2 > Enable

4. Build Path > Configure Build Path > Java Build Path > Libraries > Add Library > Maven2 Managed Dependencies

The project should now be working in Eclipse without errors.

To use docx4 project in another Eclipse project, eg plutext-server, in the plutext-server project:

1. Build Path > Configure Build Path > Java Build Path > Projects > Add

Add docx4J

2. Properties > J2EE Module Dependencies

Add/tick docx4J - this ensures a docx4j.jar ends up in WTP tomcat's WEB-INF/lib for the plutext-server project.