[
https://jira.codehaus.org/browse/MRELEASE-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283191#comment-283191
]
Stephen Connolly commented on MRELEASE-239:
-------------------------------------------
One solution would be to create a profile that executes your required plugins
and change the preparation goals to
<preparationGoals>-Pprepare-release</preparationGoals>
where the profile would look something like
<profile>
<id>prepare-release</id>
<build>
<defaultGoal>initialize</defaultGoal> <!-- the phase that you are binding
scm:checkin to -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-release</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>fm.last.maven</groupId>
<artifactId>changelog-maven-plugin</artifactId>
<executions>
<execution>
<id>prepare-release</id>
<phase>validate</phase>
<goals>
<goal>verify</goal> <!-- if this has to happens-before
buildnumber then you will need to use a third phase rather than just validate
and initialize, moving the buildnumber and update goals to the initialize phase
and the scm:checkin to the generate-sources phase (or you could hijack the
clean lifecycle (which might be no harm) and use pre-clean, clean and
post-clean) -->
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<executions>
<execution>
<id>prepare-release</id>
<phase>initialize</phase>
<goals>
<goal>checkin</goal>
</goals>
</execution>
</executions>
</plugin>
But you should create a separate bug for the line separator issue anyway
> release:perform and release:prepare should accept multi-line
> goals/preparationGoals configurations
> --------------------------------------------------------------------------------------------------
>
> Key: MRELEASE-239
> URL: https://jira.codehaus.org/browse/MRELEASE-239
> Project: Maven 2.x Release Plugin
> Issue Type: Improvement
> Components: prepare
> Affects Versions: 2.0-beta-6
> Reporter: Steve Rowe
> Assignee: Stephen Connolly
> Priority: Minor
> Fix For: 2.2.1
>
> Attachments: ForkedMavenExecutor.patch
>
>
> When I specify a list of goals in my POM that span multiple lines (see an
> example below), only those goals before the newline are executed when I run
> "mvn release:perform".
> I have only noticed this for release:perform, but given what the code looks
> like, I assume it's an issue for release:prepare too.
> This is a minor problem, but an irritating one, because release:peform claims
> to successfully complete without actually executing all specified goals.
> I attach a patch to ForkedMavenExecutor.java that splits the goals list on
> newlines and carriage returns, in addition to the comma and space split
> characters that were there already.
> Here's an example configuration that will trigger the problem:
> <plugin>
> <artifactId>maven-release-plugin</artifactId>
> <configuration>
> ...
> <goals>
> package group:first-goal group:second-goal group:third-goal
> site-deploy changes:announcement-generate
> changes:announcement-mail
> </goals>
> </configuration>
> </plugin>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira