List Info

Thread: Created: (MNG-2640) Expressions in POMs are not modified when the Maven Project is updated




Created: (MNG-2640) Expressions in POMs are not modified when the Maven Project is updated
user name
2006-10-30 00:16:52
Expressions in POMs are not modified when the Maven Project
is updated
------------------------------------------------------------
----------

                 Key: MNG-2640
                 URL: http://jira.
codehaus.org/browse/MNG-2640
             Project: Maven 2
          Issue Type: Bug
          Components: Inheritence and Interpolation
    Affects Versions: 2.0.4
            Reporter: Vincent Massol


In the Clover plugin I'm modifying the finalName with:

{code:java}
getProject().getBuild().setFinalName(
getProject().getArtifactId() + "-" +
getProject().getVersion() + "-clover" );


This works fine and all subsequent plugins using the
MavenProject object do work fine. However if the user uses,
say, the AntRun plugin and uses the
${project.build.fineName} expression in his POM it'll return
the original value and not the one modified by the Clover
plugin. For example if the user is using the AntRun plugin
combined with xdoclet Ant tasks to generate files, they
won't be put in the correct target directories when used
with the Clover plugin and the build will fail...

See http://jir
a.codehaus.org/browse/MCLOVER-59 for an issue filed
against the Clover plugin on this.

I think we need a way for reevaluating interpolated
expressions when the model is changed.

