Standard way - using maven-jar-plugin
- generates manifest file only during package phase and directly into jar file.
What I need is to generate manifest during compile phase and to be available in <target>/classes/META-INF
.
My goal is to be able to read this manifest file in project running in debug mode in IntelliJ Idea. (Idea resolves in-project jar dependencies from <target>/classes
instead of from <target>/*.jar
- for hot-swap purpose).
The only solution I know of so far is to actually create my own MANIFEST.MF in src/main/java/resources/META-INF
and let it be filtered+copied during resources phase. But I want to avoid this solution, I want the manifest to be generated standard way using <archive>
configuration in pom file.
maven-jar-plugin
to compile, unpack the jar and copy the MANIFEST... A more direct solution would be to create a custom plugin using Maven Archiver. – Interconnectmaven-jar-plugin
on github, if the project is there and the repo owner is active. Or make a custom plugin as @Interconnect suggests. – Declension