[ https://issues.apache.org/jira/browse/MRELEASE-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551435#comment-17551435 ]
Pablo Caraballo Llorente edited comment on MRELEASE-282 at 6/8/22 9:31 AM: --------------------------------------------------------------------------- Hello. I believe this issue remains with the latest version of the plugin (at this moment 3.0.0-M5). If I declare different arguments for {{prepare}} and {{perform}}, only the firsts one are used. For example, the following configuration: {code} <executions> <execution> <id>release-prepare</id> <goals> <goal>prepare</goal> </goals> <configuration> <arguments>-Denforcer.skip=true</arguments> </configuration> </execution> <execution> <id>release-perform</id> <goals> <goal>perform</goal> </goals> <configuration> <goals>deploy</goals> <arguments>-DskipTests</arguments> </configuration> </execution> </executions> {code} -Applies every time {{-Denforcer.skip=true}} either I run {{release:prepare@release-prepare}} or {{release:perform@release-perform}}. If there's no alternative configuration that may apply each arguments for each goal, could we re-open the issue?- EDIT: actually the _bug_ occurs because when I execute {{release:perform}} after a {{release:prepare}}, it parses the contents of the autogenerated {{release.properties}} file, overriding my configuration in the {{pom.xml}} file. Renaming these properties would just solve it. Thanks. was (Author: paleloser): Hello. I believe this issue remains with the latest version of the plugin (at this moment 3.0.0-M5). If I declare different arguments for {{prepare}} and {{perform}}, only the firsts one are used. For example, the following configuration: {code} <executions> <execution> <id>release-prepare</id> <goals> <goal>prepare</goal> </goals> <configuration> <arguments>-Denforcer.skip=true</arguments> </configuration> </execution> <execution> <id>release-perform</id> <goals> <goal>perform</goal> </goals> <configuration> <goals>deploy</goals> <arguments>-DskipTests</arguments> </configuration> </execution> </executions> {code} Applies every time {{-Denforcer.skip=true}} either I run {{release:prepare@release-prepare}} or {{release:perform@release-perform}}. If there's no alternative configuration that may apply each arguments for each goal, could we re-open the issue? Thanks. > Replace the current 'arguments' parameter with specialized version for each > mojo (eg. 'argumentsRelease') > --------------------------------------------------------------------------------------------------------- > > Key: MRELEASE-282 > URL: https://issues.apache.org/jira/browse/MRELEASE-282 > Project: Maven Release Plugin > Issue Type: Improvement > Components: prepare > Affects Versions: 2.0-beta-6 > Environment: mvn 2.0.7 > WinXP > Reporter: Marcel Schutte > Priority: Major > > There is currently no way to configure the release:prepare and > release:perform mojos with different values for the 'arguments' parameter. > Brett said the solution should be to use unique names for the parameters [1] > [2]. > I am aware that it is possible to use profiles for this. However, I want to > declare the default behavior in my pom, not leave it to the user to provide > the correct profile. > There is a workaround available [3], however, this means you have to > duplicate the default values for <goals> and <preparationGoals) in your > plugin configuration. > Some context for this improvement request is [4] > [1] http://jira.codehaus.org/browse/MNG-1446 > [2] http://jira.codehaus.org/browse/MCOMPILER-15 > [3] http://jira.codehaus.org/browse/MRELEASE-59 > [4] http://www.nabble.com/release-plugin-configuration-tf4377660s177.html -- This message was sent by Atlassian Jira (v8.20.7#820007)