[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[m2e-dev] Support for gitflow-Extension via m2e-connector - possible solution?
|
Hi,
we use maven in combination with gitflow and
are struggeling (like many others) with the version-updates in the
poms during merge.
There is a great extension
(https://github.com/qoomon/maven-git-versioning-extension/) which
solves nearly everything of the problem.
Only problem is that m2e does not support this
and therefore does not resolve correctly dependencies in the
workspace.
This problem has already been adressed in the
past on the user list
(https://www.eclipse.org/lists/m2e-users/msg05802.html) regarding
a full extension support which is difficult to achieve due to
Fred.
I aggree that a full extension support may be
difficult and or lead to unexpected behaviour. But as especially
the git-flow-version-problem is a big problem for many uers in my
opinion.
I did some research and hacking and I think I
found a possibile solution for (at least the version-extension)
which I want to discuss:
The versioning-extension has the ability to
write the modified pom into target-directory. So I hacked the
POM-resolving to use an alternate location if present for getting
the artifact-coordinates.
I ran the extension manually and triggered the
update project by doing a whitespace-change in the original pom.
This solved the problem.
For a real solution I could image the
following:
- Add an extension-part to the
lifecylceMappingMetadata so we are able to create m2e-connectors
for extensions
- create an extension point for the
m2e-connectors which is called during evaluation (I patched in
ProjectRegistryManager.readMavenProjectFacades) and may return an
alternate value for the mavenProject (the connector may execute
maven and create the patched pom, read this and return it or do
this in memory)
am I missing something?
Regards Michael