提问人:vcima 提问时间:12/18/2016 最后编辑:vcima 更新时间:12/18/2016 访问量:314
通过 maven pom 在“类路径”末尾的 java 清单中添加自定义字符串.xml
Adding custom string in java manifest at the end of 'Classpath' via maven pom.xml
问:
我正在尝试更新清单文件,在类路径中添加一对新行。
我的绒球里有这样的东西:
<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
谁能帮我?
此致敬意!
答: 暂无答案
评论
<dependencies>
maven-jar-plugin
<customClasspathLayout>
<classpathLayoutType>custom</classpathLayoutType>