This is an automated email from the ASF dual-hosted git repository. pottlinger pushed a commit to branch fix/RAT-510 in repository https://gitbox.apache.org/repos/asf/creadur-rat.git
commit 824ffcff12ad5fb581f459b3d77f93f4c4910285 Author: P. Ottlinger <[email protected]> AuthorDate: Sat Nov 1 00:12:04 2025 +0100 RAT-510: Try to document the current behaviour with a test --- .../src/it/RAT-510/invoker.properties | 16 ++++++++ .../src/it/RAT-510/module1/NoLicense.java | 5 +++ .../src/it/RAT-510/module2/NoLicenseAsWell.java | 5 +++ apache-rat-plugin/src/it/RAT-510/pom.xml | 43 ++++++++++++++++++++++ apache-rat-plugin/src/it/RAT-510/verify.groovy | 25 +++++++++++++ 5 files changed, 94 insertions(+) diff --git a/apache-rat-plugin/src/it/RAT-510/invoker.properties b/apache-rat-plugin/src/it/RAT-510/invoker.properties new file mode 100644 index 00000000..6486eb1d --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-510/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-510/module1/NoLicense.java b/apache-rat-plugin/src/it/RAT-510/module1/NoLicense.java new file mode 100644 index 00000000..62786f83 --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-510/module1/NoLicense.java @@ -0,0 +1,5 @@ +/** +* A file without a license +*/ +class NoLicense { +} diff --git a/apache-rat-plugin/src/it/RAT-510/module2/NoLicenseAsWell.java b/apache-rat-plugin/src/it/RAT-510/module2/NoLicenseAsWell.java new file mode 100644 index 00000000..e8202250 --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-510/module2/NoLicenseAsWell.java @@ -0,0 +1,5 @@ +/** +* No license as well. +*/ +class NoLicenseAsWell { +} diff --git a/apache-rat-plugin/src/it/RAT-510/pom.xml b/apache-rat-plugin/src/it/RAT-510/pom.xml new file mode 100644 index 00000000..a5d4fbc1 --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-510/pom.xml @@ -0,0 +1,43 @@ +<?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"> + <groupId>org.apache.rat.test</groupId> + <artifactId>RAT-510</artifactId> + <version>1.0</version> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <version>@pom.version@</version> + <configuration> + <consoleOutput>true</consoleOutput> + <ignoreErrors>false</ignoreErrors> + <inputExcludes> + <exclude>module1</exclude> + </inputExcludes> + <inputExcludes> + <exclude>module2</exclude> + </inputExcludes> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/apache-rat-plugin/src/it/RAT-510/verify.groovy b/apache-rat-plugin/src/it/RAT-510/verify.groovy new file mode 100644 index 00000000..ff02bbbc --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-510/verify.groovy @@ -0,0 +1,25 @@ +/* + * 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.rat.testhelpers.TextUtils + +content = new File(basedir, 'build.log').text + +assert content.contains('BUILD SUCCESS') +assert content.contains('[INFO] Excluding patterns: module2') // only the last explicit inclusion worked +// assert content.contains('[INFO] Excluding patterns: module1') // if RAT-510 is fixed + +
