Tôi đang sử dụng hai cấu hình: phát triển và sản xuất.maven release plugin bỏ qua releaseProfile
Phát triển phải hoạt động theo mặc định; sản xuất nên được sử dụng khi tôi phát hành.
Trong pom.xml của tôi, tôi có:
[...]
<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>
[...]
Nó chỉ không hoạt động.
useReleaseProfiles
không hoạt động hoặc: http://jira.codehaus.org/browse/MRELEASE-459
Hồ sơ phát triển nên luôn tích cực nhưng không phải khi chạy mvn release:perform
. Làm thế nào để bạn đạt được điều này?
[UPDATE]: Tôi đã thấy với cờ gỡ lỗi rằng hồ sơ sản xuất của tôi được sử dụng, nhưng hồ sơ phát triển cũng được sử dụng, vì đó là activeByDefault
. Điều này không thể bị ghi đè bởi đối số releaseProfile
. Sẽ tốt hơn nếu buộc plugin phát hành chỉ sử dụng chỉ tiểu sử "sản xuất".
@editor, Tốt hơn là viết rằng lỗi đã được sửa, ở đây, dưới dạng nhận xét. – Arun
@Leif Cảm ơn bạn đã cập nhật về sửa lỗi này! – devdanke
Ngay cả với 2.5.1 tôi vẫn phải chỉ định hồ sơ của mình theo cách thủ công '-Prelease' trên CLI. –