This is an automated email from the ASF dual-hosted git repository.

adangel pushed a commit to branch MPMD-266
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git

commit a2bdbbd39dea2e82cbececbaf75b25aa93b497d0
Author: Andreas Dangel <adan...@apache.org>
AuthorDate: Thu Oct 11 19:11:18 2018 +0200

    [MPMD-266] Aggregate report in multi-module projects doesn't use correct 
auxclasspath
    
    Extend test case to use a 3rd-party dependency.
---
 src/it/MPMD-266-typeresolution-aggregated/module-b/pom.xml  |  6 ++++++
 .../module-b/src/main/java/module/b/ModuleB.java            | 13 +++++++++++++
 src/it/MPMD-266-typeresolution-aggregated/verify.groovy     |  2 ++
 3 files changed, 21 insertions(+)

diff --git a/src/it/MPMD-266-typeresolution-aggregated/module-b/pom.xml 
b/src/it/MPMD-266-typeresolution-aggregated/module-b/pom.xml
index da1e92f..3a67e1f 100644
--- a/src/it/MPMD-266-typeresolution-aggregated/module-b/pom.xml
+++ b/src/it/MPMD-266-typeresolution-aggregated/module-b/pom.xml
@@ -36,5 +36,11 @@ under the License.
       <artifactId>MPMD-266-typeresolution-aggregated-module-a</artifactId>
       <version>${project.version}</version>
     </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-math</artifactId>
+      <version>2.2</version>
+    </dependency>
   </dependencies>
 </project>
diff --git 
a/src/it/MPMD-266-typeresolution-aggregated/module-b/src/main/java/module/b/ModuleB.java
 
b/src/it/MPMD-266-typeresolution-aggregated/module-b/src/main/java/module/b/ModuleB.java
index d5c2225..0689d93 100644
--- 
a/src/it/MPMD-266-typeresolution-aggregated/module-b/src/main/java/module/b/ModuleB.java
+++ 
b/src/it/MPMD-266-typeresolution-aggregated/module-b/src/main/java/module/b/ModuleB.java
@@ -21,6 +21,8 @@ package module.b;
 
 import module.a.IModuleA;
 import module.a.ModuleA;
+import org.apache.commons.math.complex.Complex;
+import org.apache.commons.math.FieldElement;
 
 public class ModuleB
 {
@@ -38,4 +40,15 @@ public class ModuleB
     {
         System.out.println( module );
     }
+
+    public static void aPublicMethod()
+    {
+        Complex u = new Complex(1, 1);
+        aPrivateMethod( u );
+    }
+
+    private static void aPrivateMethod( FieldElement<Complex> u )
+    {
+        System.out.println( "aPrivateMethod: " + u );
+    }
 }
\ No newline at end of file
diff --git a/src/it/MPMD-266-typeresolution-aggregated/verify.groovy 
b/src/it/MPMD-266-typeresolution-aggregated/verify.groovy
index b523700..da8f51f 100644
--- a/src/it/MPMD-266-typeresolution-aggregated/verify.groovy
+++ b/src/it/MPMD-266-typeresolution-aggregated/verify.groovy
@@ -20,7 +20,9 @@
 File pmdXml = new File( basedir, "target/pmd.xml" )
 assert pmdXml.exists()
 assert !pmdXml.text.contains( "Avoid unused private methods such as 
'doSomething(IModuleA)'." )
+assert !pmdXml.text.contains( "Avoid unused private methods such as 
'aPrivateMethod(FieldElement)'." )
 
 File pmdHtml = new File( basedir, "target/site/pmd.html" )
 assert pmdHtml.exists()
 assert !pmdHtml.text.contains( "Avoid unused private methods such as 
'doSomething(IModuleA)'." )
+assert !pmdHtml.text.contains( "Avoid unused private methods such as 
'aPrivateMethod(FieldElement)'." )

Reply via email to