2014-02-27 87 views

回答

0

Maven没有为release-build指定任何特殊含义。但是,项目可以使用属性(-Dproperty-name=value或只是-Dproperty-name)来激活更改项目构建方式的配置文件(Maven - activate profile based on project property)。它可能会启用一些额外的步骤,只有最终版本才需要。例如,this project uses it to include a native library in the build

<profile> 
    <id>native</id> 
    <activation> 
     <property> 
      <name>release-build</name> 
     </property> 
    </activation> 
    <modules> 
     <module>pi4j-native</module> 
    </modules> 
</profile> 

有没有普遍的答案:你需要查阅文档,或建造,你正在使用的项目。

-1

你可以做到这一点更简单的自动to activate a profile in case of a release通过其已经支持外的开箱这样的行家释放小插件,简单地说:

<plugin> 
    <artifactId>maven-release-plugin</artifactId> 
    <version>2.4.2</version> 
    <configuration> 
     <releaseProfiles>release</releaseProfiles> 
    </configuration> 
    </plugin> 

除此之外,这是非常糟糕的只有在配置文件处于活动状态时才能激活模块。 This will lead so several problem.

相关问题