0

I have a multi-module maven project.

MyProject
├── ModuleA
│   ├── ...
│   └── pom.xml
├── ModuleB
│   ├── ...
│   └── pom.xml
├── ...
└── pom.xml

I want to specify a groupId (com.myCompany.myProject), and find and update the dependencies that fall into that groupId in all modules (something similar to npm outdated and npm update by scope in JS/NPM world).

Also, I prefer to run these commands using CLI (instead of hardcoding in pom.xml) because the groupId will be determined by a script dynamically.

How can I achieve this with maven?

Thilina Ashen Gamage
  • 1,367
  • 1
  • 12
  • 21

2 Answers2

0

Something like

versions:use-latest-versions -Dincludes=com.myCompany.myProject:*:*:*:*

?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
0

You increment the minor version like this:

mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0 versions:commit

or with fixed number of version:

mvn  build-helper:parse-version versions:set -DnewVersion=1.13.7.15 versions:commit
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Yu Jiaao
  • 4,444
  • 5
  • 44
  • 57