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

后端 未结 1 1465
野的像风
野的像风 2020-12-30 21:52

I have an issue concerning the plugin versions.

When it generates a report with the goal:

mvn versions:display-dependency-updates

I

相关标签:
1条回答
  • 2020-12-30 22:07

    You can configure the versions plugin like this:

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.1</version>
        <configuration>
            <rulesUri>someUrl</rulesUri>
        </configuration>
    </plugin>
    

    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:

    <ruleset comparisonMethod="maven"
      xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
      <ignoreVersions>
        <ignoreVersion type="regex">.*-beta.</ignoreVersion>
        <ignoreVersion type="regex">.*_ALPHA</ignoreVersion>
      </ignoreVersions>
    </ruleset>
    
    0 讨论(0)
提交回复
热议问题