releaseProfiles works only if at least one (default) profile is activated in
the same pom.xml
---------------------------------------------------------------------------------------------
Key: MRELEASE-614
URL: http://jira.codehaus.org/browse/MRELEASE-614
Project: Maven 2.x Release Plugin
Issue Type: Bug
Components: perform
Affects Versions: 2.0
Environment: WindowsXP, Maven-2.2.1
Reporter: Torsten Reinhard
related to MRELEASE-459 I decided to define an empty "dummy" profile, which is
activated by default instead of passing -P... at the command line at mvn
release:perform.
I´ve put this into our company parent pom.xml, next to the release profile that
might be enabled during mvn release:perform:
<profiles>
<!-- default profile is needed, because otherwise mvn release:perform
will not activate the release profile -->
<!-- see http://jira.codehaus.org/browse/MRELEASE-459 for details-->
<profile>
<id>dummy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>release</id>
<properties>
<!-- could be used at mvn release:perform -->
<!-- will set productVersion to the current
(released)project.scm.tag -->
<productVersion>${project.scm.tag}</productVersion>
</properties>
</profile>
Than, in one child module I configured the maven-release-plugin as:
<configuration>
<workingDirectory>c:\LocalViewsRelease\${project.artifactId}-${project.version}</workingDirectory>
<preparationGoals>clean install</preparationGoals>
<releaseProfiles>release</releaseProfiles>
</configuration>
=> this should activate the dummy profile (which is activated by default) and
the release profile - but it does NOT !
[DEBUG] Executing: cmd.exe /X /C "C:\eap\apache-maven-2.2.1\bin\mvn.bat -X -D
maven.repo.local=D:\mavenrepo -D performRelease=true deploy site-deploy"
I could only get this to work copying the dummy profile again into the child
pom.xml.
[DEBUG] Executing: cmd.exe /X /C "C:\eap\apache-maven-2.2.1\bin\mvn.bat -X -D
maven.repo.local=D:\mavenrepo -D performRelease=true -P dummy,release deploy
site-deploy"
The fix should:
- fix MRELEASE-459 first, so no more default profile is needed to get
releaseProfiles to work
- fix the inheritance of (default) profiles during mvn release:perform
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira