[ 
https://jira.codehaus.org/browse/MRELEASE-844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick van Dissel updated MRELEASE-844:
----------------------------------------

    Description: 
For usage of the {{mvn release:prepare}} command in situations where CLI 
arguments are not possible, I would like to have support for providing the 
plugin user properties via a properties file.

An example situation I need it for, is the following:
CI systems like Jenkins have multiple steps in a single job. Environment 
variables being only in scope for one single step, making it impossible to have 
a maven release plugin userProperty created dynamicly and use the CLI args 
("-D...") to pass userProperties to maven.
Specific use case is passing a custom {{releaseVersion}} and 
{{developmentVersion}}, I noticed for this a nice solution is already on the 
roadmap under the case MRELEASE-431. But I'm sure this new properties file can 
be used in more cases.

As I need this for the release:prepare goal, I currently implemented this only 
for this goal. I've attached the patch "support.user.properties.patch" with my 
implementation. I've fitted it in the maven-release-plugin instead of the 
maven-release-manager as this change is purely about reading configuration that 
is lateron passed to maven-release-manager APIs.

Technical details:
- The properties file to put the user properties in, is currently called 
'release.user.properties'
- Order of reading the user properties is:
-- First read the properties from the pom (where available)
-- Merge the read properties with the properties from the 
release.user.properties
-- Merge the merged properties with user properties provided the command line 
arguments
-- Then call to maven-release-manager API is made, which reads/writes the 
'release.properties' file
- All non-readonly user properties supported by release:prepare are supported
- All properties from the original release.properties file are supported
- I only created a unit-test, as I couldn't find out how integration-tests work 
or where they are located

  was:
For usage of the {{mvn release:prepare}} command in situations where CLI 
arguments are not possible, I would like to have support for providing the 
plugin user properties via a properties file.

An example situation I need it for, is the following:
CI systems like Jenkins have multiple steps in a single job. Environment 
variables being only in scope for one single step, making it impossible to have 
a maven release plugin userProperty created dynamicly and use the CLI args 
("-D...") to pass userProperties to maven.



    
> Support providing user properties via properties file
> -----------------------------------------------------
>
>                 Key: MRELEASE-844
>                 URL: https://jira.codehaus.org/browse/MRELEASE-844
>             Project: Maven 2.x Release Plugin
>          Issue Type: Improvement
>          Components: prepare
>    Affects Versions: 2.4.1, 2.5
>            Reporter: Patrick van Dissel
>         Attachments: support.user.properties.patch
>
>
> For usage of the {{mvn release:prepare}} command in situations where CLI 
> arguments are not possible, I would like to have support for providing the 
> plugin user properties via a properties file.
> An example situation I need it for, is the following:
> CI systems like Jenkins have multiple steps in a single job. Environment 
> variables being only in scope for one single step, making it impossible to 
> have a maven release plugin userProperty created dynamicly and use the CLI 
> args ("-D...") to pass userProperties to maven.
> Specific use case is passing a custom {{releaseVersion}} and 
> {{developmentVersion}}, I noticed for this a nice solution is already on the 
> roadmap under the case MRELEASE-431. But I'm sure this new properties file 
> can be used in more cases.
> As I need this for the release:prepare goal, I currently implemented this 
> only for this goal. I've attached the patch "support.user.properties.patch" 
> with my implementation. I've fitted it in the maven-release-plugin instead of 
> the maven-release-manager as this change is purely about reading 
> configuration that is lateron passed to maven-release-manager APIs.
> Technical details:
> - The properties file to put the user properties in, is currently called 
> 'release.user.properties'
> - Order of reading the user properties is:
> -- First read the properties from the pom (where available)
> -- Merge the read properties with the properties from the 
> release.user.properties
> -- Merge the merged properties with user properties provided the command line 
> arguments
> -- Then call to maven-release-manager API is made, which reads/writes the 
> 'release.properties' file
> - All non-readonly user properties supported by release:prepare are supported
> - All properties from the original release.properties file are supported
> - I only created a unit-test, as I couldn't find out how integration-tests 
> work or where they are located

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to