You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Evgeny Goldin (JIRA)" <ji...@codehaus.org> on 2011/01/28 18:08:58 UTC

[jira] Created: (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Variables interpolation: dynamic in Maven 2, static in Maven 3
--------------------------------------------------------------

                 Key: MNG-4998
                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Darshak Thakore (JIRA)" <ji...@codehaus.org>.
    [ 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

       

[jira] (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Darshak Thakore (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299972#comment-299972 ] 

Darshak Thakore commented on MNG-4998:
--------------------------------------

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

       

[jira] (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Evgeny Goldin (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=300342#comment-300342 ] 

Evgeny Goldin commented on MNG-4998:
------------------------------------

Thanks for your kind words, Darshak. Appreciate it. Let me know if you have any ideas to make it better. So far it helped me a lot with creating dynamic Maven properties using Groovy expressions. And sorry for off-topic, guys.
                
> 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

        

[jira] (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Darshak Thakore (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299880#comment-299880 ] 

Darshak Thakore edited comment on MNG-4998 at 5/28/12 11:03 AM:
----------------------------------------------------------------

I recently ended up on this issue thru the thread mentioned in the description while i was searching for the solution to the same problem. I was mavenizing one of our mixed project (c, c++ and java) and was using the properties-maven-plugin along with the cbuilds plugins to mavenize my gnu autotools project. As part of that, i had defined various defaults in the pom file for autoconf and make but i needed a mechanism for the user to override those defaults and the most logical and concise way i could find was by using the properties-maven-plugin to read various parameters from a properties file. However when i run the project under maven3, i'm suffering this static vs dynamic interpolation.
I thought i'll comment here with my use case to push for either maven2 like behavior or Luke's suggestion above. I think without either of those, we seem to be crippling the usability of maven 3.
                
      was (Author: darshakthakore):
    I recently ended up on this issue thru [this thread|http://maven.40175.n5.nabble.com/Variables-interpolation-dynamic-in-Maven-2-static-in-Maven-3-td3360336.html] while i was searching for the solution to the same problem. I was mavenizing one of our mixed project (c, c++ and java) and was using the properties-maven-plugin along with the cbuilds plugins to mavenize my gnu autotools project. As part of that, i had defined various defaults in the pom file for autoconf and make but i needed a mechanism for the user to override those defaults and the most logical and concise way i could find was by using the properties-maven-plugin to read various parameters from a properties file. However when i run the project under maven3, i'm suffering this static vs dynamic interpolation.
I thought i'll comment here with my use case to push for either maven2 like behavior or Luke's suggestion above. I think without either of those, we seem to be crippling the usability of maven 3.
                  
> 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

        

[jira] Commented: (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Evgeny Goldin (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253919#action_253919 ] 

Evgeny Goldin commented on MNG-4998:
------------------------------------

Hi Luke,

I think it can work as a workaround, i.e., not having a predefined property. But in my case I have them with nice default values which are sometimes overridden later. But having no choice I'll give up on defaults, of course.

> Variables interpolation: dynamic in Maven 2, static in Maven 3
> --------------------------------------------------------------
>
>                 Key: MNG-4998
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Evgeny Goldin (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299889#comment-299889 ] 

Evgeny Goldin commented on MNG-4998:
------------------------------------

Darshak, I've used [{{<rawProperties>}}|http://evgeny-goldin.com/wiki/Properties-maven-plugin#.3CrawProperties.3E] in my own [{{"properties-maven-plugin"}}|http://evgeny-goldin.com/wiki/Properties-maven-plugin]. This way default properties are also created dynamically and thus can be overridden later. I'm very sceptic about seeing this behavior changed in Maven 3.
                
> 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

        

[jira] Commented: (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "luke w patterson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253734#action_253734 ] 

luke w patterson commented on MNG-4998:
---------------------------------------

what about using a new expression like ${project.properties.myProperty} ?

in the <plugin> <configuration> section, it will be resolved dynamic/lazy

in other sections either:
 * not interpolated (evaluates to the original string of "${project.properties.myProperty}")
 * it is resolved static/eager

the existing references to ${myProperty} would be resolved just like they are now

> Variables interpolation: dynamic in Maven 2, static in Maven 3
> --------------------------------------------------------------
>
>                 Key: MNG-4998
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Christian Gleissner (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=281177#comment-281177 ] 

Christian Gleissner commented on MNG-4998:
------------------------------------------

Hi Luke,

your suggestion seems to be a good compromise between the Maven 2 behavior and how Maven 3.0.x handles properties. I would very much appreciate if the Maven 2 ability to redefine properties could be preserved for Maven 3. As you mentioned, the properties section could then be used for defining defaults which specific plugins may chose to override, only visible within their local configuration contexts. Evgeny's approach to use Groovy snippets for this is very innovative and I'd like to use this in Maven 3.

Thanks
Christian

> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Darshak Thakore (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299880#comment-299880 ] 

Darshak Thakore commented on MNG-4998:
--------------------------------------

I recently ended up on this issue thru [this thread|http://maven.40175.n5.nabble.com/Variables-interpolation-dynamic-in-Maven-2-static-in-Maven-3-td3360336.html] while i was searching for the solution to the same problem. I was mavenizing one of our mixed project (c, c++ and java) and was using the properties-maven-plugin along with the cbuilds plugins to mavenize my gnu autotools project. As part of that, i had defined various defaults in the pom file for autoconf and make but i needed a mechanism for the user to override those defaults and the most logical and concise way i could find was by using the properties-maven-plugin to read various parameters from a properties file. However when i run the project under maven3, i'm suffering this static vs dynamic interpolation.
I thought i'll comment here with my use case to push for either maven2 like behavior or Luke's suggestion above. I think without either of those, we seem to be crippling the usability of maven 3.
                
> 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

        

[jira] Commented: (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "luke w patterson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253921#action_253921 ] 

luke w patterson commented on MNG-4998:
---------------------------------------

maybe ${project.properties.myProperty} could be initialized if ${myProperty} isn't null

how about -

for non-<plugin><configuration> sections:
* ${project.properties.myProperty} is evaluated static/eager to whatever ${myProperty} evaluates to
* if ${myProperty} is null, then it is left as "${project.properties.myProperty}"

for <plugin><configuration> sections:
* ${project.properties.myProperty} is initialized with whatever ${myProperty} evaluates to
* plugins can override the initial value
* the "effective-pom"/pre-run interpolation always sees/displays it as "${project.properties.myProperty}"

> Variables interpolation: dynamic in Maven 2, static in Maven 3
> --------------------------------------------------------------
>
>                 Key: MNG-4998
>                 URL: http://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 contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4998) Variables interpolation: dynamic in Maven 2, static in Maven 3

Posted by "Evgeny Goldin (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=299889#comment-299889 ] 

Evgeny Goldin edited comment on MNG-4998 at 5/28/12 2:06 PM:
-------------------------------------------------------------

Darshak, I've used [{{<rawProperties>}}|http://evgeny-goldin.com/wiki/Properties-maven-plugin#.3CrawProperties.3E] in my own [{{"properties-maven-plugin"}}|http://evgeny-goldin.com/wiki/Properties-maven-plugin] to bypass this problem. This way default properties are also created dynamically and thus can be overridden later. I'm very sceptical about seeing this behavior changed in Maven 3.
                
      was (Author: evgeny.goldin):
    Darshak, I've used [{{<rawProperties>}}|http://evgeny-goldin.com/wiki/Properties-maven-plugin#.3CrawProperties.3E] in my own [{{"properties-maven-plugin"}}|http://evgeny-goldin.com/wiki/Properties-maven-plugin]. This way default properties are also created dynamically and thus can be overridden later. I'm very sceptic about seeing this behavior changed in Maven 3.
                  
> 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