Passing your Maven classpath to Ant:
In your pom.xml, configure something like this:
<build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>build-config-files</id> <phase>compile</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <property name="runtime-classpath" refid="maven.runtime.classpath"/> <ant target="build" inheritRefs="true"/> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </build>
In your build.xml, have something like:
<path id="project.class.path"> <path path="${runtime-classpath}"/> </path>
The path that maven is using should now be assigned to "runtime-classpath".
This is very useful for calling a custom ant task, when the definition is in your maven classpath.
Labels
(None)
