Giter Club home page Giter Club logo

Comments (6)

khmarbaise avatar khmarbaise commented on August 28, 2024 1

Ok..misunderstanding on my site..

from versions.

djbobyd avatar djbobyd commented on August 28, 2024

I also need such a feature. Please consider implementing it.
Thanks!

from versions.

khmarbaise avatar khmarbaise commented on August 28, 2024

What about offering a PR ?

from versions.

khmarbaise avatar khmarbaise commented on August 28, 2024

It sounds you should use mvn versions:set -DnewVersion=WhatEver instead which will change the versions of all all modules incl. the parent in your multimodule build. So from my point of view it does not really makes sense to use latest-versions inside a multi module build.

from versions.

uvsmtid avatar uvsmtid commented on August 28, 2024

@khmarbaise, this is not the described use case. I believe mvn versions:set -DnewVersion=WhatEver simply sets exactly the same new version for all modules starting from parent (rather than updating the versions of dependencies). In other words, versions of dependencies have to be updated, not versions of the modules themselves. The idea is to keep moving to the latest known versions of internal dependencies - fairly common update procedure.

Now, not all dependencies have to be updated.
The dependencies can be split into two categories:

  • (A) those which groupId:artifactId match those reachable from parent in multi-module reactor build
  • (B) those which groupId:artifactId match those outside of reactor build (external dependencies)

We need to update only those in "category (A)".

For example:

  • Any dependency like A, B, C, D, E, F, G and even root in the description are internal to the multi-module reactor build - they are in "category (A)". So, if C is listed as dependency of E, C's version (in dependency list of E) will be updated to the latest known non-snapshot version (because C is part of the same multi-module reactor build as E). Snapshot versions may also be used but it is already covered as additional by includeSnapshots option.
  • Any dependency outside like log4j:log4j or org.apache.camel:camel-core will stay at the same versions because neither log4j:log4j or org.apache.camel:camel-core is being built starting from the root (based on example in the description).

Again, it is exactly the opposite to what mvn versions:use-latest-versions with excludeReactor does. What would resolve the case is mvn versions:use-latest-versions with something like includeOnlyReactor.

Note that, in general, all those modules in example (A, B, C, D, E, F, G and even root) may actually have different release cycles (with completely different version numbers) - using the same version number for all is not an option. The only thing in common they have is that they are reachable from root (directly or indirectly) via references in <module> tag and, therefore, they are part of the same multi-module reactor build.

One more point. Even though a module is referenced in <module> tag of its parent, the module may never reference its parent in <parent> tag. In other words, child may not necessarily inherit configuration (what <parent> tag does) - child only get referenced to trigger its inclusion into multi-module reactor build (what <module> tag does).

from versions.

iantipenkov avatar iantipenkov commented on August 28, 2024

I'd like to note that the suggested includeOnlyReactor flag would be useful with the versions:set goal as well, and perhaps others.

from versions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.