[maven-pmd-plugin] branch test-INFRA-20938 updated (faa82d2 -> f3e604e)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven-pmd-plugin] branch test-INFRA-20938 updated (faa82d2 -> f3e604e)

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

adangel pushed a change to branch test-INFRA-20938
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git.


 discard faa82d2  Debug toolchains
 discard 3f29aa9  Merge branch 'master' into test-INFRA-20938
 discard 5665cff  [MPMD-304] Use proper toolchain config in integration tests
     add 2a39340  [MPMD-304] Use proper toolchain config in integration tests
     new f3e604e  Debug toolchains

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (faa82d2)
            \
             N -- N -- N   refs/heads/test-INFRA-20938 (f3e604e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/it/MPMD-304-toolchain-support/selector.groovy | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[maven-pmd-plugin] 01/01: Debug toolchains

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

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

commit f3e604e12ef9930fed4a13b7917e478c7f226864
Author: Andreas Dangel <[hidden email]>
AuthorDate: Fri Nov 20 17:24:07 2020 +0100

    Debug toolchains
---
 .../MPMD-304-toolchain-support/invoker.properties  |  4 +-
 src/it/MPMD-304-toolchain-support/selector.groovy  | 47 ++++++++++++++++++++++
 2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/src/it/MPMD-304-toolchain-support/invoker.properties b/src/it/MPMD-304-toolchain-support/invoker.properties
index d8e8d01..e0bbaad 100644
--- a/src/it/MPMD-304-toolchain-support/invoker.properties
+++ b/src/it/MPMD-304-toolchain-support/invoker.properties
@@ -24,7 +24,7 @@ invoker.java.version = 1.7+
 # https://github.com/apache/infrastructure-puppet/blob/deployment/environments/windows/modules/jenkins_node_windows/files/toolchains.xml
 
 # the jdk toolchain "11:oracle" is selected in pom.xml
-invoker.toolchain.jdk.version = 11
-invoker.toolchain.jdk.vendor = oracle
+#invoker.toolchain.jdk.version = 11
+#invoker.toolchain.jdk.vendor = oracle
 
 invoker.goals = clean verify
diff --git a/src/it/MPMD-304-toolchain-support/selector.groovy b/src/it/MPMD-304-toolchain-support/selector.groovy
new file mode 100644
index 0000000..649ace2
--- /dev/null
+++ b/src/it/MPMD-304-toolchain-support/selector.groovy
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+def nodename = System.getenv( "NODE_NAME" )
+
+File userToolchains = new File( System.getProperty( 'user.home' ), '.m2/toolchains.xml' )
+if ( userToolchains.exists() )
+{
+    System.out.println( "INFO: Found ${userToolchains.absolutePath}" )
+    System.out.println( userToolchains.text )
+
+    def toolchains = new XmlParser().parseText( userToolchains.text )
+    def result = toolchains.children().find { toolchain ->
+            toolchain.type.text() == 'jdk' &&
+            toolchain.provides.version.text() == '11' &&
+            toolchain.provides.vendor.text() == 'oracle'
+    }
+    if ( !result )
+    {
+        System.out.println( "WARNING: No jdk toolchain for 11:oracle found" )
+        throw new RuntimeException( "WARNING: No jdk toolchain for 11:oracle found in ${userToolchains.absolutePath} on node ${nodename}:\n${userToolchains.text}" )
+        return false
+    }
+
+    System.out.println( "INFO: Found toolchain: ${result}" )
+    return true
+}
+
+System.out.println( "WARNING: Skipping integration test due to missing toolchain file in ${userToolchains.absolutePath}" )
+throw new RuntimeException( "WARNING: Skipping integration test due to missing toolchain file in ${userToolchains.absolutePath} on node ${nodename}" )
+return false