zoukankan      html  css  js  c++  java
  • maven学习之二

       三 profile介绍

    可以有多个地方定义profile。定义的地方不同,它的作用范围也不同。

    (1)    针对于特定项目的profile配置我们可以定义在该项目的pom.xml中。

    (2)    针对于特定用户的profile配置,我们可以在用户的settings.xml文件中定义profile。该文件在用户家目录下的“.m2”目录下。

    (3)  全局的profile配置。全局的profile是定义在Maven安装目录下的“conf/settings.xml”文件中的。

    profile定义在settings.xml中:

      profile定义在settings.xml中时意味着该profile是全局的,它会对所有项目或者某一用户的所有项目都产生作用。因为它是全局的,所以在settings.xml中只能定义一些相对而言范围宽泛一点的配置信息,比如远程仓库等。具体而言,能够定义在settings.xml中的信息有<repositories>、<pluginRepositories>和<properties>

    profile定义在pom.xml中:

    在pom.xml中的profile可以定义更多的信息。主要有以下这些:

    l  <repositories>

    l  <pluginRepositories>

    l  <dependencies>

    l  <plugins>

    l  <properties>

    l  <dependencyManagement>

    l  <distributionManagement>

    l  还有build元素下面的子元素,主要包括:

    <defaultGoal>

    <resources>

    <testResources>

    <finalName>

    2 .maven超级pom:3.xxx版本之后在:maven安装目录下的:/lib/maven-model-builder-version.jar中 orgapachemavenmode目录中的pom-4.0.0.xml

  • 相关阅读:
    正睿提高组2017模拟题三T1
    数位dp【转载】
    正睿提高组2017模拟题二T2
    【树状数组二维区间加+区间查询模板】bzoj3132
    【树状数组区间加+区间查询模板】洛谷P3372
    51Nod
    CodeForces 631E Product Sum
    CodeForces
    [不知道哪来的题] 完美理论
    CodeForces
  • 原文地址:https://www.cnblogs.com/xd03122049/p/5970153.html
Copyright © 2011-2022 走看看