I am trying to retrieve the implementation title and version for a maven jar module. If I use Myclass.class.getPackage().getImplementationVersion()
on the built jar, it works, but the same does not work in a debugging environment where the jar is not built, but classes are available.
I am aware of using the Maven JAR plugin to generate the MANIFEST for a maven jar module. So one approach I am considering is to somehow create a copy of the MANIFEST in the generated sources output folder, which I include in my debug classpath. To achieve this:
- Is it possible to generate the MANIFEST file in a custom location? If so, what is the plugin and execution configuration necessary?
- If not, in which location is the file generated, so I may copy it my custom location using the maven-resources-plugin?