Skip to content

Maven enforcer rule for ensuring a project is using the latest version of certain dependencies

Notifications You must be signed in to change notification settings

CJSCommonPlatform/require-latest-versions-enforcer-rule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Require Latest Versions

Build Status Coverage Status

A Maven Enforcer rule for ensuring that any project using the raml-maven-plugin depending on the latest released version of any RAML dependencies. This is done by comparing version numbers and if the version is out of date, whether there are any modifications in the RAML or JSON schema files.

Custom filename filters using regular expressions can be used to control which file modifications are considered to be differences.

Usage

Add the plugin to the build plugins section of any project which is using raml-maven-plugin:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-enforcer-plugin</artifactId>
    <dependencies>
        <dependency>
            <groupId>uk.gov.justice.maven</groupId>
            <artifactId>require-latest-versions-enforcer-rule</artifactId>
            <version>1.1.0</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <id>enforce</id>
            <configuration>
                <rules>
                    <RequireLatestRamlVersionsRule implementation="uk.gov.justice.maven.rules.RequireLatestMojInterfaceRule">
                        <filter>^raml/json/schema/?|.*raml$</filter>                                        
                    </RequireLatestRamlVersionsRule>
                    <RequireLatestDependencyVersionRule implementation="uk.gov.justice.maven.rules.RequireLatestDependencyVersionRule">
                        <artifactIds>
                            <artifactId>common-core-domain</artifactId>
                        </artifacts>                   
                    </RequireLatestDependencyVersionRule>
                    <RequireLatestServiceParentVersionRule implementation="uk.gov.justice.maven.rules.RequireLatestServiceParentVersionRule"/>
                </rules>
            </configuration>
            <goals>
                <goal>enforce</goal>
            </goals>
        </execution>
    </executions>
</plugin>

About

Maven enforcer rule for ensuring a project is using the latest version of certain dependencies

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages