Comments (6)
Ok..misunderstanding on my site..
from versions.
I also need such a feature. Please consider implementing it.
Thanks!
from versions.
What about offering a PR ?
from versions.
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.
@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 evenroot
in the description are internal to the multi-module reactor build - they are in "category (A)". So, ifC
is listed as dependency ofE
,C
's version (in dependency list ofE
) will be updated to the latest known non-snapshot version (becauseC
is part of the same multi-module reactor build asE
). Snapshot versions may also be used but it is already covered as additional byincludeSnapshots
option. - Any dependency outside like
log4j:log4j
ororg.apache.camel:camel-core
will stay at the same versions because neitherlog4j:log4j
ororg.apache.camel:camel-core
is being built starting from theroot
(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.
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)
- Regression in 2.16.1: class java.util.HashMap$Node cannot be cast to class java.util.HashMap$TreeNode HOT 3
- Command to automate updating version to next minor or major snapshot version
- display-parent-updates follow-up HOT 2
- "Includes" in the set-properties goal does not seem to respect wildcards of the form com.foo.* HOT 3
- Versions Maven Plugin 2.15.0 ignores allowMajorUpdates flag HOT 1
- Need dependency updates listed to be limited by a restriction on another dependency. HOT 1
- display-plugin-updates shows downgrades HOT 1
- Should detect requireMavenVersion by rules not by id HOT 5
- Support build by JDK 21
- versions:set does behave wrong when parent version is the same as the version to be set
- Show multiple newer versions for each artifact
- ParserNotFoundException on dependency-updates-aggregate-report (2.16.2) HOT 2
- Add a ability to limit versions to Java version
- Disable all reports
- versions:update-parent 2.16.2 not respecting range when allowDowngrade is set to true
- Enhancement: Goal to update plugin versions. HOT 1
- Incorrect implementation of org.codehaus.mojo.versions.CompareDependenciesMojo#getRemoteMavenProject method HOT 1
- maven-jar-plugin update not discovered HOT 2
- Add goal that works with Maven CI Friendly Versions and set property (revision) based on git tag HOT 17
- [feature] EOL tracking with release date of current dependency version HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from versions.