How to add Classpath attribute to manifest.mf when using spring plugin to load maven to build jar

I am using spring boot maven plugin. I need to add the class-path attribute to the manifest.mf file generated. This entry in the path class should contain all the jar files found in the lib folder of the fat file created by spring boot. How is this possible?

+4
source share
1 answer

there is a simple solution

Just what you need is to add

Maven plugin of war

or

Maven-jar-plugin

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <archive>
            <manifest>
                <addClasspath>true</addClasspath>
            </manifest>
            <manifestEntries>
                <mode>development</mode>
                <url>http://sample.com</url>
                <key>value</key>
            </manifestEntries>
        </archive>
    </configuration>
</plugin>

And add extra values ​​to manifestEntries.

Relationship Alexandar

+2
source

All Articles