I've found that more is required (see maven.xml in old reply below)... it's a little cumbersome, but works like a charm once set up.
- Brill Pappin
Dion Gillard wrote:
Why not just use jar overrides in the project.properties and point all the overrides at ${basedir}/lib?
[...]
Example:
The following example ensures that the javamail api which has no repository can be found by the project. Unfortunately not all plugins respect the jar override properties so the
goal has to be included to copy the jar into the proper repository location. Note that this is a lot of extra work to add your libs, bit I find its worth the effort to have a clean dependency list and a "compile
anywhere" source tree. FYI: I've used a couple of things that might not be obvious to someone new to Maven, such as the preGoal which in this case will execute before
the java:compile goal does. You can specify a preGoal for any goal.
in project.xml -------------------------------- <dependency> <groupId>java</groupId> <artifactId>javamail</artifactId> <version>1.3.1</version> <type>jar</type> <properties> <war.bundle>true</war.bundle> </properties> </dependency>
in project.properties --------------------------------* maven.jar.override=on maven.jar.javamail=${basedir}/src/libs/javamail-1.3.1.jar * in maven.xml -------------------------------- <preGoal name="java:compile"> <attainGoal name="copy-private-jars" /> </preGoal>
<goal name="copy-private-jars"> <mkdir dir="${maven.repo.local}/java/jars" /> <copy file="${maven.src.dir}/libs/javamail-1.3.1.jar" toDir="${maven.repo.local}/java/jars"/> </goal>
- Brill Pappin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
