<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
    主站蜘蛛池模板: 国产在线观看免费av站| 日韩精品极品视频在线观看免费| 亚洲国产精品毛片av不卡在线| 一个人看www免费高清字幕| 亚洲AV无码专区在线播放中文| 91免费播放人人爽人人快乐| 午夜亚洲国产理论片二级港台二级| 中文字幕亚洲无线码a| 18国产精品白浆在线观看免费| 污污的视频在线免费观看| 亚洲精品成人av在线| 国产福利免费在线观看| 精品国产麻豆免费人成网站| 99久久国产亚洲综合精品| 国产亚洲视频在线播放| 女人让男人免费桶爽30分钟| 十八禁在线观看视频播放免费| 亚洲七久久之综合七久久| 亚洲AV无码专区国产乱码4SE| 国产精品高清全国免费观看| 毛片无码免费无码播放 | 91精品国产亚洲爽啪在线影院| 女人18毛片a级毛片免费| 久久99精品视免费看| 看一级毛片免费观看视频| 亚洲国产成人精品青青草原| 亚洲中文字幕无码一久久区| 色视频色露露永久免费观看| 久久精品无码专区免费青青| selaoban在线视频免费精品| 亚洲欧洲专线一区| 67194在线午夜亚洲| 亚洲黄色在线网站| 亚洲人成网亚洲欧洲无码久久| 国产无遮挡裸体免费视频| 无码av免费毛片一区二区| 99视频免费播放| 大地影院MV在线观看视频免费| 美女被艹免费视频| 午夜亚洲WWW湿好爽| 亚洲sss综合天堂久久久|