It looks like it is possible to get the path/to/a/dependency.jar
as an expandable variable within a Maven pom.xml
: see Can I use the path to a Maven dependency as a property? You can expand, e.g., an expression into a string like /home/pascal/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
.
What I want instead of the full path to the dependency JAR within my local Maven repository is just the bare name of the JAR, for example junit-3.8.1.jar
.
So for example, within my pom.xml
, I would like to be able to use a value like ${maven.dependency.junit.junit.jar.name}
to expand to junit-3.8.1.jar
.
Can I do this, and how?