I'm writing a Maven plugin that takes as a parameter the path to the .jar file built by the project. At the moment I'm using the following definition for my configuration variable within my Mojo class...
/**
* Location of the built artifact
* @parameter expression="${project.build.finalName}
* @required
*/
private File path;
The ${project.build.finalName} property returns the path to the built artifact but does not contain the file extension. So if my build produced a file called TheBuiltJar-1.0.jar my path variable's path points to TheBuiltJar-1.0 - which isn't a valid file path.
Is there another maven property that contains the full path and extension? Or even another property that contains just the extension?
Is there another maven property that contains the full path and extension? Or even another property that contains just the extension?
Aren't you looking for:
${project.build.directory}/${project.build.finalName}.${project.packaging}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With