idea maven springboot war 包用时间生成版本号

<build>
        <finalName>dygl</finalName>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>timestamp-property</id>
                        <goals>
                            <goal>timestamp-property</goal>
                        </goals>
                        <configuration>
                            <name>build.time</name>
                            <pattern>yyyy.MM.dd.HH.mm.ss</pattern>
                            <locale>en_US</locale>
                            <timeZone>Asia/Shanghai</timeZone>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <version>${build.time}</version>
                        </manifestEntries>
                    </archive>
<!--                     <outputDirectory>${war.dir}</outputDirectory>-->
<!--                     <packagingExcludes>WEB-INF/lib/smartcampus-security*.jar</packagingExcludes>-->
                </configuration>
            </plugin>
        </plugins>
    </build>

 

posted on 2023-03-30 16:16  空明流光  阅读(178)  评论(0编辑  收藏  举报

导航