HubSpot/dependency-management-maven-plugin

Name: dependency-management-maven-plugin

Owner: HubSpot

Description: null

Created: 2015-09-16 17:07:16.0

Updated: 2017-12-11 22:12:58.0

Pushed: 2018-01-31 19:27:38.0

Homepage: null

Size: 47

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

dependency-management-plugin

Maven Plugin for validating that the versions in dependency management and plugin management match the resolved versions. Can be run as a standalone plugin or as a rule with the maven-enforcer-plugin.

Available parameters
Minimal usage example
gins>
.
lugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<version>0.4</version>
<executions>
  <execution>
    <goals>
      <goal>analyze</goal>
    </goals>
    <phase>validate</phase>
  </execution>
</executions>
plugin>
.
ugins>
Full usage example
gins>
.
lugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<version>0.4</version>
<executions>
  <execution>
    <goals>
      <goal>analyze</goal>
    </goals>
    <phase>validate</phase>
    <configuration>
      <fail>true</fail>
      <requireManagement>
        <dependencies>true</dependencies>
        <plugins>true</plugins>
        <allowVersions>false</allowVersions>
        <allowExclusions>false</allowExclusions>
        <overrides>
          <override>
            <patterns>
              <pattern>com.example:*</pattern>
            </patterns>
            <dependencies>false</dependencies>
          </override>
        </overrides>
      </requireManagement>
    </configuration>
  </execution>
</executions>
plugin>
.
ugins>
Enforcer plugin example
gins>
.
lugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4</version>
<dependencies>
  <dependency>
    <groupId>com.hubspot.maven.plugins</groupId>
    <artifactId>dependency-management-plugin</artifactId>
    <version>0.4</version>
  </dependency>
</dependencies>
<executions>
  <execution>
    <goals>
      <goal>enforce</goal>
    </goals>
    <configuration>
      <fail>true</fail>
      <rules>
        <dependencyManagementRule implementation="com.hubspot.maven.plugins.dependency.management.DependencyManagementRule">
          <requireManagement>
            <dependencies>true</dependencies>
            <plugins>true</plugins>
            <allowVersions>false</allowVersions>
            <allowExclusions>false</allowExclusions>                
            <exceptions>
              <exception>com.example:*</exception>
            </exceptions>                
          </requireManagement>
        </dependencyManagementRule>
      </rules>
    </configuration>
  </execution>
</executions>
plugin>
.
ugins>

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.