code-gijoe
code-gijoe

Reputation: 7234

How to keep manifest and exclude POM from JAR?

Found that I can exclude pom.xml from final jar using:

<archive>
   <addMavenDescriptor>true</addMavenDescriptor>
</archive>

But this exclude the xml and the pom.properties is there a way to keep only pom.properties?

thx

Upvotes: 2

Views: 765

Answers (1)

Arpit
Arpit

Reputation: 6260

This cannot be done using the conventional methods in maven.

Although, when you execute the maven goal (install, package...), the pom.properties is created at the following location:

target\maven-archiver\pom.properties

You can explicitly include this resource in your archive by modifying the jar/war plugin configuration.

Upvotes: 1

Related Questions