Maven pom.xml not less common usage profile configuration parameters

Maven configuration parameters in the usage of less

<!-- 项目创建年份,4位数字。当产生版权信息时需要使用这个值。 --> 
    <inceptionYear /> 
    
 <!-- 描述了这个项目构建环境中的前提条件。 --> 
    <prerequisites> 
        <!-- 构建该项目或使用该插件所需要的Maven的最低版本 --> 
        <maven></maven> 
    </prerequisites> 

    <!-- 项目的问题管理系统(Bugzilla, Jira, Scarab,或任何你喜欢的问题管理系统)的名称和URL,本例为 jira --> 
    <issueManagement> 
        <!-- 问题管理系统(例如jira)的名字, --> 
        <system> jira </system> 

        <!-- 该项目使用的问题管理系统的URL --> 
        <url> http://jira.baidu.com/banseon </url> 
    </issueManagement> 
    
    <!-- 项目持续集成信息 --> 
    <ciManagement> 
        <!-- 持续集成系统的名字,例如continuum --> 
        <system></system> 

        <!-- 该项目使用的持续集成系统的URL(如果持续集成系统有web接口的话)。 --> 
        <url></url> 

        <!-- 构建完成时,需要通知的开发者/用户的配置项。包括被通知者信息和通知条件(错误,失败,成功,警告) --> 
        <notifiers> 
            <!-- 配置一种方式,当构建中断时,以该方式通知用户/开发者 --> 
            <notifier> 
                <!-- 传送通知的途径 --> 
                <type></type> 

                <!-- 发生错误时是否通知 --> 
                <sendOnError></sendOnError> 

                <!-- 构建失败时是否通知 --> 
                <sendOnFailure></sendOnFailure> 

                <!-- 构建成功时是否通知 --> 
                <sendOnSuccess></sendOnSuccess> 

                <!-- 发生警告时是否通知 --> 
                <sendOnWarning></sendOnWarning> 

                <!-- 不赞成使用。通知发送到哪里 --> 
                <address></address> 

                <!-- 扩展配置项 --> 
                <configuration></configuration> 
            </notifier> 
        </notifiers> 
    </ciManagement> 
    
    <!-- 项目相关邮件列表信息 --> 
    <mailingLists> 
        <!-- 该元素描述了项目相关的所有邮件列表。自动产生的网站引用这些信息。 --> 
        <mailingList> 
            <!-- 邮件的名称 --> 
            <name> Demo </name> 

            <!-- 发送邮件的地址或链接,如果是邮件地址,创建文档时,mailto: 链接会被自动创建 --> 
            <post> [email protected] </post> 

            <!-- 订阅邮件的地址或链接,如果是邮件地址,创建文档时,mailto: 链接会被自动创建 --> 
            <subscribe> [email protected] </subscribe> 

            <!-- 取消订阅邮件的地址或链接,如果是邮件地址,创建文档时,mailto: 链接会被自动创建 --> 
            <unsubscribe> [email protected] </unsubscribe> 

            <!-- 你可以浏览邮件信息的URL --> 
            <archive> http:/hi.baidu.com/banseon/demo/dev/ </archive> 
        </mailingList> 
    </mailingLists> 
    
        <!-- 项目开发者列表 --> 
    <developers> 
        <!-- 某个项目开发者的信息 --> 
        <developer> 
            <!-- SCM里项目开发者的唯一标识符 --> 
            <id> HELLO WORLD </id>
            
            <!-- 项目开发者的全名 --> 
            <name> banseon </name> 

            <!-- 项目开发者的email --> 
            <email> [email protected] </email> 

            <!-- 项目开发者的主页的URL --> 
            <url></url> 

            <!-- 项目开发者在项目中扮演的角色,角色元素描述了各种角色 --> 
            <roles> 
                <role> Project Manager </role> 
                <role> Architect </role> 
            </roles> 

            <!-- 项目开发者所属组织 --> 
            <organization> demo </organization> 

            <!-- 项目开发者所属组织的URL --> 
            <organizationUrl> http://hi.baidu.com/xxx </organizationUrl> 

            <!-- 项目开发者属性,如即时消息如何处理等 --> 
            <properties> 
                <dept> No </dept> 
            </properties> 

            <!-- 项目开发者所在时区, -11到12范围内的整数。 --> 
            <timezone> -5 </timezone> 
        </developer> 
    </developers> 
    
     <!-- 项目的其他贡献者列表 --> 
    <contributors> 
        <!-- 项目的其他贡献者。参见developers/developer元素 --> 
        <contributor> 
            <!-- 项目贡献者的全名 --> 
            <name></name>

            <!-- 项目贡献者的email -->
            <email></email>

            <!-- 项目贡献者的主页的URL -->
            <url></url>

            <!-- 项目贡献者所属组织 -->
            <organization></organization>

            <!-- 项目贡献者所属组织的URL -->
            <organizationUrl></organizationUrl>

            <!-- 项目贡献者在项目中扮演的角色,角色元素描述了各种角色 --> 
            <roles> 
                <role> Project Manager </role> 
                <role> Architect </role> 
            </roles>

            <!-- 项目贡献者所在时区, -11到12范围内的整数。 --> 
            <timezone></timezone>
            
            <!-- 项目贡献者属性,如即时消息如何处理等 --> 
            <properties> 
                <dept> No </dept> 
            </properties>  
        </contributor> 
    </contributors> 
    
     <!-- 该元素描述了项目所有License列表。 应该只列出该项目的license列表,不要列出依赖项目的 license列表。
         如果列出多个license,用户可以选择它们中的一个而不是接受所有license。 --> 
    <licenses> 
        <!-- 描述了项目的license,用于生成项目的web站点的license页面,其他一些报表和validation也会用到该元素。 --> 
        <license> 
            <!-- license用于法律上的名称 --> 
            <name> Apache 2 </name> 

            <!-- 官方的license正文页面的URL --> 
            <url> http://www.baidu.com/banseon/LICENSE-2.0.txt </url> 

            <!-- 项目分发的主要方式: 
                    repo,可以从Maven库下载 
                    manual, 用户必须手动下载和安装依赖 --> 
            <distribution> repo </distribution> 

            <!-- 关于license的补充信息 --> 
            <comments> A business-friendly OSS license </comments> 
        </license> 
    </licenses> 
    
    <!-- SCM(Source Control Management)标签允许你配置你的代码库,供Maven web站点和其它插件使用。 --> 
    <scm> 
        <!-- SCM的URL,该URL描述了版本库和如何连接到版本库。欲知详情,请看SCMs提供的URL格式和列表。该连接只读。 --> 
        <connection> 
            scm:svn:http://svn.baidu.com/banseon/maven/banseon/banseon-maven2-trunk(dao-trunk)
        </connection> 

        <!-- 给开发者使用的,类似connection元素。即该连接不仅仅只读 --> 
        <developerConnection> 
            scm:svn:http://svn.baidu.com/banseon/maven/banseon/dao-trunk 
        </developerConnection> 

        <!-- 当前代码的标签,在开发阶段默认为HEAD --> 
        <tag></tag> 

        <!-- 指向项目的可浏览SCM库(例如ViewVC或者Fisheye)的URL。 --> 
        <url> http://svn.baidu.com/banseon </url> 
    </scm> 
    
     <!-- 描述项目所属组织的各种属性。Maven产生的文档用 --> 
    <organization> 
        <!-- 组织的全名 --> 
        <name> demo </name> 

        <!-- 组织主页的URL --> 
        <url> http://www.baidu.com/banseon </url> 
    </organization> 
    
    <!-- 该元素描述使用报表插件产生报表的规范。当用户执行“mvn site”,这些报表就会运行。 在页面导航栏能看到所有报表的链接。 --> 
    <reporting> 
        <!-- true,则,网站不包括默认的报表。这包括“项目信息”菜单中的报表。 --> 
        <excludeDefaults /> 

        <!-- 所有产生的报表存放到哪里。默认值是${project.build.directory}/site。 --> 
        <outputDirectory /> 

        <!-- 使用的报表插件和他们的配置。 --> 
        <plugins> 
            <!-- plugin元素包含描述报表插件需要的信息 --> 
            <plugin> 
                <!-- 报表插件在仓库里的group ID --> 
                <groupId></groupId> 
                <!-- 报表插件在仓库里的artifact ID --> 
                <artifactId></artifactId> 

                <!-- 被使用的报表插件的版本(或版本范围) --> 
                <version></version> 

                <!-- 任何配置是否被传播到子项目 --> 
                <inherited>true/false</inherited> 

                <!-- 报表插件的配置 --> 
                <configuration></configuration> 

                <!-- 一组报表的多重规范,每个规范可能有不同的配置。一个规范(报表集)对应一个执行目标 。例如,
                     有1,2,3,4,5,6,7,8,9个报表。1,2,5构成A报表集,对应一个执行目标。2,5,8构成B报
                     表集,对应另一个执行目标 --> 
                <reportSets> 
                    <!-- 表示报表的一个集合,以及产生该集合的配置 --> 
                    <reportSet> 
                        <!-- 报表集合的唯一标识符,POM继承时用到 --> 
                        <id></id> 

                        <!-- 产生报表集合时,被使用的报表的配置 --> 
                        <configuration></configuration> 

                        <!-- 配置是否被继承到子POMs --> 
                        <inherited>true/false</inherited> 

                        <!-- 这个集合里使用到哪些报表 --> 
                        <reports></reports> 
                    </reportSet> 
                </reportSets> 
            </plugin> 
        </plugins> 
    </reporting> 
    
     <!-- 在列的项目构建profile,如果被激活,会修改构建处理 --> 
    <profiles> 
        <!-- 根据环境参数或命令行参数激活某个构建处理 --> 
        <profile> 
            <!-- 构建配置的唯一标识符。即用于命令行激活,也用于在继承时合并具有相同标识符的profile。 --> 
            <id></id>

            <!-- 自动触发profile的条件逻辑。Activation是profile的开启钥匙。profile的力量来自于它能够
                 在某些特定的环境中自动使用某些特定的值;这些环境通过activation元素指定。activation元
                 素并不是激活profile的唯一方式。 --> 
            <activation> 
                <!-- profile默认是否激活的标志 --> 
                <activeByDefault>true/false</activeByDefault> 

                <!-- 当匹配的jdk被检测到,profile被激活。例如,1.4激活JDK1.4,1.4.0_2,而!1.4激活所有版本
                     不是以1.4开头的JDK。 --> 
                <jdk>jdk版本,如:1.7</jdk> 

                <!-- 当匹配的操作系统属性被检测到,profile被激活。os元素可以定义一些操作系统相关的属性。 --> 
                <os> 
                    <!-- 激活profile的操作系统的名字 --> 
                    <name> Windows XP </name> 

                    <!-- 激活profile的操作系统所属家族(如 'windows') --> 
                    <family> Windows </family> 

                    <!-- 激活profile的操作系统体系结构 --> 
                    <arch> x86 </arch> 

                    <!-- 激活profile的操作系统版本 --> 
                    <version> 5.1.2600 </version> 
                </os> 

                <!-- 如果Maven检测到某一个属性(其值可以在POM中通过${名称}引用),其拥有对应的名称和值,Profile
                     就会被激活。如果值字段是空的,那么存在属性名称字段就会激活profile,否则按区分大小写方式匹
                     配属性值字段 --> 
                <property> 
                    <!-- 激活profile的属性的名称 --> 
                    <name> mavenVersion </name> 

                    <!-- 激活profile的属性的值 --> 
                    <value> 2.0.3 </value> 
                </property> 

                <!-- 提供一个文件名,通过检测该文件的存在或不存在来激活profile。missing检查文件是否存在,如果不存在则激活 
                     profile。另一方面,exists则会检查文件是否存在,如果存在则激活profile。 --> 
                <file> 
                    <!-- 如果指定的文件存在,则激活profile。 --> 
                    <exists> /usr/local/hudson/hudson-home/jobs/maven-guide-zh-to-production/workspace/ </exists> 

                    <!-- 如果指定的文件不存在,则激活profile。 --> 
                    <missing> /usr/local/hudson/hudson-home/jobs/maven-guide-zh-to-production/workspace/ </missing> 
                </file> 
            </activation> 

            <!-- 构建项目所需要的信息。参见build元素 --> 
            <build> 
                <defaultGoal /> 
                <resources> 
                    <resource> 
                        <targetPath></targetPath>
                        <filtering></filtering>
                        <directory></directory>
                        <includes>
                            <include></include>
                        </includes>
                        <excludes>
                            <exclude></exclude>
                        </excludes>
                    </resource> 
                </resources> 
                <testResources> 
                    <testResource> 
                        <targetPath></targetPath>
                        <filtering></filtering>
                        <directory></directory>
                        <includes>
                            <include></include>
                        </includes>
                        <excludes>
                            <exclude></exclude>
                        </excludes> 
                    </testResource> 
                </testResources> 
                <directory></directory>
                <finalName></finalName>
                <filters></filters> 
                <pluginManagement> 
                    <plugins> 
                        <!-- 参见build/pluginManagement/plugins/plugin元素 --> 
                        <plugin> 
                            <groupId></groupId>
                            <artifactId></artifactId>
                            <version></version>
                            <extensions>true/false</extensions> 
                            <executions> 
                                <execution> 
                                    <id></id>
                                    <phase></phase>
                                    <goals></goals>
                                    <inherited>true/false</inherited>
                                    <configuration></configuration> 
                                </execution> 
                            </executions> 
                            <dependencies> 
                                <!-- 参见dependencies/dependency元素 --> 
                                <dependency> 
                                </dependency> 
                            </dependencies> 
                            <goals></goals>
                            <inherited>true/false</inherited>
                            <configuration></configuration>
                        </plugin> 
                    </plugins> 
                </pluginManagement> 
                <plugins> 
                    <!-- 参见build/pluginManagement/plugins/plugin元素 --> 
                    <plugin> 
                        <groupId></groupId>
                        <artifactId></artifactId>
                        <version></version>
                        <extensions>true/false</extensions> 
                        <executions> 
                            <execution> 
                                <id></id>
                                <phase></phase>
                                <goals></goals>
                                <inherited>true/false</inherited>
                                <configuration></configuration> 
                            </execution> 
                        </executions> 
                        <dependencies> 
                            <!-- 参见dependencies/dependency元素 --> 
                            <dependency> 
                            </dependency> 
                        </dependencies> 
                        <goals></goals>
                        <inherited>true/false</inherited>
                        <configuration></configuration> 
                    </plugin> 
                </plugins> 
            </build> 

            <!-- 发现依赖和扩展的远程仓库列表。 --> 
            <repositories> 
                <!-- 参见repositories/repository元素 --> 
                <repository> 
                    <releases> 
                        <enabled><enabled>
                        <updatePolicy></updatePolicy>
                        <checksumPolicy></checksumPolicy> 
                    </releases> 
                    <snapshots> 
                        <enabled><enabled>
                        <updatePolicy></updatePolicy>
                        <checksumPolicy></checksumPolicy> 
                    </snapshots> 
                    <id></id>
                    <name></name>
                    <url></url>
                    <layout></layout> 
                </repository> 
            </repositories> 

            <!-- 发现插件的远程仓库列表,这些插件用于构建和报表 --> 
            <pluginRepositories> 
                <!-- 包含需要连接到远程插件仓库的信息.参见repositories/repository元素 --> 
                <pluginRepository> 
                    <releases> 
                        <enabled><enabled>
                        <updatePolicy></updatePolicy>
                        <checksumPolicy></checksumPolicy> 
                    </releases> 
                    <snapshots> 
                        <enabled><enabled>
                        <updatePolicy></updatePolicy>
                        <checksumPolicy></checksumPolicy>
                    </snapshots> 
                    <id></id>
                    <name></name>
                    <url></url>
                    <layout></layout> 
                </pluginRepository> 
            </pluginRepositories> 

            <!-- 该元素描述了项目相关的所有依赖。 这些依赖组成了项目构建过程中的一个个环节。它们自动从项目定义的
                 仓库中下载。要获取更多信息,请看项目依赖机制。 --> 
            <dependencies> 
                <!-- 参见dependencies/dependency元素 --> 
                <dependency> 
                </dependency> 
            </dependencies> 

            <!-- 该元素包括使用报表插件产生报表的规范。当用户执行“mvn site”,这些报表就会运行。 在页面导航栏能看
                 到所有报表的链接。参见reporting元素 --> 
            <reporting></reporting> 

            <!-- 参见dependencyManagement元素 --> 
            <dependencyManagement> 
                <dependencies> 
                    <!-- 参见dependencies/dependency元素 --> 
                    <dependency> 
                    </dependency> 
                </dependencies> 
            </dependencyManagement> 

            <!-- 参见distributionManagement元素 --> 
            <distributionManagement> 
            </distributionManagement> 

            <!-- 参见properties元素 --> 
            <properties /> 
        </profile> 
    </profiles> 
    
        <!-- 发现插件的远程仓库列表,这些插件用于构建和报表 --> 
    <pluginRepositories> 
        <!-- 包含需要连接到远程插件仓库的信息.参见repositories/repository元素 --> 
        <pluginRepository> 
        </pluginRepository> 
    </pluginRepositories> 
    
        <!-- 项目分发信息,在执行mvn deploy后表示要发布的位置。有了这些信息就可以把网站部署到远程服务器或者
         把构件部署到远程仓库。 --> 
    <distributionManagement> 
        <!-- 部署项目产生的构件到远程仓库需要的信息 --> 
        <repository> 
            <!-- 是分配给快照一个唯一的版本号(由时间戳和构建流水号)?还是每次都使用相同的版本号?参见
                 repositories/repository元素 --> 
            <uniqueVersion /> 
            <id> banseon-maven2 </id> 
            <name> banseon maven2 </name> 
            <url> file://${basedir}/target/deploy </url> 
            <layout></layout> 
        </repository> 

        <!-- 构件的快照部署到哪里?如果没有配置该元素,默认部署到repository元素配置的仓库,参见
             distributionManagement/repository元素 --> 
        <snapshotRepository> 
            <uniqueVersion /> 
            <id> banseon-maven2 </id> 
            <name> Banseon-maven2 Snapshot Repository </name> 
            <url> scp://svn.baidu.com/banseon:/usr/local/maven-snapshot </url> 
            <layout></layout>
        </snapshotRepository> 

        <!-- 部署项目的网站需要的信息 --> 
        <site> 
            <!-- 部署位置的唯一标识符,用来匹配站点和settings.xml文件里的配置 --> 
            <id> banseon-site </id> 

            <!-- 部署位置的名称 --> 
            <name> business api website </name> 

            <!-- 部署位置的URL,按protocol://hostname/path形式 --> 
            <url> 
                scp://svn.baidu.com/banseon:/var/www/localhost/banseon-web 
            </url> 
        </site> 

        <!-- 项目下载页面的URL。如果没有该元素,用户应该参考主页。使用该元素的原因是:帮助定位
             那些不在仓库里的构件(由于license限制)。 --> 
        <downloadUrl /> 

        <!-- 如果构件有了新的group ID和artifact ID(构件移到了新的位置),这里列出构件的重定位信息。 --> 
        <relocation> 
            <!-- 构件新的group ID --> 
            <groupId></groupId> 

            <!-- 构件新的artifact ID --> 
            <artifactId></artifactId> 

            <!-- 构件新的版本号 --> 
            <version></version> 

            <!-- 显示给用户的,关于移动的额外信息,例如原因。 --> 
            <message></message> 
        </relocation> 

        <!-- 给出该构件在远程仓库的状态。不得在本地项目中设置该元素,因为这是工具自动更新的。有效的值
             有:none(默认),converted(仓库管理员从Maven 1 POM转换过来),partner(直接从伙伴Maven 
             2仓库同步过来),deployed(从Maven 2实例部署),verified(被核实时正确的和最终的)。 --> 
        <status></status> 
    </distributionManagement>
Published 45 original articles · won praise 1 · views 1093

Guess you like

Origin blog.csdn.net/lqq404270201/article/details/103473716