How to share common properties among several maven projects?
configuration, maven-2, properties-file
Solution
Note that the original idea I have here is something that I am doing, but that I may have found a much better idea which I've also listed out below. I wanted to keep both ideas here for completeness in case the newer idea does not work.
I think you can solve this problem using the parent pom, but you need to have a maven repository and a CI build tool.
I've got several projects which all inherit base properties from a parent POM. We use Java 1.5, so that build property is setup there. Everything is UTF-8. All of the reports that I wish to run, Sonar setup, etc, is inside the parent POM.
Assuming your project is in version control and you've got a CI tool, when you check in, your CI tool can build to POM project and deploy the SNAPSHOT to the maven repos. If your projects point to the SNAPSHOT version of the parent POM, they'll check the repository to validate that they have the latest version...if not they download the latest version. So if you update the parent, all of the other projects will update.
The trick, I suppose is releasing with a SNAPSHOT. I'd say your releases are going to come much less frequently than your changes. So you perform a release of your POM, then update your POMs that inherit from them and check them into version control. Let the devs know that they need to do an update and go from there.
You could just trigger builds there forcing the new POMs into the repository and then have all of the devs pick up the changes automagically upon build.
I've removed the LATEST/RELEASE keywords idea because they do not work for parent POMs. They only work for dependencies or plugins. The problem area is in DefaultMavenProjectBuilder. Essentially it has trouble determining which repository to look for the parent to determine what the latest or release version is. Not sure why this is different for dependencies or plugins though.
It sounds like these would be less painful than having to update the POMs on every change to the parent POM.
Problem
I have several projects built by maven, and I want to share some common properties among them - spring version, mysql driver version, svn base url, etc. - so I can update them once and it will be reflected on all projects. I thought of having a single super pom with all the properties, but if I change one of the problem I need to either increment its version (and to update all the poms inherit from it) or to delete it from all the developers' machines which I don't want to do. Can specify these parameters externally to the pom? I still want to have the external location definition in a parent pom.