Maven 2.0 – Versioning Problem

As I mentioned in my profile-description i work for a software-company as the build manager and I’m responsible for the configuration of the build-tool (Maven 2.0). Because our current project is very mightful and complex we decided to configure our own maven-company-repository.

There already have been a few buisness module releases. Our current Snapshot-version of our main framework is 2.0.0-SNAPSHOT. The last days we had a problem with the versioning of our pom-files but finally we’ve found a solution.

The problem was that one of our submodules of our framework asked for a wrong dependency-version when we executed the ‚mvn compile‘ command. That’s because of maven’s inheritance-strategy, but I think you will get a better understanding of the problem if you observe the following diagram.

If you click on the small diagramm a new browser-site will pop up and you will be able to see the original diagram. Because I think the drawing is very self-explanatory I won’t bother you with a too long description of the problem and of course much more important the solution of the problem which is in fact very simple.

You just have to hardcode your versioning-property in your parent-POM and all derived submodules will use the right version for the dependencies. Unfortunately I couldn’t come up with a better solution but you are welcome to post a better way to solve this problem if you have found an other solution.

so long


Über sageniuz
Dieser Beitrag wurde unter Java, Maven, Programming veröffentlicht. Setze ein Lesezeichen auf den Permalink.

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden / Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s