[英]Maven-war-plugin doubles manifest.mf
I have a wab - web application bundle (osgi) and I need my custom manifest. 我有一个wab - web应用程序包(osgi),我需要我的自定义清单。 In internet I found a solution - we create src/main/resources/META-INF/MANIFEST.MF and in pom:
在互联网上我找到了一个解决方案 - 我们创建了src / main / resources / META-INF / MANIFEST.MF并在pom中:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version><br>
<configuration>
<archive>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF
</manifestFile>
</archive>
</configuration>
</plugin>
But when I use like this in final war I HAVE TWO MANIFEST.MF 但是当我在最后的战争中使用这样的时候,我有两个明显的.MF
Solution of this problem I found: 解决这个问题我发现:
<packagingExcludes>/WEB-INF/classes/META-INF/</packagingExcludes>
But I want to know the reason - why?. 但我想知道原因 - 为什么? Is this a bug?
这是一个错误吗? OI don't understand something or I am doing something wrong?
我不明白或者我做错了什么?
/WEB-INF/classes/META-INF/MANIFEST.MF comes from src/main/resources/META-INF/MANIFEST.MF (copied by maven, like any other file placed in resources folder) /WEB-INF/classes/META-INF/MANIFEST.MF来自src / main / resources / META-INF / MANIFEST.MF(由maven复制,与放置在resources文件夹中的任何其他文件一样)
/META-INF/MANIFEST.MF is created by maven-war-plugin /META-INF/MANIFEST.MF由maven-war-plugin创建
I believe you only need the second one.. so you should delete the manifest.mf in resources.. 我相信你只需要第二个..所以你应该删除资源中的manifest.mf ..
hope it helps! 希望能帮助到你!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.