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

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


The following commit(s) were added to refs/heads/master by this push:
     new e701e66  [MPMD-270] add jdk11 it test (#4)
e701e66 is described below

commit e701e661ef3a3367f4c5ccfd41c03f31408ec27c
Author: Olivier Lamy <[email protected]>
AuthorDate: Wed Oct 3 15:36:22 2018 +1000

    [MPMD-270] add jdk11 it test (#4)
    
    * [MPMD-270] jdk11 compatibility add an it test but solved by previous pmd 
upgrade
    
    Signed-off-by: olivier lamy <[email protected]>
    
    * switch to asfMavenTlpPlgnBuild
    
    Signed-off-by: olivier lamy <[email protected]>
    
    * jdks from 7 to 11
    
    Signed-off-by: olivier lamy <[email protected]>
---
 Jenkinsfile                                        |  2 +-
 src/it/MPMD-270-JDK11/invoker.properties           | 19 +++++
 src/it/MPMD-270-JDK11/pom.xml                      | 82 ++++++++++++++++++++++
 .../src/main/java/com/mycompany/app/App.java       |  9 ++-
 .../src/main/java/com/mycompany/app/Foo.java       | 12 +++-
 Jenkinsfile => src/it/MPMD-270-JDK11/verify.groovy |  6 +-
 6 files changed, 123 insertions(+), 7 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 09ac70f..41fc431 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,4 +17,4 @@
  * under the License.
  */
 
-asfMavenTlpStdBuild()
+asfMavenTlpPlgnBuild(jdk:['7','8','9','10','11'])
diff --git a/src/it/MPMD-270-JDK11/invoker.properties 
b/src/it/MPMD-270-JDK11/invoker.properties
new file mode 100644
index 0000000..6c4e161
--- /dev/null
+++ b/src/it/MPMD-270-JDK11/invoker.properties
@@ -0,0 +1,19 @@
+# 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.java.version = 11
+invoker.goals = clean verify
\ No newline at end of file
diff --git a/src/it/MPMD-270-JDK11/pom.xml b/src/it/MPMD-270-JDK11/pom.xml
new file mode 100644
index 0000000..66780cf
--- /dev/null
+++ b/src/it/MPMD-270-JDK11/pom.xml
@@ -0,0 +1,82 @@
+<?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/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.pmd.it</groupId>
+  <artifactId>empty-rulests</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>my-app</name>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+          <configuration>
+            <target>11</target>
+            <source>11</source>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <skipPmdError>false</skipPmdError>
+          <skip>false</skip>
+          <failOnViolation>true</failOnViolation>
+          <failurePriority>4</failurePriority>
+          <targetJdk>11</targetJdk>
+          <sourceEncoding>UTF-8</sourceEncoding>
+          <minimumTokens>100</minimumTokens>
+          <excludes>
+            <exclude>**/*Bean.java</exclude>
+            <exclude>**/generated/*.java</exclude>
+          </excludes>
+          <excludeRoots>
+            <excludeRoot>target/generated-sources/stubs</excludeRoot>
+          </excludeRoots>
+          <rulesets/>
+        </configuration>
+        <executions>
+          <execution>
+            <id>default</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/Jenkinsfile 
b/src/it/MPMD-270-JDK11/src/main/java/com/mycompany/app/App.java
similarity index 93%
copy from Jenkinsfile
copy to src/it/MPMD-270-JDK11/src/main/java/com/mycompany/app/App.java
index 09ac70f..8e4972d 100644
--- a/Jenkinsfile
+++ b/src/it/MPMD-270-JDK11/src/main/java/com/mycompany/app/App.java
@@ -1,4 +1,6 @@
-/**
+package com.mycompany.app;
+
+/*
  * 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
@@ -17,4 +19,7 @@
  * under the License.
  */
 
-asfMavenTlpStdBuild()
+public class App
+{
+
+}
diff --git a/Jenkinsfile 
b/src/it/MPMD-270-JDK11/src/main/java/com/mycompany/app/Foo.java
similarity index 87%
copy from Jenkinsfile
copy to src/it/MPMD-270-JDK11/src/main/java/com/mycompany/app/Foo.java
index 09ac70f..2a5a2bc 100644
--- a/Jenkinsfile
+++ b/src/it/MPMD-270-JDK11/src/main/java/com/mycompany/app/Foo.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -17,4 +17,12 @@
  * under the License.
  */
 
-asfMavenTlpStdBuild()
+import java.util.ArrayList;
+
+public class Foo
+{
+    public Foo( final ArrayList<String> foo )
+    {
+    }
+
+}
diff --git a/Jenkinsfile b/src/it/MPMD-270-JDK11/verify.groovy
similarity index 91%
copy from Jenkinsfile
copy to src/it/MPMD-270-JDK11/verify.groovy
index 09ac70f..1cd85d4 100644
--- a/Jenkinsfile
+++ b/src/it/MPMD-270-JDK11/verify.groovy
@@ -1,4 +1,5 @@
-/**
+
+/*
  * 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
@@ -17,4 +18,5 @@
  * under the License.
  */
 
-asfMavenTlpStdBuild()
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
\ No newline at end of file

Reply via email to