[ 
https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299972#comment-299972
 ] 

Darshak Thakore edited comment on MNG-4998 at 5/29/12 7:45 PM:
---------------------------------------------------------------

Hi Evgeny,
yes i had began to look at the <rawProperties> in your version of the 
properties-maven-plugin but then i found your *excellent* [find-maven 
plugin|http://evgeny-goldin.com/wiki/Find-maven-plugin] and it actually helped 
me solve my current problem. As mentioned above in my use case, i wanted some 
mechanism to provide default properties to be used in gnu autotools but wanted 
to allow developers to override them to suit their environment (eg. prefix, 
builddir, installdir, configure options etc). I extracted out all overridable 
properties into a build.props file in the parent root instead of putting them 
in the pom. I used your find-maven-plugin to find the parent root from any 
module/submodule and then simply load the build.props file with the 
org.codehaus.mojo:properties plugin. I also load a file named 
{noformat}"build.${user.name}.props"{noformat} file if it exists. A user can 
override anything they wish from the build.props file into the 
{noformat}build.${user.name}.props{noformat} file. That way i provide defaults 
within the project and a user can override each default from a file that stays 
out of source control. 

Your properties-maven-plugin is also quite powerful and i wish i had found it 
earlier. It would have solved my other dynamic interpolation problems. thanks 
for your plugins though (y), i've already added your artifactory repo as one of 
the default remote-repos to my artifactory server :D


                
      was (Author: darshakthakore):
    Hi Evgeny,
yes i had began to look at the <rawProperties> in your version of the 
properties-maven-plugin but then i found your *excellent* [find-maven 
plugin|http://evgeny-goldin.com/wiki/Find-maven-plugin] and it actually helped 
me solve my current problem. As mentioned above in my use case, i wanted some 
mechanism to provide default properties to be used in gnu autotools but wanted 
to allow developers to override them to suit their environment (eg. prefix, 
builddir, installdir, configure options etc). I extracted out all overridable 
properties into a build.props file in the parent root instead of putting them 
in the pom. I used your find-maven-plugin to find the parent root from any 
module/submodule and then simply load the build.props file with the 
org.codehaus.mojo:properties plugin. I also load a file named 
{noformat}"build.${user.name}.props"{noformat} file if it exists. A user can 
override anything they wish from the build.props file into the 
{noformat}build.${user.name}.props{noformat} file. That way i provide defaults 
within the project and a user can override each default from a file that stays 
out of source control. 

Your properties-maven-plugin is also quite powerful and i wish i had found it 
earlier. It would have solved my other dynamic interpolation problems. thanks 
for your plugins though (y), i've already added your artifactory repo as a 
default remote-repo to my artifactory server :D


                  
> Variables interpolation: dynamic in Maven 2, static in Maven 3
> --------------------------------------------------------------
>
>                 Key: MNG-4998
>                 URL: https://jira.codehaus.org/browse/MNG-4998
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 3.0.2
>            Reporter: Evgeny Goldin
>
> Please, see 
> http://maven.40175.n5.nabble.com/Variables-interpolation-dynamic-in-Maven-2-static-in-Maven-3-td3360336.html.
> It demonstrates two examples where expression with ${variables} are 
> interpolated differently in Maven 2 and Maven 3: Maven 2 allows to update 
> <properties> and effect expressions interpolated later, Maven 3 also allows 
> to update <properties> but all expressions are interpolated with their old 
> values. 
> I believe Maven 2 dynamic behavior is much more preferable than Maven 3 
> Ant-like "stickiness" to what's defined in <properties>.

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


Reply via email to