MANIFEST.MF with Maven

C

Ciccio Bello

I'd like to write into MANIFEST.MF the "Class-Path" when i create the
assembly and not in the creation of the package.

In my pom i have:
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/dist.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib</classpathPrefix>
<mainClass>
${groupId}.${artifactId}.AppMain
</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>

In this case maven write into manifest with "mvn package" and also
with "mvn assembly:assembly".
I'd like that MANIFEST.MF would be writed with "mvn assembly:assembly"
and i'd like don't write when i use "mvn package".
Do you think that this is possible?
I already tried to move the tag "configuration" from "maven-jar-
plugin" to "maven-assembly-plugin" but in this case the MANIFEST.MF is
never writed.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top