Maven “versions” plugin - how to exclude alpha/beta versions from reponse?

匿名 (未验证) 提交于 2019-12-03 01:49:02

问题:

I have an issue concerning the plugin versions.

When it generates a report with the goal:

mvn versions:display-dependency-updates 

It suggest is a lot of libraries that with beta or alpha versions.

 org.hibernate:hibernate-validator ......... 4.2.0.Final -> 4.3.0.Beta1 

The issue is that event if the goal of this plugin is to show the very latest versions of each dependency, I don't want to use beta/alpha versions for production code. But I don't want to search manually the last stable version neither.

I've tried the 'comparisonMethod' option: numeric, maven, etc. No success whatsoever.

Any ideas for the plugin 'versions' to show the latests available versions of dependencies, but without including beta/alpha?

回答1:

You can configure the versions plugin like this:

org.codehaus.mojoversions-maven-plugin2.1someUrl

someUrl can also be a file URL. The syntax of the rules file is given in http://www.mojohaus.org/versions-maven-plugin/version-rules.html, it may contain something like this:

.*-beta..*_ALPHA


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!