<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 閱讀(589) 評論(0)  編輯  收藏 所屬分類: Maven
    主站蜘蛛池模板: 亚洲欧洲日本在线| 麻豆一区二区三区蜜桃免费| 亚洲jjzzjjzz在线播放| 色多多免费视频观看区一区| 成人一a毛片免费视频| 亚洲乱码中文字幕久久孕妇黑人| 亚洲国产日韩综合久久精品| 黄色网址免费在线观看| 久久精品无码专区免费东京热| 亚洲国产成人精品不卡青青草原| 亚洲精品无码av中文字幕| jizz免费一区二区三区| 久久久久亚洲精品中文字幕| 亚洲中文字幕一区精品自拍| 蜜桃视频在线观看免费视频网站WWW| 亚洲成AV人在线观看天堂无码| 亚在线观看免费视频入口| 亚洲精品视频在线观看免费| 黄网站色在线视频免费观看| 自拍偷自拍亚洲精品被多人伦好爽 | 最近2019中文字幕免费直播| 亚洲精品成人图区| 美女被免费视频网站a国产| 黄色毛片免费观看| 亚洲av无码无在线观看红杏| www视频在线观看免费| 亚洲大尺度无码专区尤物| 一级毛片免费观看不卡视频| 亚洲国产91在线| 亚洲AV无码成人精品区大在线| 3344在线看片免费| 中文字幕一精品亚洲无线一区| 男人进去女人爽免费视频国产| 亚洲另类图片另类电影| 国产一级大片免费看| 丝袜足液精子免费视频| 亚洲午夜精品在线| 亚洲爽爽一区二区三区| 最近中文字幕完整版免费高清| 丰满亚洲大尺度无码无码专线 | 亚洲小视频在线播放|