No, there isn't. You always have to specify parent's version. Fortunately, it is inherited as the module's version what is desirable in most cases. Moreover, this parent's version declaration is bumped automatically by Maven Release Plugin, so - in fact - it's not a problem that you have version in 2 places as long as you use Maven Release Plugin for releasing or just bumping versions. Notice that there are some cases when this behaviour is actually pretty OK and gives more flexibility you may need.

Most

Sometimes you want to use some of previous parent's version to inherit, however that's not a mainstream case. EFox's answer worked for a single project, but not when I was referencing a module from another one (the pom.xml were still stored in my.m2 with the property instead of the version). However, it works if you combine it with the flatten-maven-plugin, since it generates the poms with the correct version, not the property. The only option I changed in the plug-in definition is the outputDirectory, it's empty by default, but I prefer to have it in target, which is set in my.gitignore configuration: org.codehaus.mojo flatten-maven-plugin 1.0.1 true target flatten process-resources flatten The plug-in configuration goes in the parent pom.xml.

Attention, Internet Explorer User Announcement: Jive has discontinued support for Internet Explorer 7 and below. In order to provide the best platform for continued innovation, Jive no longer supports Internet Explorer 7. Jive will not function with this version of Internet Explorer. Please consider upgrading to a more recent version of Internet Explorer, or trying another browser such as Firefox, Safari, or Google Chrome.

Maven Project Version Management The Most Elegant Software For Mac

Maven Project Version Management The Most Elegant Software For Mac Mac

(Please remember to honor your company's IT policies before installing new software!).

Coments are closed