ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

pom 文件目录

2021-12-07 10:34:01  阅读:108  来源: 互联网

标签:文件目录 java -- maven pom apache org com


<project>       pom文件的顶级节点
<modelVersion>     object model版本,对Maven2和Maven3来说,只能是4.0.0 
<groupId>       项目创建组织的标识符,一般是域名的倒写
<artifactId>   定义了项目在所属组织的标识符下的唯一标识,一个组织下可以有多个项目
<version>        当前项目的版本,SNAPSHOT,表示是快照版本,在开发中
<packaging>      打包的方式,有jar、war、ear等
<name>        项目的名称
<url>          项目的地址
<properties>    属性配置,比如:<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<dependencies>     构建项目依赖的jar


<?xml version="1.0" encoding="UTF-8"?>
<project
        xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.weiKeAutomation.dubo</groupId>
    <artifactId>test</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>包名</name>
    <url>http://maven.apache.org</url>

    <properties>
        <!-- 文件拷贝时的编码 -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- 编译时的编码 -->
        <!--        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>-->
        <!--        <maven.compiler.source>11</maven.compiler.source>-->
        <!--        <maven.compiler.target>11</maven.compiler.target>-->
    </properties>

    <dependencies>
        <!-- Testng  PC-->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.9.10</version>
        </dependency>

        <!-- Junit  -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>

        <!-- Selenium -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.14.0</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>3.14.0</version>
        </dependency>

        <!-- Java-Client PC-->
        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <!--            <version>3.3.0</version>-->
            <version>7.3.0</version>
        </dependency>

        <!-- rest-assured -->
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>3.0.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.json/json -->
        <!--        <dependency>-->
        <!--            <groupId>org.json</groupId>-->
        <!--            <artifactId>json</artifactId>-->
        <!--            <version>2.0</version>-->
        <!--        </dependency>-->

        <!--jsonschema相关-->
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>json-schema-validator</artifactId>
            <version>2.8.0</version>
        </dependency>

        <!-- ExtentReport -->
        <dependency>
            <groupId>com.relevantcodes</groupId>
            <artifactId>extentreports</artifactId>
            <version>2.40.2</version>
        </dependency>
        <dependency>
            <groupId>com.aventstack</groupId>
            <artifactId>extentreports</artifactId>
            <version>3.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.23</version>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>3.0</version>
        </dependency>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongo-java-driver</artifactId>
            <version>3.3.0</version>
        </dependency>

        <!-- TestngReport -->
        <dependency>
            <groupId>org.uncommons</groupId>
            <artifactId>reportng</artifactId>
            <version>1.1.4</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.uncommons</groupId>-->
        <!--            <artifactId>reportng</artifactId>-->
        <!--            <version>1.1.4</version>-->
        <!--            <scope>test</scope>-->
        <!--            <exclusions>-->
        <!--                <exclusion>-->
        <!--                    <groupId>org.testng</groupId>-->
        <!--                    <artifactId>testng</artifactId>-->
        <!--                </exclusion>-->
        <!--            </exclusions>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>saxon</artifactId>
            <version>8.7</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
        </dependency>

        <!-- Excel  -->
        <dependency>
            <groupId>jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <version>2.6</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
        </dependency>

        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.54</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.6</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.6</version>
        </dependency>
    </dependencies>

    <build>
        <!--解决No goals have been specified for this build.-->
        <defaultGoal>compile</defaultGoal>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.java</include>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                </includes>
                <!-- 是否替换资源中的属性-->
                <filtering>false</filtering>
            </resource>

            <resource>
                <directory>src/test/java</directory>
                <includes>
                    <include>**/*.java</include>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                </includes>
                <!--                <excludes>  -->
                <!--                    <exclude>**/*.properties</exclude> -->
                <!--                    <exclude>com/test/aboutjar/*</exclude> -->
                <!--                </excludes> -->
                <!-- 是否替换资源中的属性-->
                <filtering>false</filtering>
            </resource>
        </resources>





        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
                <!--                <configuration>-->
                <!--                    <verbose>true</verbose>-->
                <!--                    <fork>true</fork>-->
                <!--                    &lt;!&ndash;你的jdk地址&ndash;&gt;-->
                <!--                    <executable>C:/Program Files/Java/jdk1.8.0_301/bin</executable>-->
                <!--                </configuration>-->
            </plugin>



            <!--jenkins 运行  输入mvn test就可以编译执行testng.xml文件了,不依赖什么环境配置等-->
            <!--maven-surefire-plugin的test目标会自动执行测试源码路径(默认为src/test/java/)下所有符合一组命名模式的测试类-->
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>WebWeiKeTestngReport.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
-->

            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>-->
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>TestCases.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>-->
        </plugins>
    </build>
</project>

标签:文件目录,java,--,maven,pom,apache,org,com
来源: https://blog.csdn.net/dubo_csdn/article/details/121762879

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有