Java Spring项目pom打包添加版本号及不带配置文件

<!-- 往JAR包里加入svn版本号 --> <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <configuration>
        <excludes><!--不把配置文件打的jar包里面-->  
        <exclude>**/*.yml</exclude> <exclude>**/*.properties</exclude> </excludes> <archive> <manifestEntries> <Implementation-Title>xxx</Implementation-Title> <Implementation-Version>xxxxxx</Implementation-Version> <Build-Time>${maven.build.timestamp}</Build-Time> </manifestEntries> </archive> </configuration> <executions> <execution> <id>default-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin>

 

posted @ 2026-02-06 09:08  都是城市惹的祸  阅读(13)  评论(0)    收藏  举报