我正在尝试更新清单文件,在类路径中添加一对新行。
我的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>
这一变化的结果是下一个:
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
这是正确的但我需要在类路径的末尾添加新行有几个原因:在这种情况下库的顺序很重要......
我正在寻找这样的解决方法:
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
有人可以帮助我吗?。
祝你好运!