问题:

用Maven打包时,发现自行生成了MANIFEST.MF,导致框架读取不到我在MANIFEST.MF定义的版本号。

 

 

Manifest-Version: 3.0
Class-Path: 
Implementation-Title: taurus.mvc
Implementation-Version: 3.0.1

 

解决:

通过在pom.xml中添加插件,指定编绎打包时使用自已的MANIFEST.MF文件:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>bin/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>

 

posted on 2022-09-06 20:06  路过秋天  阅读(483)  评论(0编辑  收藏  举报
路过秋天