I use Ant to create a custom jar library, which I then use as a dependency in Maven.
<dependency>
<groupId> test-lib </groupId>
<artifactId> test-lib </artifactId>
<version> 1.0.0system </scope>
<systemPath> $ {basedir} /src/main/webapp/WEB-INF/lib/test-lib-1.0.0.jar </systemPath>
</dependency>
So basically what I am doing now:
1) run Ant to create a custom library (test-lib-1.0.0.jar)
2) run: mvn compile to compile my project using a special library among others.
Do I have the opportunity to do all this (batch jar and compiling project) from Maven? I found the maven run plugin and here are my settings:
<plugin>
<artifactId> maven-antrun-plugin </artifactId>
<version> 1.4
<executions>
<execution>
<phase> ????? what to put here ????? / phase>
<configuration>
<tasks>
<ant antfile = "$ {basedir} /build.xml">
<target name = "prepare-test-lib" />
</ant>
</tasks>
</configuration>
<goals>
<goal> run </goal>
</goals>
</execution>
</executions>
</plugin>
But when you start: mvn compilehe complains of the lack of artifact: test-lib-1.0.0.jar. I used compilation, generate-resouces, ... in the tag <phase/>, but nothing works.
- ?