<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
    主站蜘蛛池模板: 中文字幕在线日亚洲9| 中文毛片无遮挡高潮免费| 亚洲永久网址在线观看| 色噜噜AV亚洲色一区二区| 性色av免费观看| 99久久国产免费-99久久国产免费| 国产精品亚洲小说专区| 久久精品国产亚洲AV蜜臀色欲| 亚洲AV永久纯肉无码精品动漫| 亚洲精品岛国片在线观看| 午夜高清免费在线观看| 国内精品免费麻豆网站91麻豆 | 91嫩草国产在线观看免费| 久久九九免费高清视频| 国产精品亚洲综合| 亚洲国产区男人本色| 亚洲午夜精品国产电影在线观看| 久久精品国产99精品国产亚洲性色| 亚洲熟伦熟女新五十路熟妇| 国产免费久久精品| 日韩免费观看视频| 成年轻人网站色免费看| 久久久久久久91精品免费观看| 亚洲免费网站在线观看| 99热这里有免费国产精品| 久久免费线看线看| 最近免费中文字幕中文高清| 一日本道a高清免费播放 | 免费精品国产自产拍观看| 精品国产精品久久一区免费式 | 亚洲狠狠色丁香婷婷综合| 亚洲精品亚洲人成在线播放| 亚洲av无码国产综合专区 | 蜜桃AV无码免费看永久| 99re在线免费视频| 中文字幕免费高清视频| 最近中文字幕完整免费视频ww | 亚洲中文字幕AV每天更新| 亚洲中文字幕一区精品自拍| 亚洲成a人片在线不卡一二三区| 亚洲av日韩av永久无码电影|