Question

I am using Maven2. I have created a parent POM for my organization. I want the various groups will use it as a parent for their project but I want them to use the latest version. for some reason, using it as a parent with version LATEST doesn't work,

any idea?

Thanks, Ronen.

Was it helpful?

Solution

You don't need to define a new version for every small change you make in the POM.

The version means specific features of an artifact (in a POM are build settings), what I'd do is to declare one version and make all the projects use that version (to use a SNAPSHOT version is a great idea). If you make a small update do it in that version. If you make a bigger change you might want to declare a new version and have all the new POMs to use that version, this way you'll avoid to break old projects by using a new super POM.

OTHER TIPS

Maven version plugin has a goal version:update-parent to set the parent version to the latest parent version.

Just execute

mvn versions:update-parent

in the project which you want to use latest parent version, it modifies the POM files for you.

I think you want to use SNAPSHOT, e.g.

<version>1.2-SNAPSHOT</version>

You need to run mvn with parameter -U in order to force the update of the local metadata files which hold the mappings for LATEST and RELEASE versions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top