我的 list 文件没有更新,我使用插件maven-war-plugin来编写,但是没有任何反应,如果我更改 list 文件的目录名称,我会收到错误未找到 list 文件
打包时,但是当我把它放在正确的位置时没有任何反应,文件的内容没有改变。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<addMavenDescriptor/>
<compress/>
<forced/>
<index/>
<manifest>
<addClasspath/>
<addDefaultImplementationEntries/>
<addDefaultSpecificationEntries/>
<addExtensions/>
<classpathLayoutType/>
<classpathMavenRepositoryLayout/>
<classpathPrefix/>
<customClasspathLayout/>
<mainClass/>
<packageName/>
</manifest>
<manifestEntries>
<key>value</key>
</manifestEntries>
<manifestFile>src/main/webapp/META-INF/test/MANIFEST.MF</manifestFile>
<pomPropertiesFile/>
</archive>
</configuration>
</plugin>
我的 list 文件的内容是:
Manifest-Version: 1.0
知道为什么它不起作用或者如何正确完成吗?
最佳答案
不要使用空标签。 您应该将 boolean 参数设置为 true:
<manifest>
<addClasspath>true</addClasspath>
</manifest>
请参阅official doc
关于java - 在manifest文件中怎么写呢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25245021/