tags:

views:

39

answers:

2

I've just fought for a whole day with a strange maven problem:

I had a custom property called "deployment.name" that was never to resolved to what I configured for it, but rather the maven filtering mechanism always replaced it by the project's name.

I tried the goal "help:expressions" to find out whether this is a preconfigured property, but that goal only throws exceptions in m2eclipse. Google does not seem to know a pre-configured property by that name.

The strangest bit: deployment.somethingelse works perfectly fine, so I ended up replacing ".name" with ".depname", then it works ;.)

+1  A: 

The Maven Super POM defines the common configuration for all Maven projects. The values in that are accessible as properties (and , so that is where most of the properties you generally use come from (e.g. ${project.build.directory}), these are the pretty much the same as the output of help:expressions.

There is no deployment section in the super POM. The only thing I can think of is that the property is being set somewhere else, e.g. in a profile, or overridden by a plugin (though that seems unlikely). You could try running mvn help:effective-pom to see if the property is being set by a profile.

Are you able to post your POM? that might help diagnose it.

Rich Seller
A: 

... I just ran help:effective-pom, and there is no trace of "deployment.name" in the output. I can see all the other properties that I defined though (e.g. "deployment.depname").

Maybe "name" is a reserved attribute of some sort? Maybe debugging into m2eclipse will shed light on this riddle.