Reputation: 37832
I have a Maven project which depends on Javassist version 3.12.1.GA, and has 2 repositories (in addition to the central one): JBoss (https://repository.jboss.org/nexus/content/groups/public) and Java.net (http://download.java.net/maven/2).
Here are the latest available versions of Javassist per repository:
When I run mvn versions:display-dependency-updates
, it says that I could upgrade the Javassist version:
javassist:javassist ......... 3.12.1.GA -> 3.3
That means 3.3 > 3.12.1.GA
, which, in this specific case, isn't true!
How can I tell the versions plugin that it should not touch javassist, or that it should use another order for this specific dependency?
Upvotes: 3
Views: 611
Reputation: 44565
The cause is, that Maven treats version numbers, which aren't in the Maven format, as string, and therefore 3.3 is bigger than 3.12.1.GA You can use the versions-maven-plugin and define an exclude for javassist ( -Dexcludes=javassist:javassist). Or you can write your own version comparing and use that as ruleset.
If you are running your own repository manager, then you can of course add the javassist jar manually there with a correct Maven version numbering, so that the versions-maven-plugin would work as intended.
Upvotes: 2