maven打包的jar包中的元数据中的快照版本依赖为带时间戳的
目录
在maven-jar-plugin的配置中添加useUniqueVersions为false,再打包的jar包的元数据的依赖就是snapshot版本了
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>*.yml</exclude>
<exclude>*.xml</exclude>
<exclude>*.properties</exclude>
<exclude>*.json</exclude>
<exclude>*.txt</exclude>
<exclude>db/</exclude>
<exclude>static/</exclude>
</excludes>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<useUniqueVersions>false</useUniqueVersions>
<mainClass>org.example.MainApplication</mainClass>
</manifest>
<manifestEntries>
<Class-Path>conf/</Class-Path>
</manifestEntries>
</archive>
</configuration>
</plugin>
---
本文来自博客园,作者:Bingmous,转载请注明原文链接:https://www.cnblogs.com/bingmous/p/17095691.html