You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Peterson, Bill (Patriot Technologies)" <Bi...@va.gov> on 2007/02/20 19:17:55 UTC

Need help with Compile Order

I am using Java 1.4.x, Maven 1.x, and Eclipse 3.0.1.  The specific
problem involves java code that references the Node Class which is
located in both the JDK 1.4.x and xmlpack.jar.  Both locations use the
same path (org.w3c.dom).  However, the java code calls a method that
exist in xmlpack.jar but does not exist in JDK 1.4.x.
 
The problem.  If I select Project/Clean from the dropdown menu in
Eclipse, Eclipse can successfully clean and automatically build the
necessary classes.  I believe this is because the classpath file
contains the correct order classes for the compile (xmlpack.jar is
before JDK 1.4.x).  Now I added Maven nature to the project.  I added
the necessary dependencies to the project.xml file, including
xmlpack.jar at the top of the dependencies.  JDK 1.4.x is not one of the
dependencies, but I never had to add it to any of my other projects
before.  I assume Maven/Ant handles this automatically.  If I run Maven
to build my project, I get an error stating the Node class method in the
java code does not exist in the Node Class.  This is because Maven, when
compiling, is only seeing the JDK 1.4.x version of the Node Class.  The
compiling is not using the xmlpack.jar Node Class.
 
How do I script/configure Maven to use the xmlpack.jar Node class
instead of the JDK 1.4.x Node class for compilation?  It appears
Maven/Ant refers to JDK 1.4.x before any of the dependencies.  I need to
change this.  Thank you.
 
Bill