Adding custom string in java manifest at the end of 'Classpath' via maven pom.xml

326 views Asked by At

I´m trying to update a manifest file adding a pair of new lines inside a classpath.

I have something like this in my pom:

<plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <archive>
                                <manifest>
                                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                    <addClasspath>true</addClasspath>
                                </manifest>
                                <manifestEntries>
                                    <Class-Path>./ttttttttttttttt/</Class-Path>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </plugin>

The result of this change is the next one:

Manifest-Version: 1.0
Implementation-Title: server
Implementation-Version: 0.1.0-SNAPSHOT
Archiver-Version: Plexus Archiver
Built-By: vcima
Implementation-Vendor-Id: es.solution.ok
Class-Path: **../ttttttttttttttt/** configuration-0.1.0-SNAPSHOT.jar 
 tip-0.1.0-SNAPSHOT.jar quartz-2.2.1.jar c3p0-0.9.1.1.jar quartz-
 jobs-2.2.1.jar 
company: My company
Created-By: Apache Maven 3.3.3
Build-Jdk: 1.8.0_111
Main-Class: es.example.srv.ServerRunner

That its right but i need that the new line was added at the end of the classpath for several reasons: order of the libraries is important in this case...

I´m looking the workaround for something like this:

Manifest-Version: 1.0
    Implementation-Title: server
    Implementation-Version: 0.1.0-SNAPSHOT
    Archiver-Version: Plexus Archiver
    Built-By: vcima
    Implementation-Vendor-Id: es.solution.ok
    Class-Path: configuration-0.1.0-SNAPSHOT.jar 
     tip-0.1.0-SNAPSHOT.jar quartz-2.2.1.jar c3p0-0.9.1.1.jar quartz-
     jobs-2.2.1.jar **../ttttttttttttttt/** 
    company: My company
    Created-By: Apache Maven 3.3.3
    Build-Jdk: 1.8.0_111
    Main-Class: es.example.srv.ServerRunner

Could anyone help me?.

Best regards!

0

There are 0 answers