[
https://issues.apache.org/jira/browse/MRELEASE-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17516355#comment-17516355
]
Karl Heinz Marbaise commented on MRELEASE-1077:
-----------------------------------------------
During the {{prepare phase}} only the SCM/pom parts are changed and checked and
later commited. During the {{release:perform}} part the real artifacts etc. are
being generated (build) so to achieve your goal there are two options possible.
* You can use a profile during the {{perform}} (goal) which does already
exists:
[releaseProfile|https://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#releaseProfiles]
which can be set to be activated during the release generation.
* You can also activate a profile via {{arguments}} property like:
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>-PactiveProfile</arguments>
</configuration>
</plugin>
{code}
* A question is comming to my mind: Why not using filtering via
[maven-resources-plugin|https://maven.apache.org/plugins/maven-resources-plugin/]
to set the versions in some locations?
> Support for prepare specific profiles
> -------------------------------------
>
> Key: MRELEASE-1077
> URL: https://issues.apache.org/jira/browse/MRELEASE-1077
> Project: Maven Release Plugin
> Issue Type: New Feature
> Components: prepare
> Affects Versions: 3.0.0-M5
> Reporter: Niels Basjes
> Priority: Minor
>
> In my projects I like to have the latest released version of the software
> shown on the website (which is also in the source tree). I do this using the
> exec plugin which runs a script to write the project version in a few places.
> For this purpose I propose having the option to allow specifying one or more
> profiles that are activated during the prepare phase.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)