Comments (5)
Hi,
I about 130 small projects.
A few years back I face the same problem.
What I did to write a program that collect all the dependencies and create aggregated POM and then run the org.apache.maven.shared.invoker.Invoker to do the job.
I use maven.version.rules = file:///K:/JavaAPPs/MyMaven/maven.version.rules.xml
<ignoreVersions>
<ignoreVersion type="regex">(?i).*(-alpha|.alpha|beta|-ea|-m1|-m2|-m3|-m4|cr|rc).*</ignoreVersion>
</ignoreVersions>
<rules>
<rule groupId="org.apache.maven.archetypes" artifactId="maven-archetype-quickstart" comparisonMethod="maven">
<ignoreVersions>
<ignoreVersion type="regex">(?i).*</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="com.google.guava" comparisonMethod="maven">
<ignoreVersions>
<ignoreVersion type="regex">(?i).*(android).*</ignoreVersion>
</ignoreVersions>
</rule>
<rule groupId="org.openjfx" comparisonMethod="maven">
<ignoreVersions>
<ignoreVersion type="regex">(?i).*(20.0.1).*</ignoreVersion>
</ignoreVersions>
</rule>
</rules>
Another program use a list of dependencies to scan the projects and for each found run "versions:use-next-releases"
Regards.
p.s. I will be happy to share the code. please let me know.
from versions.
That's interesting. But the question I still have, why does the default approach not work (the ignore rules and exclude parameters). Is it because submodules are used? Or is it something different?
from versions.
I do not use submodules so I can't say.
Have you tried my rules just to omit problems with regular expressions ?
from versions.
I copied your rules.
I had to change one so "-ea" will work.
<!-- <ignoreVersion type="regex">.*[-_\.](alpha|Alpha|ALPHA|b|beta|Beta|BETA|rc|RC|M|EA)[-_\.]?[0-9]*</ignoreVersion> -->
<ignoreVersion type="regex">(?i).*(alpha|Alpha|ALPHA|b|beta|Beta|BETA|rc|RC|M|EA).*</ignoreVersion>
from versions.
I found out that (probably due to a misconfiguration) the rules.xml wasn't applied. So even when I made the XML file invalid it didn't give an error.
The configuration that worked for me was:
project pom.xml
<properties>
<maven.versions.rules>file:///${project.basedir}/rules.xml</maven.versions.rules>
<properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.15.0</version>
<configuration>
<rulesUri>${maven.versions.rules}</rulesUri>
</configuration>
</plugin>
</plugins>
</build>
pom.xml for every submodule
<properties>
<maven.versions.rules>file:///${project.basedir}/../rules.xml</maven.versions.rules>
</properties>
Thanks for your help
from versions.
Related Issues (20)
- depManagement from parent should be used with processDependencyManagementTransitive=false HOT 1
- Release 2.16.1 HOT 1
- 2.16.1 - failed test it-display-plugin-updates-006 HOT 3
- NullPointerException: Cannot invoke "Object.toString()" because "otherVersion" is null HOT 1
- display-parent-updates should support allowMajorUpdates, allowMinorUpdates and related parameters HOT 2
- 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
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.