Maven 1

Variable/Properties are messed up...

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.0-rc2
  • Fix Version/s: 1.0-rc3
  • Component/s: jelly/ant integration
  • Labels:
    None
  • Number of attachments :
    0

Description

I have the following snippet in a plugin...
<j:set var="destFile" value="${maven.increment.central.entities}/${pom.artifactId}.ent" />
<ant:echo>
${maven.increment.central.entities}
${destFile}
</ant:echo>
<ant:copy tofile="${destFile}"
file="${plugin.resources}/entity-template.ent"
filtering="true"
overwrite="true"
/>

The output is;

[echo]
/home/niclas/dev/opensource/avalon/framework/api/../../buildsystem/../versioning
/home/niclas/dev/opensource/avalon/framework/api/../../buildsystem/../versioning/avalon-framework-api.ent

[copy] Copying 1 file to /home/niclas/dev/opensource/avalon/framework/api/versioning

The destination filename is "avalon-framework-api.ent" but in the wrong directory.

The "maven.increment.central.entities" is read into memory in the maven.xml, by;
<util:properties file="${avalon.buildsystem}/project.properties" />

So, HOW on the earth does the <an:copy> manages to pick up the expression "${plugin-default-value}/${pom.artifactId}.ent", where plugin-default-value is the "maven.increment.central.entities" set in plugin.properties of the plugin??

My conclusion is that there are more than one set of Variables, and both are updated in the <j:set>, since manipulating the "value=" in the <j:set> will give me different printout and different destination file.

Activity

Hide
Brett Porter added a comment -

This is really hard to reproduce as the example is not complete enough. Do you have a sample project reproducing the problem? Will avalon CVS do this running a certain command?

Show
Brett Porter added a comment - This is really hard to reproduce as the example is not complete enough. Do you have a sample project reproducing the problem? Will avalon CVS do this running a certain command?
Hide
Brett Porter added a comment -

reopen if a reproducable test case is found

Show
Brett Porter added a comment - reopen if a reproducable test case is found
Hide
Niclas Hedhman added a comment -

Doesn't matter; I am giving up on Maven for a year or two... No point wasting my time on XML Scripting, mixed variables and properties, and a shaky underlying model.

Show
Niclas Hedhman added a comment - Doesn't matter; I am giving up on Maven for a year or two... No point wasting my time on XML Scripting, mixed variables and properties, and a shaky underlying model.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: