Type: New Feature
Affects Version/s: 1.1.1
Fix Version/s: None
Number of attachments :
Was suggested to file a feature request and then possibly contribute instead of creating a new plugin.
The original request is described here: http://n2.nabble.com/resolve-jar-path-by-specifying-dependency-with-a-property-td2494162.html#a2494162
Feature basically is about referencing a dependency specified in the same pom where the maven exec plugin is used.
So, a dependency like:
could be referenced in an exec plugin's argument list in the same pom by something like:
It would be a handy addition, because this way you would not need to hardcode paths in the pom.
Not sure what the ideal notation could be:i am using curly brackets in my example.
In my simplistic first crack at it (attached), i am basically editing ExecMojo.execute() method. In ExecMojo i am adding a method (String findJarDep(String identifier)) that parses the identifier and then uses Artifact to return the path to the jar adding it to the commandArguments list.
Obviously i would like to hear from someone if this addition would make sense, suggestions etc, before i start making it better with correct exception handling, tests, etc (did that i few minutes as a first draft to get the idea).