Upgrade upstream versions (part 1, Maven)
[odlparent.git] / odlparent / pom.xml
index b7ed69031f0c8332a3461275964afdbad298094b..a5c7b61b3708efe0ca59ee4411d321307f09cb32 100644 (file)
@@ -8,11 +8,17 @@
  and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
 <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.opendaylight.odlparent</groupId>
+    <artifactId>odlparent-lite</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath>../odlparent-lite</relativePath>
+  </parent>
+
   <groupId>org.opendaylight.odlparent</groupId>
   <artifactId>odlparent</artifactId>
-  <version>1.5.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <scm>
     <tag>HEAD</tag>
     <url>https://wiki.opendaylight.org/view/ODL_Root_Parent:Main</url>
   </scm>
-  <distributionManagement>
-    <!-- OpenDayLight Released artifact -->
-    <repository>
-      <id>opendaylight-release</id>
-      <url>${nexusproxy}/repositories/opendaylight.release/</url>
-    </repository>
-    <!-- OpenDayLight Snapshot artifact -->
-    <snapshotRepository>
-      <id>opendaylight-snapshot</id>
-      <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
-    </snapshotRepository>
-    <site>
-      <id>${project.artifactId}-site</id>
-      <url>./</url>
-    </site>
-  </distributionManagement>
+
+  <prerequisites>
+    <!-- This is only used to prevent building with Maven < 3 and to appease
+         maven-dependency-plugin; our real Maven requirement is enforced by
+         the enforcer plugin. -->
+    <maven>3.0.5</maven>
+  </prerequisites>
+
+  <!-- Variables should only be used where genuinely useful (to avoid
+       repetition); in general versions should be specified in the
+       corresponding dependencyManagement or pluginManagement element, not as
+       a variable. -->
   <properties>
-    <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
     <nexus.repository.release>opendaylight.release</nexus.repository.release>
     <nexus.repository.snapshot>opendaylight.snapshot</nexus.repository.snapshot>
-    <nexus.repository.snapshot>opendaylight.snapshot</nexus.repository.snapshot>
 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <java.version.target>${maven.compiler.target}</java.version.target>
 
     <!-- Maven plugin versions, in the 'canonical' format -->
-    <maven.antrun.plugin.version>1.7</maven.antrun.plugin.version>
-    <maven.bundle.version>2.5.3</maven.bundle.version>
+    <maven.antrun.plugin.version>1.8</maven.antrun.plugin.version>
+    <maven.bundle.version>2.5.4</maven.bundle.version>
     <maven.clean.plugin.version>2.6.1</maven.clean.plugin.version>
-    <maven.compile.plugin.version>3.2</maven.compile.plugin.version>
-    <maven.install.plugin.version>2.5.2</maven.install.plugin.version>
-    <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
-    <maven.depends.version>1.2</maven.depends.version>
-    <maven.jar.version>2.5</maven.jar.version>
-    <maven.javadoc.version>2.10.1</maven.javadoc.version>
-    <maven.release.version>2.5.1</maven.release.version>
-    <maven.source.version>2.4</maven.source.version>
-    <maven.surefire.version>2.18</maven.surefire.version>
+    <maven.compile.plugin.version>3.3</maven.compile.plugin.version>
+    <maven.jar.version>2.6</maven.jar.version>
+    <maven.javadoc.version>2.10.3</maven.javadoc.version>
+    <maven.plugin.version>3.4</maven.plugin.version>
+    <maven.release.version>2.5.2</maven.release.version>
+    <maven.surefire.version>2.18.1</maven.surefire.version>
 
     <!-- Maven plugin versions, in random formats -->
     <bundle.plugin.version>${maven.bundle.version}</bundle.plugin.version>
-    <checkstyle.version>2.14</checkstyle.version>
+    <checkstyle.version>2.16</checkstyle.version>
     <compiler.version>${maven.compile.plugin.version}</compiler.version>
-    <enforcer.version>1.3.1</enforcer.version>
-    <paxexam.plugin.version>1.2.4</paxexam.plugin.version> <!-- FIXME: this is latest version of paxexam plugin -->
-    <enunciate.version>1.28</enunciate.version> <!-- Needs to remain exported, as its used for dependencies, too -->
+    <enforcer.version>1.4</enforcer.version>
+    <enunciate.version>1.30.1</enunciate.version> <!-- Needs to remain exported, as its used for dependencies, too -->
     <exam.version>4.4.0</exam.version> <!-- Needs to remain exported, as its used for dependencies, too -->
-    <failsafe.version>2.18</failsafe.version>
+    <failsafe.version>2.18.1</failsafe.version>
     <gmaven.plugin.version>1.0</gmaven.plugin.version>
