ospector / mvn-enforce-concrete-version

Maven Enforcer Rule that allows enforcing concrete (non-snapshot, non-range) versions during build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maven Concrete Version rule

When releasing a maven based project you should never depend on non-concrete versions. The standard rules supplied with maven will enforce non-snapshot BUT will allow version ranges. This project defines an enforcer rule that checks for both SNAPSHOT and Range.

Usage

In order to use this rule you need to

  • add the maven-enforcer-plugin.
  • configure an execution using the rule as part of the enforce goal:
    <rules>
        <concreteVersionRule implementation="com.develeap.enforce.ConcreteVersionRule"/>
    </rules>

Further configuration is possible by setting one of the following flags:

  • checkOnSnapshotBuilds - (default:false) enforce rule even when building a SNAPSHOT of your project
  • alsoCheckParentVersion - (default:true) enforce the rule on parent version
  • allowSnapshotVersions - (default:false) allow SNAPSHOT version in dependencies and parent

An example of a usage pom can be found at usage-pom.xml

Enjoy.

About

Maven Enforcer Rule that allows enforcing concrete (non-snapshot, non-range) versions during build


Languages

Language:Java 100.0%