Author: gboue
Date: Sun Jun  4 23:06:33 2017
New Revision: 1797615

URL: http://svn.apache.org/viewvc?rev=1797615&view=rev
Log:
Fixing the 'analyze' and 'analyze-report' ITs under JDK 8: they must not force 
the declaration of maven-artifact as a used dependency, because JDK 8 now 
writes bytecode entries for constants and maven-dependency-analyzer fails the 
build in that case. This commit also adds a specific IT for the 
'usedDependencies' parameter, leveraging a source retention annotation.

Added:
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/pom.xml
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/MySourceRetentionAnnotation.java
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/invoker.properties
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/pom.xml
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/Main.java
   (with props)
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/pom.xml
   (with props)
Modified:
    
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze-report/pom.xml
    maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze/pom.xml

Modified: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze-report/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze-report/pom.xml?rev=1797615&r1=1797614&r2=1797615&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze-report/pom.xml
 (original)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze-report/pom.xml
 Sun Jun  4 23:06:33 2017
@@ -60,9 +60,6 @@
         <plugin>
           <artifactId>maven-dependency-plugin</artifactId>
           <configuration>
-            <usedDependencies>
-              <usedDependency>org.apache.maven:maven-artifact</usedDependency>
-            </usedDependencies>
            <outputXML>true</outputXML>
            <scriptableOutput>true</scriptableOutput>
            <verbose>true</verbose>

Modified: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze/pom.xml?rev=1797615&r1=1797614&r2=1797615&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze/pom.xml 
(original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/it/projects/analyze/pom.xml 
Sun Jun  4 23:06:33 2017
@@ -60,9 +60,6 @@
         <plugin>
           <artifactId>maven-dependency-plugin</artifactId>
           <configuration>
-            <usedDependencies>
-              <usedDependency>org.apache.maven:maven-artifact</usedDependency>
-            </usedDependencies>
            <outputXML>true</outputXML>
            <scriptableOutput>true</scriptableOutput>
            <verbose>true</verbose>

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/pom.xml?rev=1797615&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/pom.xml
 Sun Jun  4 23:06:33 2017
@@ -0,0 +1,31 @@
+<?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>
+  <parent>
+    <groupId>org.apache.maven.plugins.dependency</groupId>
+    <artifactId>used-dependencies</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>annotation</artifactId>
+</project>

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/MySourceRetentionAnnotation.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/MySourceRetentionAnnotation.java?rev=1797615&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/MySourceRetentionAnnotation.java
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/MySourceRetentionAnnotation.java
 Sun Jun  4 23:06:33 2017
@@ -0,0 +1,32 @@
+package org.apache.maven.plugins.dependency;
+
+/*
+ * 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.
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.SOURCE)
+public @interface MySourceRetentionAnnotation
+{
+
+}

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/MySourceRetentionAnnotation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/annotation/src/main/java/org/apache/maven/plugins/dependency/MySourceRetentionAnnotation.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/invoker.properties
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/invoker.properties?rev=1797615&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/invoker.properties
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/invoker.properties
 Sun Jun  4 23:06:33 2017
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.goals = clean dependency:analyze

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/pom.xml?rev=1797615&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/pom.xml
 Sun Jun  4 23:06:33 2017
@@ -0,0 +1,50 @@
+<?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>
+  <parent>
+    <groupId>org.apache.maven.plugins.dependency</groupId>
+    <artifactId>used-dependencies</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>module</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugins.dependency</groupId>
+      <artifactId>annotation</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <configuration>
+          <usedDependencies>
+            
<usedDependency>org.apache.maven.plugins.dependency:annotation</usedDependency>
+          </usedDependencies>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/Main.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/Main.java?rev=1797615&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/Main.java
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/Main.java
 Sun Jun  4 23:06:33 2017
@@ -0,0 +1,28 @@
+package test;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugins.dependency.MySourceRetentionAnnotation;
+
+@MySourceRetentionAnnotation
+public class Main
+{
+
+}

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/module/src/main/java/test/Main.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/pom.xml?rev=1797615&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/pom.xml
 Sun Jun  4 23:06:33 2017
@@ -0,0 +1,54 @@
+<?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.dependency</groupId>
+  <artifactId>used-dependencies</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <description>
+    Test that usedDependencies permits to force the use of a dependency when 
bytecode analysis cannot detect it
+    (such as a source retention annotation).
+  </description>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>@pom.version@</version>
+          <configuration>
+            <failOnWarning>true</failOnWarning>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <modules>
+    <module>annotation</module>
+    <module>module</module>
+  </modules>
+</project>

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-dependency-plugin/src/it/projects/used-dependencies/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision


Reply via email to