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 000000000..6486eb1de --- /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 000000000..62786f837 --- /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 000000000..e82022509 --- /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 000000000..a5d4fbc1d --- /dev/null +++ b/apache-rat-plugin/src/it/RAT-510/pom.xml @@ -0,0 +1,43 @@ + + + + org.apache.rat.test + RAT-510 + 1.0 + 4.0.0 + pom + + + + org.apache.rat + apache-rat-plugin + @pom.version@ + + true + false + + module1 + + + module2 + + + + + + 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 000000000..ff02bbbc2 --- /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 + +