Thanks
-Vincent

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        
Commented: (MNG-2640) Expressions in POMs are not modified when the Maven Project is updated
user name
2006-10-30 00:17:06
    [ http://jira.codehaus.org/browse/MNG-2640?page
=comments#action_78759 ] 
            
Chris Tucker commented on MNG-2640:
-----------------------------------

In DefaultMavenProjectBuilder.processProjectLogic:
        // TODO: this is a hack to ensure MNG-2124 can be
satisfied without triggering MNG-1927
        //  MNG-1927 relies on the false assumption that
${project.build.*} evaluates to null, which occurs before
        //  MNG-2124 is fixed. The null value would leave it
uninterpolated, to be handled after path translation.
        //  Until these steps are correctly sequenced, we
guarantee these fields remain uninterpolated.
        context.put( "build.directory", null );
        context.put( "build.outputDirectory", null
);
        context.put( "build.testOutputDirectory",
null );
        context.put( "build.sourceDirectory", null
);
        context.put( "build.testSourceDirectory",
null );

My guess is that this is the same bug, and that adding
build.finalName to that list would fix the problem (albeit
in a rather unclean fashion).  MNG-2186, MNG-1927, and
MNG-2124 have a little more information, but the
manifestation/reporting of the issue is rather different in
each case.  Unfortunately I don't have access to a machine
for testing right now.

Also of interest, Brett's comment on the checkin of that
fix:
[MNG-2186] correct the regression of MNG-1927 from the
solution of MNG-2124
The interpolator was only working based on an incorrect
assumption for a limited set of expressions. This assumption
is
guaranteed by the solution in the interim, until it can be
properly reconsidered. The proper solution would be to not
cache an interpolated model, and to apply path translation
and then interpolation after retrieving the cached model.
However,
this will require some other related changes and should be
planned for 2.1.

The caching of the interpolated model appears to be the
problem here as well (as evidenced through the use of
help:effective-pom to see the cached values).

Cheers,
Chris

> Expressions in POMs are not modified when the Maven
Project is updated
>
------------------------------------------------------------
----------
>
>                 Key: MNG-2640
>                 URL: http://jira.
codehaus.org/browse/MNG-2640
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritence and Interpolation
>    Affects Versions: 2.0.4
>            Reporter: Vincent Massol
>
> In the Clover plugin I'm modifying the finalName with:
> {code:java}
> getProject().getBuild().setFinalName(
getProject().getArtifactId() + "-" +
getProject().getVersion() + "-clover" );
> 
> This works fine and all subsequent plugins using the
MavenProject object do work fine. However if the user uses,
say, the AntRun plugin and uses the
${project.build.fineName} expression in his POM it'll return
the original value and not the one modified by the Clover
plugin. For example if the user is using the AntRun plugin
combined with xdoclet Ant tasks to generate files, they
won't be put in the correct target directories when used
with the Clover plugin and the build will fail...
> See http://jir
a.codehaus.org/browse/MCLOVER-59 for an issue filed
against the Clover plugin on this.
> I think we need a way for reevaluating interpolated
expressions when the model is changed.
> Thanks
> -Vincent

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        
Commented: (MNG-2640) Expressions in POMs are not modified when the Maven Project is updated
country flaguser name
United States
2007-05-11 14:45:12
    [ http://jira.codehaus.org/browse/MNG-2640?page=com
.atlassian.jira.plugin.system.issuetabpanels:comment-tabpane
l#action_95690 ] 

Daniel Gredler commented on MNG-2640:
-------------------------------------

Any news on this? We've had to apply this patch locally to
fix our build environment...

> Expressions in POMs are not modified when the Maven
Project is updated
>
------------------------------------------------------------
----------
>
>                 Key: MNG-2640
>                 URL: http://jira.
codehaus.org/browse/MNG-2640
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.4
>            Reporter: Vincent Massol
>         Attachments: MNG-2640.diff
>
>
> In the Clover plugin I'm modifying the finalName with:
> {code:java}
> getProject().getBuild().setFinalName(
getProject().getArtifactId() + "-" +
getProject().getVersion() + "-clover" );
> 
> This works fine and all subsequent plugins using the
MavenProject object do work fine. However if the user uses,
say, the AntRun plugin and uses the
${project.build.fineName} expression in his POM it'll return
the original value and not the one modified by the Clover
plugin. For example if the user is using the AntRun plugin
combined with xdoclet Ant tasks to generate files, they
won't be put in the correct target directories when used
with the Clover plugin and the build will fail...
> See http://jir
a.codehaus.org/browse/MCLOVER-59 for an issue filed
against the Clover plugin on this.
> I think we need a way for reevaluating interpolated
expressions when the model is changed.
> Thanks
> -Vincent

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        

Updated: (MNG-2640) Expressions in POMs are not modified when the Maven Project is updated
country flaguser name
United States
2007-06-01 16:55:59
     [ http:/
/jira.codehaus.org/browse/MNG-2640?page=com.atlassian.jira.p
lugin.system.issuetabpanels:all-tabpanel ]

John Casey updated MNG-2640:
----------------------------

    Patch Submitted:   (was: [Yes])

The supplied patch only addresses the build.finalName
expression, not any number of other values in MavenProject
(or Model, which is what we're really talking about).

IMO, we need to address this more generally, rather than
continue adding to the exceptions list Brett put together to
satisfy one funky little case we had that depended on broken
functionality.

> Expressions in POMs are not modified when the Maven
Project is updated
>
------------------------------------------------------------
----------
>
>                 Key: MNG-2640
>                 URL: http://jira.
codehaus.org/browse/MNG-2640
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.4
>            Reporter: Vincent Massol
>         Attachments: MNG-2640.diff
>
>
> In the Clover plugin I'm modifying the finalName with:
> {code:java}
> getProject().getBuild().setFinalName(
getProject().getArtifactId() + "-" +
getProject().getVersion() + "-clover" );
> 
> This works fine and all subsequent plugins using the
MavenProject object do work fine. However if the user uses,
say, the AntRun plugin and uses the
${project.build.fineName} expression in his POM it'll return
the original value and not the one modified by the Clover
plugin. For example if the user is using the AntRun plugin
combined with xdoclet Ant tasks to generate files, they
won't be put in the correct target directories when used
with the Clover plugin and the build will fail...
> See http://jir
a.codehaus.org/browse/MCLOVER-59 for an issue filed
against the Clover plugin on this.
> I think we need a way for reevaluating interpolated
expressions when the model is changed.
> Thanks
> -Vincent

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        

Commented: (MNG-2640) Expressions in POMs are not modified when the Maven Project is updated
country flaguser name
United States
2007-11-07 03:21:36
    [ http://jira.codehaus.org/browse/MNG-2640?page=co
m.atlassian.jira.plugin.system.issuetabpanels:comment-tabpan
el#action_113061 ] 

Jussi Vesala commented on MNG-2640:
-----------------------------------

Hello!

Do we have any news on this? Fixing this would make my life
a lot easier.

> Expressions in POMs are not modified when the Maven
Project is updated
>
------------------------------------------------------------
----------
>
>                 Key: MNG-2640
>                 URL: http://jira.
codehaus.org/browse/MNG-2640
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.4
>            Reporter: Vincent Massol
>             Fix For: Reviewed Pending Version
Assignment
>
>         Attachments: MNG-2640.diff
>
>
> In the Clover plugin I'm modifying the finalName with:
> {code:java}
> getProject().getBuild().setFinalName(
getProject().getArtifactId() + "-" +
getProject().getVersion() + "-clover" );
> 
> This works fine and all subsequent plugins using the
MavenProject object do work fine. However if the user uses,
say, the AntRun plugin and uses the
${project.build.fineName} expression in his POM it'll return
the original value and not the one modified by the Clover
plugin. For example if the user is using the AntRun plugin
combined with xdoclet Ant tasks to generate files, they
won't be put in the correct target directories when used
with the Clover plugin and the build will fail...
> See http://jir
a.codehaus.org/browse/MCLOVER-59 for an issue filed
against the Clover plugin on this.
> I think we need a way for reevaluating interpolated
expressions when the model is changed.
> Thanks
> -Vincent

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators: h
ttp://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atl
assian.com/software/jira

        

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )