It's possible to get the final name of the current project.
${project.build.finalName}
Is this also possible for dependencies? I'm searching for something like this:
${project.build.dependencies.0.finalName}
Based on this example pom dependency cutout.
<dependency>
<groupId>org.stack开发者_JS百科overflow</groupId>
<artifactId>stackoverflow-question</artifactId>
<version>1.6.0-SNAPSHOT</version>
</dependency>
The final name will likely be stackoverflow-question-1.6.0-SNAPSHOT, but as this may be variable due to locked snapshots or releases, I wan't to read it dynamically. Can you help me with that? Thank you very much.
Thank you all, I found it by myself hidden in this stackoverflow question.
<property name="log4j" value="${maven.dependency.log4j.log4j.jar.path}"/>
<echo message="${log4j}"/>
精彩评论