Optional execution off versions-maven-plugin
[oparent.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index ebab15a..7ac034e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
    Copyright (c) 2016-2017 Huawei Technologies Co., Ltd.
+   Modifications copyright (C) 2017 AT&T Intellectual Property
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -33,6 +34,7 @@
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+    <versions.plugin.phase>none</versions.plugin.phase>
     <!-- sitePath may be overridden in the inheriting POM if desired -->
     <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
   </properties>
             </dependency>
           </dependencies>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-enforcer-plugin</artifactId>
+          <version>3.0.0-M1</version>
+          <executions>
+            <execution>
+              <id>enforce-no-snapshots</id>
+              <goals>
+                <goal>enforce</goal>
+              </goals>
+              <configuration>
+                <rules>
+                  <requireReleaseDeps>
+                    <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
+                    <onlyWhenRelease>true</onlyWhenRelease>
+                  </requireReleaseDeps>
+                </rules>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>versions-maven-plugin</artifactId>
+          <version>2.4</version>
+          <executions>
+            <execution>
+              <id>check-dependencies-version</id>
+              <phase>${versions.plugin.phase}</phase>
+              <goals>
+                <goal>display-dependency-updates</goal>
+              </goals>
+              <configuration>
+                <rulesUri>https://git.onap.org/oparent/plain/versions/src/main/resources/onap-versions/ruleset.xml</rulesUri>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>versions-maven-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 </project>