Details

Description

If the property are the same in the parent and the child project, then the parent property is not inherited. This is fine for simple properties but breaks for complex properties such as lists. Here's an example:

<!-- Default list of containers to run on. If you want to shorten or change the
execution of 'samples', simply specify a shorter list of containers on the
command line or in your settings -->
<property>
<name>cargo.containers</name>
<value>resin3x, orion2x, tomcat5x, jetty4xEmbedded</value>
</property>

<!-- Location where to download and install the containers for the tests -->
<property>
<name>cargo.install.dir</name>
<value>$

{basedir}

/../../target/installs</value>
</property>

</systemProperties>
</configuration>
</plugin>
</plugins>
</build>

It sounds a reasonable expectations that the system properties will get merged.

Brett Porter
added a comment - 14/Aug/05 16:54 yes, this is the first TODO.
I guess the reason I haven't jumped in is that we might need to consider whether it needs to be able to override in some cases instead of merge. Got any suggestions for syntax?
maybe:
<excludes override="true">
?

Vincent Massol
added a comment - 28/Aug/05 03:25 John,
I'm trying to use this feature with the example above and when I run my build with -X I get:
[DEBUG] Setting system property [cargo.containers] = [resin3x, orion2x, tomcat5x, jetty4xEmbedded]
[DEBUG] Setting system property [cargo.install.dir] = [C:\dev\cargo\samples\java/../../target/installs]
Unfortunately the other properties (cargo.resin3x.port and cargo.resin3x.url) do not seem to be set.
Any idea?
Thanks

No, it was just me not knowing how to use it. I had somehow imagine inheritance would have been automatic and you would only need to specify an attribute for not inheriting...

So it's working even though I find it a tad complex to have to specify an <inheritance> object in the parent's POM and an attribute in the child project. But I'm sure you've weighted pros and cons before reaching this conclusion so that's probably fine...

Vincent Massol
added a comment - 28/Aug/05 15:16 No, it was just me not knowing how to use it. I had somehow imagine inheritance would have been automatic and you would only need to specify an attribute for not inheriting...
So it's working even though I find it a tad complex to have to specify an <inheritance> object in the parent's POM and an attribute in the child project. But I'm sure you've weighted pros and cons before reaching this conclusion so that's probably fine...

I thought inherited=true was the default too, but I do remember we discussed the pros and cons and I trust John to have implemented what we agreed at the time and my memory to have failed me (that part was a while ago)

Brett Porter
added a comment - 28/Aug/05 21:41 I thought inherited=true was the default too, but I do remember we discussed the pros and cons and I trust John to have implemented what we agreed at the time and my memory to have failed me (that part was a while ago)