+    <!--
+        Regression in jacoco-plugin 0.7.5 prevents us from upgrading to it
+        http://jira.xwiki.org/browse/XCOMMONS-821
+
+        Additionally we need to stay on jacoco 0.7.2.201409121644. Future
+        versions appear to have issues picking up code coverage for projects
+        that use PowerMock.
+        https://github.com/jayway/powermock/issues/564
+    -->
     <jacoco.version>0.7.2.201409121644</jacoco.version>
     <jar.plugin.version>${maven.jar.version}</jar.plugin.version>
-    <karaf.version>3.0.1</karaf.version> <!-- Needs to remain exported, as its used for dependencies, too -->
+    <karaf.version>3.0.3</karaf.version> <!-- Needs to remain exported, as its used for dependencies, too -->
     <projectinfo>2.6</projectinfo>
     <propertymavenplugin.version>1.0-alpha-2</propertymavenplugin.version>
     <releaseplugin.version>${maven.release.version}</releaseplugin.version>
-    <siteplugin>3.4</siteplugin>
-    <odl.checkstyle.version>0.0.1-SNAPSHOT</odl.checkstyle.version>
+    <odl.checkstyle.version>0.1.0-SNAPSHOT</odl.checkstyle.version>
 
     <!-- Supporting Libraries -->
     <aopalliance.version>1.0.0</aopalliance.version>
@@ -92,7 +96,7 @@
     <asm.version>4.1</asm.version>
     <bouncycastle.version>1.52</bouncycastle.version>
     <commons.codec.version>1.8</commons.codec.version>
-    <commons.fileupload.version>1.2.2</commons.fileupload.version>
+    <commons.fileupload.version>1.3.1</commons.fileupload.version>
     <commons.io.version>2.4</commons.io.version>
     <commons.lang3.version>3.1</commons.lang3.version>
     <commons.lang.version>2.6</commons.lang.version>
     <javassist.version>3.19.0-GA</javassist.version>
     <javax.annotation.version>1.2</javax.annotation.version>
     <jaxrs-api.version>3.0.4.Final</jaxrs-api.version>
+
+    <!-- FIXME remove all dependencies for jersey 1.17 after migration all projects -->
     <jersey-servlet.version>1.17</jersey-servlet.version>
     <jersey.version>1.17</jersey.version>
     <jersey.client.version>1.17</jersey.client.version>
     <jersey.server.version>1.17</jersey.server.version>
     <jersey-servlet.version>1.17</jersey-servlet.version>
-    <jersey2.publisher.version>4.0</jersey2.publisher.version>
+
+    <!-- New packages for jersey migration 1.17 to 2.8 -->
+    <javax.annotation.version>1.2</javax.annotation.version>
+    <javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
     <jersey2.version>2.8</jersey2.version>
+    <javax.servlet.api.version>3.0.1</javax.servlet.api.version>
+    <!-- appache.geronimo.bundle for DocGen -->
+    <org.json.version>20131018</org.json.version>
+    <apache.geronimo.version>20090211_1</apache.geronimo.version>
+
+    <jersey2.publisher.version>4.0</jersey2.publisher.version>
     <jettison.version>1.3.3</jettison.version>
     <jolokia.version>1.1.4</jolokia.version>
     <jsonassert.version>1.2.3</jsonassert.version>
     <junit.version>4.11</junit.version>
     <logback.version>1.0.9</logback.version>
     <mockito.version>1.9.5</mockito.version>
-    <netty.version>4.0.26.Final</netty.version>
+    <netty.version>4.0.30.Final</netty.version>
     <osgi.compendium.version>5.0.0</osgi.compendium.version>
     <osgi.core.version>5.0.0</osgi.core.version>
-    <org.json.version>20131018</org.json.version>
-    <slf4j.version>1.7.2</slf4j.version>
+    <slf4j.version>1.7.7</slf4j.version>
     <spifly.version>1.0.0</spifly.version>
     <spring-osgi.version>1.2.1</spring-osgi.version>
     <spring-security-karaf.version>3.1.4.RELEASE</spring-security-karaf.version>
     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
     <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
     <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
+    <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
+    <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
   </properties>
 
   <dependencyManagement>
         <version>${commons.codec.version}</version>
       </dependency>
       <!-- Jersey for JAXRS -->
