Maven 1

Properties aren't being overriden in maven.xml

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.0-rc3
  • Fix Version/s: 1.0-rc3
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP, JDK 1.4.2
  • Number of attachments :
    0

Description

I've just built MAVEN-1_0-BRANCH today (04-30-2004) and I've noticed some strange behavior: I have two goals which use multiproject:install. I set the 'maven.multiproject.includes' property to the POMS that need to be built during each goal. The goal directly below is called first and then the goal below that is called next (as part of the same build).

Now 1.0-rc3 from a couple weeks ago doesn't have this problem (and neither do any earlier releases like 1.0-rc2) but now it looks like when the 'install-samples' is called (the second goal below), the first maven.multiproject.includes value is used because the same components are built again instead of the new ones.

So basically what happens is: all modules defined with ${component.install.includes} are built twice and the modules defined by ${sample.install.includes} are never called.

<goal name="install-components">
<j:set var="maven.multiproject.includes" value="${component.install.includes}"/>
<attainGoal name="multiproject:install"/>
</goal>

the second goal:

<goal name="install-samples">
<j:set var="maven.multiproject.includes"
value="${sample.install.includes}"/>
<attainGoal name="multiproject:install"/>
</goal>

Activity

Hide
Brett Porter added a comment -

it is a side effect of the way plugins are loaded that the first one sets at all. This will be corrected in future versions of Maven, but not 1.0.

Instead of using j:set, you need to use the maven:set tag to set plugin properties from Jelly. I have added this to the FAQ in CVS

Show
Brett Porter added a comment - it is a side effect of the way plugins are loaded that the first one sets at all. This will be corrected in future versions of Maven, but not 1.0. Instead of using j:set, you need to use the maven:set tag to set plugin properties from Jelly. I have added this to the FAQ in CVS
Hide
Chad Brandon added a comment -

Just downloaded maven-1.0-rc3 and attempted to use maven:set to
set my maven-multiproject-plugin property:

<maven:set
plugin="maven-multiproject-plugin"
property="maven.multiproject.includes"
value="${component.install.includes}"/>

Its being ignored by the plugin, I added an echo statement to the maven-multiproject-plugin/plugin.jelly and there is no value for the property. Since <j:set (from jelly core) won't work anymore to set plugin properties and the maven:set doesn't seem to work, is there any way around this?

Show
Chad Brandon added a comment - Just downloaded maven-1.0-rc3 and attempted to use maven:set to set my maven-multiproject-plugin property: <maven:set plugin="maven-multiproject-plugin" property="maven.multiproject.includes" value="${component.install.includes}"/> Its being ignored by the plugin, I added an echo statement to the maven-multiproject-plugin/plugin.jelly and there is no value for the property. Since <j:set (from jelly core) won't work anymore to set plugin properties and the maven:set doesn't seem to work, is there any way around this?

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: