<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks

    Intro

    Because I couldn't find a clear overview of which properties are availabe in maven2 I started this page. It is a collection of things found in the offcial maven documentation and postings to the maven user mailing list.

    Note: In Maven 3.0, all pom.* properties are deprecated. Use project.* instead!

    Build in properties

    • ${basedir} represents the directory containing pom.xml
    • ${version} equivalent to ${project.version} or ${pom.version}

    Pom/Project properties

    All elements in the pom.xml, can be referenced with the project. prefix or using pom. as prefix. This list is just an example of some commonly used elements.

    • ${project.build.directory} results in the path to your "target" dir, this is the same as ${pom.project.build.directory}
    • ${project.build.outputDirectory} results in the path to your "target/classes" dir
    • ${project.name} or ${pom.name} refers to the name of the project.
    • ${project.version} or ${pom.version} refers to the version of the project.
    • ${project.build.finalName} refers to the final name of the file created when the built project is packaged

    Local user settings

    Similarly, values in the user's settings.xml can be referenced using property names with settings. prefix.

    • ${settings.localRepository} refers to the path of the user's local repository.
    • ${maven.repo.local} also works for backward compatibility with maven1 ??

    Environment variables

    Environment variables can be referenced using the env prefix

    • ${env.M2_HOME} returns the Maven2 installation path.
    • ${java.home} specifies the path to the current JRE_HOME environment use with relative paths to get for example:
      <jvm>${java.home}../bin/java.exe</jvm>

    Java system properties

    All Java System Properties defined by the JVM.

    Custom properties in the POM

    User defined properties in the pom.xml.

    <project>
    ...
    <properties>
    <my.filter.value>hello</my.filter.value>
    </properties>
    ...
    </project>
    • ${my.filter.value} will result in hello if you inserted the above XML fragment in your pom.xml

    Parent Project variables

    How can parent project variables be accessed?

    You can use the prefix: ${project.parent}.

    A good way to determine possible variables is to have a look directly at the API. I'm currently using Maven 2.2.1, and to access the Parent you can use ${project.parent}. This will return an org.apache.maven.project.MavenProject instance.

    To access the parent version: ${parent.version}.

    Reflection Properties

    The pattern ${someX.someY.someZ} can simply sometimes mean getSomeX().getSomeY().getSomeZ(). Thus, properties such as ${project.build.directory} is translated to getProject().getBuild().getDirectory().

    posted on 2010-02-08 10:12 seal 閱讀(598) 評論(0)  編輯  收藏 所屬分類: Maven
    主站蜘蛛池模板: 亚洲国产av高清无码| 国产亚洲精品看片在线观看| 久久亚洲国产精品成人AV秋霞 | 精品国产日韩亚洲一区在线| 一二三四在线观看免费高清中文在线观看| 国产亚洲精品激情都市| 中文字幕一区二区免费| 亚洲av永久无码精品漫画| 特级做A爰片毛片免费看无码 | 无码专区一va亚洲v专区在线 | 亚洲免费在线视频播放| 成人无码区免费视频观看| 亚洲av无码电影网| 美女被免费视频网站a国产| 亚洲成在人线aⅴ免费毛片| 国产成人精品男人免费| 人人爽人人爽人人片A免费 | 亚洲熟妇色自偷自拍另类| 国内精品乱码卡1卡2卡3免费| 日韩亚洲国产高清免费视频| 女人18毛片水真多免费播放| 国产亚洲精品仙踪林在线播放| 亚洲av成人一区二区三区在线观看| 国产精品免费一区二区三区| 亚洲AV午夜成人影院老师机影院| 一级毛片免费观看不卡的| avtt天堂网手机版亚洲| 免费国产一级特黄久久| 中文字幕在线免费看线人| 亚洲成综合人影院在院播放| 精品国产免费一区二区| 一道本在线免费视频| 亚洲精品视频在线播放| 日本免费的一级v一片| 国产麻豆一精品一AV一免费| 亚洲人成网网址在线看| 亚洲第一网站男人都懂| 69视频免费观看l| 黄页网址在线免费观看| 日本久久久久亚洲中字幕| 国产午夜免费秋霞影院|