我使用两个配置文件:开发和生产.
开发应在默认情况下有效; 我发布时应该使用生产.
在我的pom.xml中,我有:
[...]
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-9</version>
<configuration>
<useReleaseProfile>false</useReleaseProfile>
<goals>deploy</goals>
<arguments>-Pproduction</arguments>
</configuration>
</plugin>
[...]
<profiles>
<profile>
<id>production</id>
<properties>
<profile.name>production</profile.name>
</properties>
[...]
</profile>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profile.name>development</profile.name>
</properties>
[...]
</profile>
[...]
Run Code Online (Sandbox Code Playgroud)
它只是不起作用.
useReleaseProfiles也不起作用:http:
//jira.codehaus.org/browse/MRELEASE-459
开发配置文件应始终处于活动状态,但在运行时不应mvn release:perform.你是如何实现这一目标的?
[更新]:我已经看到调试标志使用了我的生产配置文件,但也使用了开发配置文件,因为它是activeByDefault.这个releaseProfile论点无法改写.强制释放插件仅使用"生产"配置文件会很好.
| 归档时间: |
|
| 查看次数: |
12614 次 |
| 最近记录: |