Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-child-modules update only first level children #312

Closed
breizh31 opened this issue Oct 16, 2018 · 6 comments
Closed

update-child-modules update only first level children #312

breizh31 opened this issue Oct 16, 2018 · 6 comments
Labels

Comments

@breizh31
Copy link

breizh31 commented Oct 16, 2018

Hello,

I've a multiple level children maven project. Since the 2.6 version, only the first level children are updated by update-child-modules.

I think it is due to : #254

Starts with:
V2

  • V1
    • V1
  • V1

Runs update-child-modules:
V2

  • V2
    • V1
      • V1
  • V2
    • V1

Expects:
V2

  • V2
    • V2
      • V2
  • V2
    • V2

It works fine on 2.5

Thanks

@ghost
Copy link

ghost commented Mar 13, 2019

I also hate this behavior, so I still on 2.5 version.
The behavior is completely contrary and illogical to any maven multi module build logic.

... and apparently only because a single person wanted it differently.
Look here: #190

For me it's clear, that the issue opener of #190 never should use (in his case) C as a submodule of B, when he want to stay on an old parent. But in a multi module build this behavior, since #190 is "fixed", is so illogical...

@jdileonardo
Copy link
Contributor

I'm going off memory from over a year ago but,

It's an update call, not a set

If I recall correctly, It's supposed to update to a version that actually exists. The old implementation was blindly setting the parent to a version that would cause the build to not resolve the parent.

If you're looking to set all child versions, whether they exist or not, wouldn't that be a set-child-modules call?

Technically a "single person didn't want it differently", 3 people felt the goal had an issue.

@ghost
Copy link

ghost commented Mar 13, 2019

Technically a "single person didn't want it differently", 3 people felt the goal had an issue.

Thanks for the clarification that three people have considered the goal as inadequate.
Sorry maybe I expressed something extremely and maybe it sounded unfriendly.

If you're looking to set all child versions, whether they exist or not, wouldn't that be a set-child-modules call?

Yes, from that point of view, looking on the exaclty meaning of "update", you are right and it should be an set-child-modules.

I think, it's the same issue (which was often misunderstood) in the past with the "update-properties/update-property" vs. (the quite new) "set-property" goal (without any sanity).

@breizh31
Copy link
Author

I understand the difference between update and set. But I still do not understand why only 1 level is updated ! Why not 2 or 3 ? Maybe the update depth should be customizable.

Moreover, maybe I am wrong but a Maven project with non synchronized module version tree seems to me quite strange and even illogical. I suppose it can happen, but it's borderline, Isn't it ?

@breizh31
Copy link
Author

In addition to that, our software factory uses the Maven Enforcer plugin with the built-in rule reactorModuleConvergence to enforce that a multi module build follows best practice.

One of this best practice is that all childs inherit the version from their parent and don't define a new version !

@radtriste
Copy link

Hello all,

This does also block us from using version > 2.5, because we have many levels of modules ...

Could we have a resolution on that and having 2 goals set and update ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants