zoukankan      html  css  js  c++  java
  • POM文件编译打包配置整理

    1、整个打包过程就是插件添加过程,添加build插件

    2、指定testng.xml路径的编译插件:执行mvn clean package

    <build>
            <finalName>test</finalName>
            <plugins>
                <!--编译打包配置-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.7.1</version>
                    <configuration>
                        <suiteXmlFiles>
                            <suiteXmlFile>
                                <!--配置testng.xml路径-->
                                ./src/main/resources/testng.xml
                            </suiteXmlFile>
                        </suiteXmlFiles>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    View Code

    3、springboot项目编译打包,包括对应pom依赖

    <!--springboot项目编译打包-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <!--指定应用程序入口-->
                        <mainClass>extentreport.TestMethodsDemo</mainClass>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <encoding>UTF-8</encoding>
                        <compilerArguments>
                            <extdirs>${project.basedir}</extdirs>
                        </compilerArguments>
                    </configuration>
                </plugin>
    View Code
  • 相关阅读:
    配置Keepalived双主热备
    配置 Keepalived
    Keepalived安装部署
    Keepalived配置Nginx自动重启
    Collectiont和Collections的区别
    HashMap和Hashtable的联系和区别
    Vector和ArrayList的联系和区别
    ArrayList和LinkedList 的联系和区别
    集合和数组的比较
    struts下载
  • 原文地址:https://www.cnblogs.com/wangkc/p/10853092.html
Copyright © 2011-2022 走看看