+      <dependency>
+        <groupId>javax.ws.rs</groupId>
+        <artifactId>javax.ws.rs-api</artifactId>
+        <version>${javax.ws.rs-api.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.glassfish.jersey.bundles.repackaged</groupId>
+        <artifactId>jersey-guava</artifactId>
+        <version>${jersey2.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.eclipsesource.jaxrs</groupId>
+        <artifactId>jersey-all</artifactId>
+        <version>${jersey2.version}</version>
+      </dependency>
+
+      <!-- servlet 3.x support -->
+      <dependency>
+        <groupId>org.glassfish.jersey.containers</groupId>
+        <artifactId>jersey-container-servlet</artifactId>
+        <version>${jersey2.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.geronimo.bundles</groupId>
+        <artifactId>json</artifactId>
+        <version>${apache.geronimo.version}</version>
+      </dependency>
+      <!-- FIXME : remove all dependencies for jersey 1.7 -->
       <dependency>
         <groupId>com.sun.jersey</groupId>
         <artifactId>jersey-core</artifactId>
         <artifactId>com.sun.jersey.jersey-servlet</artifactId>
         <version>${jersey-servlet.version}</version>
       </dependency>
+
       <!-- Plugin integration -->
       <dependency>
         <groupId>org.sonatype.plexus</groupId>
         <artifactId>jackson-datatype-json-org</artifactId>
         <version>${jackson.version}</version>
       </dependency>
-
+      <!-- TODO do we really need resteasy ? -->
       <dependency>
           <groupId>org.jboss.resteasy</groupId>
           <artifactId>jaxrs-api</artifactId>
         <artifactId>javax.mail.glassfish</artifactId>
         <version>1.4.1.v201108011116</version>
       </dependency>
+      <dependency>
+        <groupId>javax.servlet</groupId>
+        <artifactId>javax.servlet-api</artifactId>
+        <version>${javax.servlet.api.version}</version>
+      </dependency>
       <dependency>
         <groupId>orbit</groupId>
         <artifactId>javax.servlet.jsp.jstl</artifactId>
         <version>1.5</version>
         <scope>test</scope>
       </dependency>
+      <dependency>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-servlets</artifactId>
+        <version>8.1.14.v20131031</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
-  <repositories>
-    <!-- OpenDayLight Repo Mirror -->
-    <repository>
-      <releases>
-        <enabled>true</enabled>
-        <updatePolicy>never</updatePolicy>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-      <id>opendaylight-mirror</id>
-      <name>opendaylight-mirror</name>
-      <url>${nexusproxy}/groups/public/</url>
-    </repository>
-    <!-- OpenDayLight Snapshot artifact -->
-    <repository>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-      <id>opendaylight-snapshot</id>
-      <name>opendaylight-snapshot</name>
-      <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
-    </repository>
-  </repositories>
-  <pluginRepositories>
-    <!-- OpenDayLight Repo Mirror -->
-    <pluginRepository>
-      <releases>
-        <enabled>true</enabled>
-        <updatePolicy>never</updatePolicy>
-      </releases>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-      <id>opendaylight-mirror</id>
-      <name>opendaylight-mirror</name>
-      <url>${nexusproxy}/groups/public/</url>
-    </pluginRepository>
-    <!-- OpenDayLight Snapshot artifact -->
-    <pluginRepository>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-      <id>opendaylight-snapshot</id>
-      <name>opendaylight-snapshot</name>
-      <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
-    </pluginRepository>
-  </pluginRepositories>
 
   <build>
     <pluginManagement>
               <artifactId>checkstyle</artifactId>
               <version>${odl.checkstyle.version}</version>
             </dependency>
+            <dependency>
+              <groupId>org.opendaylight.odlparent</groupId>
+              <artifactId>odl-license</artifactId>
+              <version>0.0.1-SNAPSHOT</version>
+            </dependency>
           </dependencies>
           <configuration>
             <configLocation>odl_checks.xml</configLocation>
+            <!-- <sourceDirectory> is needed so that checkstyle ignores the
+                 generated sources directory -->
+            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+            <excludes>
+              org/opendaylight/yang/gen/**,
+              **/config/yang/**,
+              **/protobuff/messages/**,
+              **/thrift/gen/*.java
+            </excludes>
             <failsOnError>false</failsOnError>
             <consoleOutput>true</consoleOutput>
           </configuration>
           <executions>
+            <execution>
+              <id>check-license</id>
+              <goals>
+                <goal>check</goal>
+              </goals>
+              <phase>process-sources</phase>
+              <configuration>
+                <configLocation>check-license.xml</configLocation>
+                <includeResources>false</includeResources>
+                <includeTestResources>false</includeTestResources>
+                <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                <excludes>
+                  org/opendaylight/yang/gen/**,
+                  **/config/yang/**,
+                  **/protobuff/messages/**,
+                  **/thrift/gen/*.java
+                </excludes>
+                <failsOnError>false</failsOnError>
+                <consoleOutput>true</consoleOutput>
+              </configuration>
+            </execution>
             <execution>
               <goals>
                 <goal>check</goal>
         </plugin>
         <plugin>
           <artifactId>maven-install-plugin</artifactId>
-          <version>${maven.install.plugin.version}</version>
+          <version>2.5.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-deploy-plugin</artifactId>
-          <version>${maven.deploy.plugin.version}</version>
-        </plugin>
-        <plugin>
-          <artifactId>maven-dependency-plugin</artifactId>
-          <version>2.10</version>
+          <version>2.8.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <artifactId>maven-failsafe-plugin</artifactId>
           <version>${failsafe.version}</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-invoker-plugin</artifactId>
+          <version>2.0.0</version>
+        </plugin>
         <plugin>
           <artifactId>maven-jar-plugin</artifactId>
           <version>${jar.plugin.version}</version>
         <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
           <version>${maven.javadoc.version}</version>
+          <configuration>
+            <!-- Keep things quiet except for warnings/errors -->
+            <quiet>true</quiet>
+          </configuration>
           <executions>
             <execution>
               <id>attach-javadocs</id>
           <artifactId>maven-release-plugin</artifactId>
           <version>${maven.release.version}</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>2.10</version>
+          <executions>
+            <execution>
+              <id>unpack-license</id>
+              <phase>generate-resources</phase>
+              <goals><goal>unpack</goal></goals>
+              <configuration>
+                <artifactItems>
+                  <artifactItem>
+                    <groupId>org.opendaylight.odlparent</groupId>
+                    <artifactId>odl-license</artifactId>
+                    <version>0.0.1-SNAPSHOT</version>
+                  </artifactItem>
+                </artifactItems>
+                <outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                <excludes>META-INF/**</excludes>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-plugin-plugin</artifactId>
+          <version>${maven.plugin.version}</version>
+        </plugin>
+
         <plugin>
           <artifactId>maven-resources-plugin</artifactId>
           <version>2.7</version>
         </plugin>
         <plugin>
           <artifactId>maven-shade-plugin</artifactId>
-          <version>2.3</version>
+          <version>2.4.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-site-plugin</artifactId>
-          <version>${siteplugin}</version>
+          <version>3.4</version>
         </plugin>
         <plugin>
           <artifactId>maven-source-plugin</artifactId>
-          <version>${maven.source.version}</version>
+          <version>2.4</version>
           <executions>
             <execution>
               <id>attach-sources</id>
         <plugin>
           <groupId>org.apache.servicemix.tooling</groupId>
           <artifactId>depends-maven-plugin</artifactId>
-          <version>${maven.depends.version}</version>
+          <version>1.2</version>
           <executions>
             <execution>
               <id>generate-depends-file</id>
                     </goals>
                   </pluginExecutionFilter>
                   <action>
-                    <execute></execute>
+                    <execute/>
                   </action>
                 </pluginExecution>
                 <pluginExecution>
                     </goals>
                   </pluginExecutionFilter>
                   <action>
-                    <ignore />
+                    <ignore/>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <versionRange>[2.0.0,)</versionRange>
+                    <goals>
+                      <goal>check</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore/>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-dependency-plugin</artifactId>
+                    <versionRange>[2.10,)</versionRange>
+                    <goals>
+                      <goal>unpack</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <execute/>
                   </action>
                 </pluginExecution>
               </pluginExecutions>
           <groupId>org.jacoco</groupId>
           <artifactId>jacoco-maven-plugin</artifactId>
           <version>${jacoco.version}</version>
+          <configuration>
+            <!-- Note: This exclusion list should match <sonar.exclusions>
+                       property above -->
+            <excludes>
+              <exclude>**/gen/**</exclude>
+              <exclude>**/generated-sources/**</exclude>
+              <exclude>**/yang-gen/**</exclude>
+              <exclude>**/pax/**</exclude>
+            </excludes>
+          </configuration>
         </plugin>
 
         <plugin>
           <groupId>org.ops4j.pax.exam</groupId>
           <artifactId>maven-paxexam-plugin</artifactId>
-          <version>${paxexam.plugin.version}</version>
+          <version>1.2.4</version>
         </plugin>
       </plugins>
     </pluginManagement>
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+
+      <!-- Jacoco / Sonar -->
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>pre-unit-test</id>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+            <configuration>
+              <destFile>${sonar.jacoco.reportPath}</destFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>post-unit-test</id>
+            <goals>
+              <goal>report</goal>
+            </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.reportPath}</dataFile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>findbugs-maven-plugin</artifactId>
-        <version>3.0.0</version>
+        <version>3.0.1</version>
         <configuration>
           <effort>Max</effort>
           <threshold>Low</threshold>
       </plugin>
     </plugins>
   </reporting>
+
+  <!--
+    Maven Site Configuration
+
+    The following configuration is necessary for maven-site-plugin to
+    correctly identify the correct deployment path for OpenDaylight Maven
+    sites.
+  -->
+  <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
+
+  <distributionManagement>
+    <site>
+      <id>opendaylight-site</id>
+      <url>${nexus.site.url}/${project.artifactId}/</url>
+    </site>
+  </distributionManagement>
 </project>