Skip to content

Instantly share code, notes, and snippets.

@jhaber
Last active October 20, 2015 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhaber/ceda968890c5ce0c192f to your computer and use it in GitHub Desktop.
Save jhaber/ceda968890c5ce0c192f to your computer and use it in GitHub Desktop.
<!--
Fails with:
[INFO] - dependency-management-plugin:0.3:analyze (default) @ test -
[WARNING] Plugin com.hubspot.maven.plugins:dependency-management-plugin is not managed
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.basepom</groupId>
<artifactId>basepom-standard-oss</artifactId>
<version>12</version>
</parent>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<version>0.3</version>
<executions>
<execution>
<id>default</id>
<phase>validate</phase>
<goals>
<goal>analyze</goal>
</goals>
<configuration>
<skip>false</skip>
<fail>true</fail>
<requireManagement>
<dependencies>true</dependencies>
<plugins>true</plugins>
</requireManagement>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<!--
Succeeds
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.basepom</groupId>
<artifactId>basepom-standard-oss</artifactId>
<version>12</version>
</parent>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<version>0.3</version>
<configuration>
<skip>false</skip>
<fail>true</fail>
<requireManagement>
<dependencies>true</dependencies>
<plugins>true</plugins>
</requireManagement>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<phase>validate</phase>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<!--
Fails with:
[INFO] - dependency-management-plugin:0.3:analyze (default) @ test -
[WARNING] Version mismatch for com.google.guava:guava:jar, managed version 18.0 does not match project version 19.0-rc2
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.basepom</groupId>
<artifactId>basepom-standard-oss</artifactId>
<version>12</version>
</parent>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0-rc2</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<version>0.3</version>
<configuration>
<skip>false</skip>
<fail>true</fail>
<requireManagement>
<dependencies>true</dependencies>
<plugins>true</plugins>
</requireManagement>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<phase>validate</phase>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<!--
Succeeds
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.basepom</groupId>
<artifactId>basepom-standard-oss</artifactId>
<version>12</version>
</parent>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<dep.guava.version>19.0-rc2</dep.guava.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<version>0.3</version>
<configuration>
<skip>false</skip>
<fail>true</fail>
<requireManagement>
<dependencies>true</dependencies>
<plugins>true</plugins>
</requireManagement>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<phase>validate</phase>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<!--
Succeeds
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.basepom</groupId>
<artifactId>basepom-standard-oss</artifactId>
<version>12</version>
</parent>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0-rc2</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<version>0.3</version>
<configuration>
<skip>false</skip>
<fail>true</fail>
<requireManagement>
<dependencies>true</dependencies>
<plugins>true</plugins>
</requireManagement>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>dependency-management-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<phase>validate</phase>
<goals>
<goal>analyze</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment