Sorry for not answering sooner. I was travelling today. Comments are below.

Aaron Digulla wrote:
Quoting Ralph Goers <[EMAIL PROTECTED]>:

It is currently working as designed. Maven won't resolve properties for
any of the items in the parent section. The pom below would be a
problem if it was actually installed into a repository as it would
require that the property be specified even if the artifact was a
transitive dependency.

I don't follow you here. In the parent pom.xml, I use normal version numbers. All I want is that the current pom.xml allows a property as the version of the parent POM. Even if the current POM gets installed in a repository, it's no problem because (just like when it's local), the property must be set when it's loaded/resolved/whatever.
This is a problem. Anyone who wants to use your artifact, or anyone who wants to use an artifact which uses your artifact would have to set the property. Worse, they really wouldn't have any idea what the proper version should be.

I mean, the repository server isn't going to try to use that string for anything, is it? Maven will download the file, parse it and complain if the property isn't set.
No, the respository wouldn't use that string directly. But having the pom in the repository with the parent version as a variable means that no one would know for sure what the parent version actually is.

I am working on a modification that allows the version to be obtained
by reading the pom located at the relativePath and getting the version
from it, but I still have a couple of issues to resolve. It wouldn't
solve your case though, as even there it won't actually accept a system
property for the version.

Does that mean that I could omit the version tag and just use relativePath? That would work for me. Is that patch for 2.0 or 2.1?
No, you would need the version tag with the version being a "special" symbol. While omitting the version would be nice I'm sure it would break all kinds of existing use cases and that can't be tolerated. I am targeting 2.0, but only if I can be sure it won't break any builds.

What is the most simple way to include common dependencies, plugin configs and properties in many POMs?

I'm using <parent> but as it is, I have to update the version numbers in about 100 files when I change the different parent POMs (and no, the parent pom is not "../pom.xml"; it's somewhere else in the tree and I have three different "parent" POMs).
I have the same problem, which is why I am attempting to solve this. "Standard" maven practice seems to be to use the release plugin and bump up the version numbers even though nothing at all changes. My builds don't do this. We only change the version numbers of projects that have actual modifications, so having to change the version in the pom is really annoying.

I'm aware that there are plans to allow "includes" in Maven 2.1 but I'd like a solution for 2.0.
I'm not really sure what you mean by this. I'm not aware of "includes".

Ralph

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to