From 0364b668846489b8a258a522f57622ccf6fbc6b0 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 27 Jan 2023 23:24:16 +0100 Subject: [PATCH 1/9] RAT-314: Prepare an integration test for a time after r0.16 is out to prevent regressions --- .../src/it/RAT-314/.mvn/extensions.xml | 8 ++++ .../src/it/RAT-314/invoker.properties | 16 ++++++++ apache-rat-plugin/src/it/RAT-314/pom.xml | 40 +++++++++++++++++++ .../src/it/RAT-314/verify.groovy | 28 +++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml create mode 100644 apache-rat-plugin/src/it/RAT-314/invoker.properties create mode 100644 apache-rat-plugin/src/it/RAT-314/pom.xml create mode 100644 apache-rat-plugin/src/it/RAT-314/verify.groovy diff --git a/apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml b/apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml new file mode 100644 index 000000000..96ba31ace --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml @@ -0,0 +1,8 @@ + + + + fr.jcgay.maven + maven-notifier + 2.1.2 + + diff --git a/apache-rat-plugin/src/it/RAT-314/invoker.properties b/apache-rat-plugin/src/it/RAT-314/invoker.properties new file mode 100644 index 000000000..6486eb1de --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-314/invoker.properties @@ -0,0 +1,16 @@ +# 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 apache-rat:rat diff --git a/apache-rat-plugin/src/it/RAT-314/pom.xml b/apache-rat-plugin/src/it/RAT-314/pom.xml new file mode 100644 index 000000000..64efba58a --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-314/pom.xml @@ -0,0 +1,40 @@ + + + + 4.0.0 + org.apache.rat.test + it-rat314 + 1.0 + + + + org.apache.rat + apache-rat-plugin + @pom.version@ + + + pom.xml + + + + + + diff --git a/apache-rat-plugin/src/it/RAT-314/verify.groovy b/apache-rat-plugin/src/it/RAT-314/verify.groovy new file mode 100644 index 000000000..3018f96a3 --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-314/verify.groovy @@ -0,0 +1,28 @@ +/* + * 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. + */ +content = new File( basedir, 'build.log' ).text + +assert content.contains( 'BUILD SUCCESS' ) + +/* + * [WARNING] No resources included + */ +assert ! content.contains( '[WARNING]' ) + +report = new File( basedir, 'target/site/rat-report.html' ).text + +assert report.contains( 'AL pom.xml' ) From 052d326f800d1243c8d4dd6f51d2d358bf06450d Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 27 Jan 2023 23:41:30 +0100 Subject: [PATCH 2/9] RAT-314: Try to emulate post-release phase --- apache-rat-api/pom.xml | 2 +- apache-rat-core/pom.xml | 2 +- apache-rat-plugin/pom.xml | 2 +- apache-rat-tasks/pom.xml | 2 +- apache-rat/pom.xml | 2 +- pom.xml | 6 ++---- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/apache-rat-api/pom.xml b/apache-rat-api/pom.xml index bdb30bf61..dc852dd67 100644 --- a/apache-rat-api/pom.xml +++ b/apache-rat-api/pom.xml @@ -20,7 +20,7 @@ org.apache.rat apache-rat-project - 0.16-SNAPSHOT + 0.17-SNAPSHOT jar diff --git a/apache-rat-core/pom.xml b/apache-rat-core/pom.xml index 60f4de006..f55dc67d1 100644 --- a/apache-rat-core/pom.xml +++ b/apache-rat-core/pom.xml @@ -20,7 +20,7 @@ org.apache.rat apache-rat-project - 0.16-SNAPSHOT + 0.17-SNAPSHOT apache-rat-core jar diff --git a/apache-rat-plugin/pom.xml b/apache-rat-plugin/pom.xml index 22dcc325c..d4936c2d9 100644 --- a/apache-rat-plugin/pom.xml +++ b/apache-rat-plugin/pom.xml @@ -20,7 +20,7 @@ apache-rat-project org.apache.rat - 0.16-SNAPSHOT + 0.17-SNAPSHOT .. apache-rat-plugin diff --git a/apache-rat-tasks/pom.xml b/apache-rat-tasks/pom.xml index 84eb8b8ee..3a1927bd8 100644 --- a/apache-rat-tasks/pom.xml +++ b/apache-rat-tasks/pom.xml @@ -20,7 +20,7 @@ org.apache.rat apache-rat-project - 0.16-SNAPSHOT + 0.17-SNAPSHOT apache-rat-tasks jar diff --git a/apache-rat/pom.xml b/apache-rat/pom.xml index 418ee9328..6018c3f99 100644 --- a/apache-rat/pom.xml +++ b/apache-rat/pom.xml @@ -20,7 +20,7 @@ org.apache.rat apache-rat-project - 0.16-SNAPSHOT + 0.17-SNAPSHOT apache-rat jar diff --git a/pom.xml b/pom.xml index 626c2d218..9ef6a82d8 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.apache.rat apache-rat-project - 0.16-SNAPSHOT + 0.17-SNAPSHOT pom Apache Creadur Rat https://creadur.apache.org/rat/ @@ -266,8 +266,6 @@ agnostic home for software distribution comprehension and audit tools. org.apache.rat apache-rat-plugin - - 0.15 @@ -328,7 +326,7 @@ agnostic home for software distribution comprehension and audit tools. org.apache.rat apache-rat-plugin - 0.15 + 0.16-SNAPSHOT .asf.yaml From 0fff92eeb26f1b0163390bffdd552e2f4a6fcc14 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 27 Jan 2023 23:56:45 +0100 Subject: [PATCH 3/9] RAT-314: Fix version error in pom --- apache-rat-plugin/src/it/RAT-314/pom.xml | 2 +- pom.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apache-rat-plugin/src/it/RAT-314/pom.xml b/apache-rat-plugin/src/it/RAT-314/pom.xml index 64efba58a..313ba25e6 100644 --- a/apache-rat-plugin/src/it/RAT-314/pom.xml +++ b/apache-rat-plugin/src/it/RAT-314/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.apache.rat.test it-rat314 - 1.0 + 1.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 9ef6a82d8..28b76f599 100644 --- a/pom.xml +++ b/pom.xml @@ -266,6 +266,7 @@ agnostic home for software distribution comprehension and audit tools. org.apache.rat apache-rat-plugin + 0.16-SNAPSHOT From 631ffd30653998da615f3d19a89e80866caec709 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 27 Jan 2023 23:56:57 +0100 Subject: [PATCH 4/9] RAT-314: Add recursive file example --- apache-rat-plugin/src/it/RAT-314/.mvn/recursive/foo.xml | 1 + 1 file changed, 1 insertion(+) create mode 100644 apache-rat-plugin/src/it/RAT-314/.mvn/recursive/foo.xml diff --git a/apache-rat-plugin/src/it/RAT-314/.mvn/recursive/foo.xml b/apache-rat-plugin/src/it/RAT-314/.mvn/recursive/foo.xml new file mode 100644 index 000000000..74d9a6d37 --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-314/.mvn/recursive/foo.xml @@ -0,0 +1 @@ + From 4863b026514f5f625edb27a493c07b24ad50a511 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Sat, 28 Jan 2023 00:04:06 +0100 Subject: [PATCH 5/9] RAT-314: itest does not work in whole build although it works standalone --- apache-rat-plugin/src/it/RAT-314/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache-rat-plugin/src/it/RAT-314/pom.xml b/apache-rat-plugin/src/it/RAT-314/pom.xml index 313ba25e6..64efba58a 100644 --- a/apache-rat-plugin/src/it/RAT-314/pom.xml +++ b/apache-rat-plugin/src/it/RAT-314/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.apache.rat.test it-rat314 - 1.0-SNAPSHOT + 1.0 From eb5aa98ae6d933d40abce5631287a6e060fd6377 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 10 May 2024 22:30:24 +0200 Subject: [PATCH 6/9] RAT-314: Cleanup poms --- apache-rat-plugin/pom.xml | 1 + pom.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apache-rat-plugin/pom.xml b/apache-rat-plugin/pom.xml index 26b1ad31d..41ab7aaa6 100644 --- a/apache-rat-plugin/pom.xml +++ b/apache-rat-plugin/pom.xml @@ -86,6 +86,7 @@ + src/it/** src/it/**/src.apt src/test/resources/unit/** **/*.iml diff --git a/pom.xml b/pom.xml index 9eeb9b6de..1f6b654ff 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ agnostic home for software distribution comprehension and audit tools. 3.6.3 3.22.0 - + 0.17 0.18-SNAPSHOT From 9965112cb4b92df4c0608be33fde18e344792498 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 10 May 2024 22:39:02 +0200 Subject: [PATCH 7/9] RAT-314: Adapt expectations and explicitly add maven surefire plugin --- apache-rat-plugin/src/it/RAT-314/pom.xml | 5 +---- apache-rat-plugin/src/it/RAT-314/verify.groovy | 3 ++- pom.xml | 5 +++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apache-rat-plugin/src/it/RAT-314/pom.xml b/apache-rat-plugin/src/it/RAT-314/pom.xml index 64efba58a..c007d8929 100644 --- a/apache-rat-plugin/src/it/RAT-314/pom.xml +++ b/apache-rat-plugin/src/it/RAT-314/pom.xml @@ -15,10 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 org.apache.rat.test it-rat314 diff --git a/apache-rat-plugin/src/it/RAT-314/verify.groovy b/apache-rat-plugin/src/it/RAT-314/verify.groovy index 3018f96a3..a8e83038d 100644 --- a/apache-rat-plugin/src/it/RAT-314/verify.groovy +++ b/apache-rat-plugin/src/it/RAT-314/verify.groovy @@ -25,4 +25,5 @@ assert ! content.contains( '[WARNING]' ) report = new File( basedir, 'target/site/rat-report.html' ).text -assert report.contains( 'AL pom.xml' ) +assert report.contains( '0 Unknown Licenses' ) +assert report.contains( 'S pom.xml' ) diff --git a/pom.xml b/pom.xml index 1f6b654ff..e8669cc7b 100644 --- a/pom.xml +++ b/pom.xml @@ -441,6 +441,11 @@ agnostic home for software distribution comprehension and audit tools. ISO-8859-1 + + org.apache.maven.plugins + maven-failsafe-plugin + 3.2.5 + org.apache.maven.plugins maven-surefire-plugin From cb706983b1475afc1fbab28d5b7cbedf5b4fec9b Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 10 May 2024 22:45:22 +0200 Subject: [PATCH 8/9] RAT-314: Simplify itest setup --- apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml | 8 -------- apache-rat-plugin/src/it/RAT-314/.mvn/maven.config | 1 + apache-rat-plugin/src/it/RAT-314/verify.groovy | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml create mode 100644 apache-rat-plugin/src/it/RAT-314/.mvn/maven.config diff --git a/apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml b/apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml deleted file mode 100644 index 96ba31ace..000000000 --- a/apache-rat-plugin/src/it/RAT-314/.mvn/extensions.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - fr.jcgay.maven - maven-notifier - 2.1.2 - - diff --git a/apache-rat-plugin/src/it/RAT-314/.mvn/maven.config b/apache-rat-plugin/src/it/RAT-314/.mvn/maven.config new file mode 100644 index 000000000..df145f3d4 --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-314/.mvn/maven.config @@ -0,0 +1 @@ +-V diff --git a/apache-rat-plugin/src/it/RAT-314/verify.groovy b/apache-rat-plugin/src/it/RAT-314/verify.groovy index a8e83038d..0bc8db0a7 100644 --- a/apache-rat-plugin/src/it/RAT-314/verify.groovy +++ b/apache-rat-plugin/src/it/RAT-314/verify.groovy @@ -27,3 +27,4 @@ report = new File( basedir, 'target/site/rat-report.html' ).text assert report.contains( '0 Unknown Licenses' ) assert report.contains( 'S pom.xml' ) +assert report.contains( 'AL AL Apache License Version 2.0' ) From e95c85de787888cc4cd90050babd385ab8cfa0f1 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Fri, 10 May 2024 22:47:03 +0200 Subject: [PATCH 9/9] RAT-314: Add changelog entry for missing itest after r0.16 --- src/changes/changes.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 25cc77edf..7449d6ddf 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -72,6 +72,9 @@ https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd --> + + Add integration test for new default exclude .mvn, that was introduced with v0.16. + Integrate checkstyle and spotbugs into the build and webpage generation. Most charset-related errors cannot be fixed until we break JDK8-compliance and move to newer versions.