• maven之pom文件详解


    一、maven官网

    maven官网
    maven官网pom文件详解链接

    二、maven之pom

    1、maven项目的目录结构

    pom文件定于了一个maven项目的maven配置,一般pom文件的放在项目或者模块的根目录下。
    maven的遵循约定大于配置,约定了如下的目录结构:

    目录目的
    ${basedir}存放pom.xml和所有的子目录
    ${basedir}/src/main/java项目的java源代码
    ${basedir}/src/main/resources项目的资源,比如说property文件,springmvc.xml
    ${basedir}/src/test/java项目的测试类,比如说Junit代码
    ${basedir}/src/test/resources测试用的资源
    ${basedir}/src/main/scripts项目脚本源码的目录
    ${basedir}/src/main/webapp/WEB-INFweb应用文件目录,web项目的信息,比如存放web.xml、本地图片、jsp视图页面
    ${basedir}/target/classes编译输出的目录
    ${basedir}/target/site生成文档的目录,可以通过index.html查看项目的文档
    ${basedir}/target/test-classes测试编译输出目录
    Test.javaMaven只会自动运行符合该命名规则的测试类
    ~/.m2/repository或者时Maven的安装目录的conf子目录下面Maven默认的本地仓库目录位置

    2、根元素和必要配置

    <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.0modelVersion>
        
        
        <groupId>com.companyname.project-groupgroupId>
     
        
        <artifactId>projectartifactId>
     
        
        <version>1.0version>
     
        
        <packaging>jarpackaging>
    project>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20

    project是pom文件的根元素,project下有modelVersion、groupId、artifactId、version、packaging等重要的元素。其中,groupId、artifactId、version三个元素用来定义一个项目的坐标,也就是说,一个maven仓库中,完全相同的一组groupId、artifactId、version,只能有一个项目。

    • project:整个pom配置文件的根元素,所有的配置都是写在project元素里面的;
    • modelVersion:指定了当前POM模型的版本,对于Maven2及Maven 3来说,它只能是4.0.0;
    • groupId:这是项目组的标识。它在一个组织或者项目中通常是唯一的。
    • artifactId:这是项目的标识,通常是工程的名称。它在一个项目组(group)下是唯一的。
    • version:这是项目的版本号,用来区分同一个artifact的不同版本。
    • packaging:这是项目产生的构件类型,即项目通过maven打包的输出文件的后缀名,包括jar、war、ear、pom等。

    3、父项目和parent元素

        
        
        <parent>
     
            
            <artifactId>com.companyname.project-groupartifactId>
            
            <groupId>base-projectgroupId>
            
            <version>1.0.1-RELEASEversion>
     
            
            
            <relativePath>../pom.xmlrelativePath>
        parent>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15

    所有的pom都继承自一个父pom(Super POM)。父pom包含了一些可以被继承的默认设置,如果项目的pom中没有设置这些元素,就会使用父pom中设置。例如,Super POM中配置了默认仓库http://repo1.maven.org/maven2,这样哪怕项目的pom中没有配置仓库,也可以去这个默认仓库中去下载依赖。实际上,maven pom文件约定大于配置的原则,就是通过在Super POM中预定义了一些配置信息来实现的。

    Maven使用effective pom(Super pom加上工程自己的配置)来执行相关的目标,它帮助开发者在pom.xml中做尽可能少的配置。当然,这些配置也可以被重写。
    
    parent元素可以指定父pom。用户可以通过增加parent元素来自定义一个父pom,从而继承该pom的配置。parent元素中包含一些子元素,用来定位父项目和父项目的pom文件位置。
    
    • 1
    • 2
    • 3

    parent:用于指定父项目;
    groupId:parent的子元素,父项目的groupId,用于定位父项目;
    artifactId:parent的子元素,父项目的artifactId,用于定位父项目;
    version:parent的子元素,父项目的version,用于定位父项目;
    relativePath:parent的子元素,用于定位父项目pom文件的位置

    4、项目构建需要的信息

        
        <build>
            
            
            <sourceDirectory />
            
            <testSourceDirectory />
            
            <outputDirectory />
            
            <testOutputDirectory />        
            
            <scriptSourceDirectory />
     
            
            
            <resources>
                
                <resource>
                    
                    
                    <targetPath />
                    
                    <filtering />
                    
                    <directory />
                    
                    <includes />
                    
                    <excludes />
                resource>
            resources>
            
            <testResources>
                
                <testResource>
                    <targetPath />
                    <filtering />
                    <directory />
                    <includes />
                    <excludes />
                testResource>
            testResources>
     
            
            
            
            <pluginManagement>
                
                <plugins>
                    
                    <plugin>
                        
                        <groupId />
                        
                        <artifactId />
                        
                        <version />
                        
                        
                        <extensions />
                        
                        <executions>
                            
                            <execution>
                                
                                <id />
                                
                                <phase />
                                
                                <goals />
                                
                                <inherited />
                                
                                <configuration />
                            execution>
                        executions>
                        
                        <dependencies>
                            
                            <dependency>
                                ......
                            dependency>
                        dependencies>
                        
                        <inherited />
                        
                        <configuration />
                    plugin>
                plugins>
            pluginManagement>
            
            <plugins>
                
                <plugin>
                    <groupId />
                    <artifactId />
                    <version />
                    <extensions />
                    <executions>
                        <execution>
                            <id />
                            <phase />
                            <goals />
                            <inherited />
                            <configuration />
                        execution>
                    executions>
                    <dependencies>
                        
                        <dependency>
                            ......
                        dependency>
                    dependencies>
                    <goals />
                    <inherited />
                    <configuration />
                plugin>
            plugins>
     
            
            
            <extensions>
                
                <extension>
                    
                    <groupId />
                    <artifactId />
                    <version />
                extension>
            extensions>
     
            
            
            <defaultGoal />
            
            <directory />
            
            <finalName />
            
            <filters />
        build>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142

    build标签定义了构建项目需要的信息,这部分信息对于定制化项目构建是非常重要的。这里会根据build的子元素的特点,简单地分类讲解。

    4.1、路径管理

           
            
            <sourceDirectory />
            
            <testSourceDirectory />
            
            <outputDirectory />
            
            <testOutputDirectory />        
            
            <scriptSourceDirectory />
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

    路径管理定义了各种源码和编译结果的输出路径。如果遵循maven默认的路径约定,这里的几个元素是不需要配置的。这些元素包括:

    sourceDirectory:项目源码目录,定义的是相对于pom文件的相对路径;
    testSourceDirectory:项目单元测试源码目录,定义的也是是相对于pom文件的相对路径;
    outputDirectory:被编译过的应用程序class文件存放的目录,也是是相对于pom文件的相对路径;
    testOutoutDIrectory:被编译过的测试class文件存放的目录,也是是相对于pom文件的相对路径;
    scriptSourceDirectory:项目脚本源码目录,也是是相对于pom文件的相对路径。由于脚本是解释性的语言,所以该目录下的内容,会直接被拷贝到输出目录,而不需要编译。

    4.2、资源管理

            
            
            <resources>
                
                <resource>
                    
                    
                    <targetPath />
                    
                    <filtering />
                    
                    <directory />
                    
                    <includes />
                    
                    <excludes />
                resource>
            resources>
            
            <testResources>
                
                <testResource>
                    <targetPath />
                    <filtering />
                    <directory />
                    <includes />
                    <excludes />
                testResource>
            testResources>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29

    这里的元素主要是对应用程序resource资源和单元测试部分resource资源的管理,分别通过resource标签和testResource标签管理两种资源。两个标签元素可选的子元素都是一样的。子元素包括:

    • targetPath:描述了资源的目标输出路径,该路径是相对于target/classes的路径;
    • filtering:对文件中的参数值进行过滤,需要被过滤的文件在filter中指定;
    • directory:描述打包前的资源的存放路径,这个路径是相对于pom文件所在目录的相对路径;
    • includes:包含的模式列表,例如**/*.xml。只有符合条件的资源文件才会在打包的时候被放入到输出路径中;
    • excludes:排除的模式列表,例如**/*.xml,符合的资源文件不会在打包的时候会被过滤掉。

    4.3、插件管理

    插件管理相关的元素有两个,包括pluginManagement和plugins。pluginManagement中有子元素plugins,它和project下的直接子元素plugins的区别是,pluginManagement主要是用来声明子项目可以引用的默认插件信息,这些插件如果只写在pluginManagement中是不会被引入的。project下的直接子元素plugins中定义的才是这个项目中真正需要被引入的插件。

            
            
            
            <pluginManagement>
                
                <plugins>
                    
                    <plugin>
                        
                        <groupId />
                        <artifactId />
                        <version />
                        
                        
                        <extensions />
                        
                        <executions>
                            
                            <execution>
                                
                                <id />
                                
                                <phase />
                                
                                <goals />
                                
                                <inherited />
                                
                                <configuration />
                            execution>
                        executions>
                        
                        <dependencies>
                                ......
                        dependencies>
                        
                        <inherited />
                        
                        <configuration />
                    plugin>
                plugins>
            pluginManagement>
            
            <plugins>
                ......
            plugins>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46

    4.4、构建扩展

    extensions是在此构建中使用的项目的列表,它们将被包含在运行构建的classpath中。这些项目可以启用对构建过程的扩展,并使活动的插件能够对构建生命周期进行更改。简而言之,扩展是在构建期间激活的artifacts。扩展不需要实际执行任何操作,也不包含 Mojo。因此,扩展对于指定普通插件接口的多个实现中的一个是非常好的。

            
            
            <extensions>
                
                <extension>
                    
                    <groupId />
                    <artifactId />
                    <version />
                extension>
            extensions>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

    4.5、其他配置

    build中还有一些配置,如下:

            
            
            <defaultGoal />
            
            <directory />
            
            <finalName />
            
            <filters />
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    5、项目依赖相关信息

    pom文件中通过dependencyManagement来声明依赖,通过dependencies元素来管理依赖。dependencyManagement下的子元素只有一个直接的子元素dependencice,其配置和dependencies子元素是完全一致的;而dependencies下只有一类直接的子元素:dependency。一个dependency子元素表示一个依赖项目。

        
        <dependencies>
            <dependency>
                
                
                <groupId>org.apache.mavengroupId>
                <artifactId>maven-artifactartifactId>
                <version>3.8.1version>
     
                
                
                
                
                <type>jartype>
                
                
                <classifier>classifier>
     
                
                
                <exclusions>
                    <exclusion>
                        <artifactId>spring-coreartifactId>
                        <groupId>org.springframeworkgroupId>
                    exclusion>
                exclusions>
                
                <optional>trueoptional>
                
                
                
                <scope>testscope>
                
                
                <systemPath>systemPath>
            dependency>
        dependencies>
     
        
        
        <dependencyManagement>
            <dependencies>
                
                <dependency>
                    ......
                dependency>
            dependencies>
        dependencyManagement>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52

    这里也是根据元素的作用,简单的对dependency的子元素做了一下分类。下面按分类来看一下dependency的子元素:

    5.1、依赖坐标

    依然是通过groupId + artifactId + version来在仓库中定位一个项目:
    
    • 1

    groupId:parent的子元素,父项目的groupId,用于定位父项目;
    artifactId:parent的子元素,父项目的artifactId,用于定位父项目;
    version:parent的子元素,父项目的version,用于定位父项目;

    5.2、依赖类型

    这个分类主要包括两个元素,分别是依赖类型和依赖的分类器。同一个项目,即使打包成同一种类型,也可以有多个文件同时存在,因为它们的分类器可能是不同的。
    
    • 1

    type:依赖类型,默认是jar。通常表示依赖文件的扩展名,但也有例外。一个类型可以被映射成另外一个扩展名或分类器。类型经常和使用的打包方式对应,尽管这也有例外,一些类型的例子:jar,war,ejb-client和test-jar。如果设置extensions为true,就可以在plugin里定义新的类型。
    classifier:依赖的分类器。分类器可以区分属于同一个POM,但不同构建方式的构件。分类器名被附加到文件名的版本号后面,如果想将项目构建成两个单独的JAR,分别使用Java 4和6编译器,就可以使用分类器来生成两个单独的JAR构件

    5.3、依赖传递

    依赖传递相关的子元素主要有两个,用于依赖排除的exclusions和设置依赖是否可选的optional。
    
    • 1

    exclusions:排除该项目中的一些依赖,即本项目A依赖该dependency指示的项目B,但是不依赖项目B中依赖的这些依赖;
    optional:可选依赖,用于阻断依赖的传递性,即本项目不会依赖父项目中optional设置为true的依赖。

    5.4、依赖范围

    还有一些其他元素:

    • scope:依赖范围。在项目发布过程中,帮助决定哪些构件被包括进来
      - compile:默认范围,用于编译; - provided:类似于编译,但支持jdk或者容器提供,类似于classpath
      - runtime: 在执行时需要使用; - systemPath: 仅用于范围为system,提供相应的路径
      - test: 用于test任务时使用; - system: 需要外在提供相应的元素,通过systemPath来取得
      - optional: 当项目自身被依赖时,标注依赖是否传递。用于连续依赖时使用

    • systemPath:该元素为依赖规定了文件系统上的绝对路径。仅在scope设置成system时才会使用。不推荐使用这个元素。不推荐使用绝对路径,如果必须要用,推荐使用属性匹配绝对路径,例如${java.home}

    6、生成文档相关的元素

        
        <name>project-mavenname>
     
        
        <url>http://123.a.b/nsnxsurl>
     
        
        
        <description>Description of this maven projectdescription>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    备注:maven可以通过mvn site命令生成项目的相关文档。

    和生成文档相关的元素,包括name,url,和description。

    • name:项目名称,maven生成文档会使用项目名;
    • url:项目主页的地址,maven生成文档的时候使用。
    • description:项目描述。如果可以使用HTML格式进行描述的时候,不推荐使用纯文本的描述。

    7、远程仓库列表

    远程仓库列表的配置,包括依赖和扩展的远程仓库配置,以及插件的远程仓库配置。在本地仓库找不到的情况下,maven下载依赖、扩展和插件就是从这里配置的远程仓库中进行下载。

    需要注意的是release和snapshot两者的区别。release是稳定版本,一经发布不再修改,想发布修改后的项目,只能升级项目版本再进行发布;snapshot是不稳定的,一个snapshot的版本可以不断改变。项目在开发期间一般会使用snapshot,更方便进行频繁的代码更新;一旦发布到外部,或者开发基本完成,代码迭代不再频繁,则推荐使用release。

        
        <repositories>
            
            <repository>
                
                <releases>
                    
                    <enabled />
                    
                    
                    <updatePolicy />
                    
                    <checksumPolicy />
                releases>
                
                
                <snapshots>
                    <enabled />
                    <updatePolicy />
                    <checksumPolicy />
                snapshots>
     
                
                <id>nanxs-repository-proxyid>
                
                <name>nanxs-repository-proxyname>
                
                <url>http://192.168.1.169:9999/repository/url>
                
                <layout>defaultlayout>
            repository>
        repositories>
        
        
        <pluginRepositories>
            
            <pluginRepository>
                ......
            pluginRepository>
        pluginRepositories>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40

    8、项目分发信息相关元素

        
        <distributionManagement>
            
            <repository>
                
                <uniqueVersion />
                
                <id>nanxs-maven2id>
                <name>nanxsmaven2name>
                <url>file://${basedir}/target/deployurl>
                <layout />
            repository>
            
            <snapshotRepository>
                <uniqueVersion />
                <id>nanxs-maven2id>
                <name>Nanxs-maven2 Snapshot Repositoryname>
                <url>scp://svn.baidu.com/nanxs:/usr/local/maven-snapshoturl>
                <layout />
            snapshotRepository>
            
            <site>
                
                <id>nanxs-siteid>
                
                <name>business api websitename>
                
                <url>scp://svn.baidu.com/nanxs:/var/www/localhost/nanxs-weburl>
            site>
            
            
            <downloadUrl />
            
            <relocation>
                
                <groupId />
                
                <artifactId />
                
                <version />
                
                <message />
            relocation>
            
            
            <status />
        distributionManagement>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49

    项目分发信息的相关配置,在distributionManagement中设置。设置的内容包括:

    • repository和snapshotRepository:项目产生的构建/快照构建部署的远程仓库。如果不配置snapshotRepository,快照也会部署到repository中;
    • site:部署项目的网站需要的信息;
    • downloadUrl:项目下载页面的URL,这是为不在仓库中的构建提供的;
    • relocation:如果构件有了新的group ID和artifact ID(移到了新的位置),这里列出构件的新的信息;
    • status:给出该构件在远程仓库的状态,本地项目中不能设置该元素,这是工具自动更新的。

    9、报表规范

    报表规范描述的是使用mvn site命令时使用的一些配置。

        
        
        <reporting>
            
            <excludeDefaults />
            
            <outputDirectory />
            
            <plugins>
                
                <plugin>
                    
                    <groupId />
                    <artifactId />
                    <version />
     
                    
                    <inherited />
                    
                    <configuration />
                    
                    
                    <reportSets>
                        
                        <reportSet>
                            
                            <id />
                            
                            <configuration />
                            
                            <inherited />
                            
                            <reports />
                        reportSet>
                    reportSets>
                plugin>
            plugins>
        reporting>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38

    10、profile配置

        
        <profiles>
            
            <profile>
                
                <id />
                
                
                <activation>
                    
                    <activeByDefault />
                    
                    <jdk />
                    
                    <os>
                        
                        <name>Windows XPname>
                        
                        <family>Windowsfamily>
                        
                        <arch>x86arch>
                        
                        <version>5.1.2600version>
                    os>
                    
                    
                    <property>
                        
                        <name>mavenVersionname>
                        
                        <value>2.0.3value>
                    property>
                    
                    
                    <file>
                        
                        <exists>/usr/local/abcd/abcd-home/jobs/maven-guide-zh-to-production/workspace/
                        exists>
                        
                        <missing>/usr/local/abcd/abcd-home/jobs/maven-guide-zh-to-production/workspace/
                        missing>
                    file>
                activation>
     
                
                <build />
                
                <repositories />
                
                <pluginRepositories />
                
                <dependencies />
                
                <reporting />
                
                <dependencyManagement />
                
                <distributionManagement />
     
                
                <reports />
                
                <modules />
                
                <properties />
            profile>
        profiles>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67

    11、邮件列表和持续集成配置

        
        <ciManagement>
            
            <system />
            
            <url />
            
            <notifiers>
                
                <notifier>
                    
                    <type />
                    
                    <sendOnError />
                    
                    <sendOnFailure />
                    
                    <sendOnSuccess />
                    
                    <sendOnWarning />
                    
                    <address />
                    
                    <configuration />
                notifier>
            notifiers>
        ciManagement>
     
        
        <mailingLists>
            
            <mailingList>
                
                <name>Demoname>
                
                <post>nanxs@123.compost>
                
                <subscribe>nanxs@123.comsubscribe>
                
                <unsubscribe>nanxs@123.comunsubscribe>
                
                <archive>http:/a.b.c/nanxs/demo/dev/archive>
            mailingList>
        mailingLists>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44

    12、项目的描述性信息

        
        <issueManagement>
            
            <system>jirasystem>
            
            <url>http://jira.baidu.com/nanxsurl>
        issueManagement>
     
        
        <inceptionYear />
     
        
        <developers>
            
            <developer>
                
                <id>HELLO WORLDid>
                
                <name>nanxsname>
                
                <email>123@abc.comemail>
                
                <url />
                
                <roles>
                    <role>Project Managerrole>
                    <role>Architectrole>
                roles>
                
                <organization>demoorganization>
                
                <organizationUrl>http://a.b.com/nanxsorganizationUrl>
                
                <properties>
                    <dept>Nodept>
                properties>
                
                <timezone>-5timezone>
            developer>
        developers>
     
        
        <contributors>
            
            <contributor>
                <name />
                <email />
                <url />
                <organization />
                <organizationUrl />
                <roles />
                <timezone />
                <properties />
            contributor>
        contributors>
     
        
        
        <licenses>
            
            <license>
                
                <name>Apache 2name>
                
                <url>http://a.b.com/nanxs/LICENSE-1.0.txturl>
                
                <distribution>repodistribution>
                
                <comments>A business-friendly OSS licensecomments>
            license>
        licenses>
     
        
        <scm>
            
            <connection>scm:svn:http://a.b.com/nanxsconnection>
            
            <developerConnection>scm:svn:http://a.b.com/nanxsdeveloperConnection>
            
            <tag />
            
            <url>http://a.b.com/nanxsurl>
        scm>
     
        
        <organization>
            
            <name>demoname>
            
            <url>http://a.b.com/nanxsurl>
        organization>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91

    13、其他配置

        
        <prerequisites>
            
            <maven />
        prerequisites>
     
        
        <modules />
     
        
        <name>valuename>。 -->
        <properties />
     
        
        <reports>reports>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
  • 相关阅读:
    C++ 字符串
    河北吉力宝以步力宝健康鞋引发的全新生活生态商
    数字电路中的基础电路结构
    零成本搭建个人博客搭建篇
    关于Flask_自定义路由转换器的方法和使用
    PyVis|神经网络数据集的可视化
    ASP.NET Core 3.1系列(16)——Entity Framework Core之Code First
    中高级前端开发需要掌握的vue知识点
    Slimming剪枝方法
    【MATLAB教程案例5】常见无线通信信道的matlab模拟和仿真分析——自由空间损耗模型,Okumura-Hata模型以及COST231 Hata模型
  • 原文地址:https://blog.csdn.net/qq_44696532/article/details/134176177