Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] Use another pom for dependency resolution in order to use maven-git-versioning-extension


I try to setup our development environment with eclipse, maven and git to be branch-able.

A goot starting point seems to be the which solves the problem of changing the pom-version in each branch and change back on merge.

Unfortunately m2e does not recognize the version changes so if I reference a library with "changed version" it does not resolve this in workspace (as pom is not changed on disk).

pom of lib:


as on branch "feature/myFeature" this will internally changed to myFeature-SNAPSHOT

pom of app:


Obviously M2E does not resolve this from workspace but takes the artifact out of repository (if an install did add this). This is bad for debugging.

I noticed and understand that a real extension support is difficult to achieve.

I have an idea how the resolution problem could be solved but I am currently not aware if this could work. So I would like to discuss this:

The extension has a feature which stores an updated pom as target/.git-versioned-pom.xml. This pom contains the updated version

An m2e connector could create this file automatically.

Now the problem/question: is there any possibility to let the m2e-dependency-resolution use this generated pom in target instead of the pom in root? If yes I think the problem would be solved.

Regards Michael

Back to the top