You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2016/01/04 01:00:49 UTC

svn commit: r1722776 - in /maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8: ./ pom.xml verify.groovy

Author: michaelo
Date: Mon Jan  4 00:00:48 2016
New Revision: 1722776

URL: http://svn.apache.org/viewvc?rev=1722776&view=rev
Log:
[MPIR-308] Plugin fails with Java 8 (caused by BCEL)

Added IT to properly verify Java 1.7 and 1.8 detection

Added:
    maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/   (with props)
    maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/pom.xml   (with props)
    maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/verify.groovy

Propchange: maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Mon Jan  4 00:00:48 2016
@@ -0,0 +1 @@
+MPIR-\d+

Propchange: maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/pom.xml?rev=1722776&view=auto
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/pom.xml (added)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/pom.xml Mon Jan  4 00:00:48 2016
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<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>
+
+  <groupId>org.apache.maven.plugins.project-info-reports</groupId>
+  <artifactId>dependencies-java-1.7-and-1.8</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>Detect Java 1.7 and 1.8 dependencies</name>
+  <description>
+    MPIR retrieves class version information from dependencies to display that Java 1.7 and 1.8 are properly detected.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model</artifactId>
+      <version>3.3.9</version>
+    </dependency>
+    <dependency>
+      <groupId>com.fasterxml.jackson.datatype</groupId>
+      <artifactId>jackson-datatype-jsr310</artifactId>
+      <version>2.6.4</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>@sitePluginVersion@</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>@pom.version@</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>dependencies</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>

Propchange: maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/verify.groovy?rev=1722776&view=auto
==============================================================================
--- maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/verify.groovy (added)
+++ maven/plugins/trunk/maven-project-info-reports-plugin/src/it/dependencies-java-1.7-and-1.8/verify.groovy Mon Jan  4 00:00:48 2016
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+File dependencies = new File( basedir, 'target/site/dependencies.html' )
+def mavenModel = '''\
+<tr class="a">
+<td>maven-model-3.3.9.jar</td>
+<td>163.98 kB</td>
+<td>71</td>
+<td>54</td>
+<td>3</td>
+<td>1.7</td>
+<td>Yes</td></tr>
+'''
+
+def jacksonDataTypeJsr310 = '''\
+<tr class="a">
+<td>jackson-datatype-jsr310-2.6.4.jar</td>
+<td>78.12 kB</td>
+<td>69</td>
+<td>51</td>
+<td>5</td>
+<td>1.8</td>
+<td>Yes</td></tr>
+'''
+
+assert dependencies.text.contains( mavenModel.replaceAll( "\n", System.getProperty( "line.separator" ) ) )
+assert dependencies.text.contains( jacksonDataTypeJsr310.replaceAll( "\n", System.getProperty( "line.separator" ) ) )