wangzilun
2022-02-21 84fdf011425fa80bc0d564f9ae9f1ca6e061fd51
测试
2 files modified
1 files added
21 ■■■■ changed files
Jenkinsfile 2 ●●● patch | view | raw | blame | history
pom.xml 9 ●●●●● patch | view | raw | blame | history
src/main/webapp/WEB-INF/web.xml 10 ●●●●● patch | view | raw | blame | history
Jenkinsfile
@@ -86,7 +86,7 @@
                    ####maven编译部署#####
                    mvn clean package -U
                    ##处理结果包
                    cd *-webapp/target
                    cd */target
                    old_version_all=\$(find . -iname "\${projectName}.java"| xargs sed -nr 's/^[^0-9]*\\"(([0-9]+\\.)*[0-9]+.*-[0-9]+)\\".*;/\\1/p\')
                    dir_name=\${projectName}"-"\$old_version_all
                    echo "dir_name \$dir_name"
pom.xml
@@ -37,15 +37,6 @@
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <version>2.2</version>
                <configuration>
                    <!--如果想在没有web.xml文件的情况下构建WAR,请设置为false。-->
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
src/main/webapp/WEB-INF/web.xml
New file
@@ -0,0 +1,10 @@
<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
          http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0">
</web-app>