Project Documentation

Maven Projects

Referencing the Maven Classpaths

A property is set for each dependency with the format "groupId:artifactId[:classifier]:type". For example, to show the path to a dependency with groupId "org.apache" and artifactId "common-util", the following could be used.

<echo message="Dependency JAR Path: ${org.apache:common-util:jar}"/>

Note that the old format "maven.dependency.groupId.artifactId[.classifier].type.path" has been deprecated and should no longer be used.

You can also use these classpath references:

maven.compile.classpath

maven.runtime.classpath

maven.test.classpath

maven.plugin.classpath

For example, to display Maven's classpaths using antrun, we can do this