Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAT-314: integration test for .mvn default exclusion after release of v0.16 #116

Merged
merged 10 commits into from
May 10, 2024
1 change: 1 addition & 0 deletions apache-rat-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<configuration>
<excludes>
<!-- These files do not have license headers because they are used to test license headers -->
<exclude>src/it/**</exclude>
<exclude>src/it/**/src.apt</exclude>
<exclude>src/test/resources/unit/**</exclude>
<exclude>**/*.iml</exclude>
Expand Down
1 change: 1 addition & 0 deletions apache-rat-plugin/src/it/RAT-314/.mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-V
1 change: 1 addition & 0 deletions apache-rat-plugin/src/it/RAT-314/.mvn/recursive/foo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<foo></foo>
16 changes: 16 additions & 0 deletions apache-rat-plugin/src/it/RAT-314/invoker.properties
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions apache-rat-plugin/src/it/RAT-314/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?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.rat.test</groupId>
<artifactId>it-rat314</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>@pom.version@</version>
<configuration>
<includes>
<include>pom.xml</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
30 changes: 30 additions & 0 deletions apache-rat-plugin/src/it/RAT-314/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* 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( '0 Unknown Licenses' )
assert report.contains( 'S pom.xml' )
assert report.contains( 'AL AL Apache License Version 2.0' )
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ agnostic home for software distribution comprehension and audit tools.
<mavenJavadocPluginVersion>3.6.3</mavenJavadocPluginVersion>
<mavenPmdPluginVersion>3.22.0</mavenPmdPluginVersion>
<!-- Used to generate download page for RAT during site builds, please adapt versions manually BEFORE doing a release -->
<!-- START - adapat manually before doing a release -->
<!-- START - adapt manually before doing a release -->
<previousRatVersion>0.17</previousRatVersion>
<currentSnapshotRatVersion>0.18-SNAPSHOT</currentSnapshotRatVersion>
<!-- END - adapat manually before doing a release -->
<!-- END - adapt manually before doing a release -->
</properties>
<distributionManagement>
<site>
Expand Down Expand Up @@ -441,6 +441,11 @@ agnostic home for software distribution comprehension and audit tools.
<propertiesEncoding>ISO-8859-1</propertiesEncoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ https://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd
</release>
-->
<release version="0.17-SNAPSHOT" date="xxxx-yy-zz" description="Current SNAPSHOT - release to be done">
<action issue="RAT-314" type="add" dev="pottlinger">
Add integration test for new default exclude .mvn, that was introduced with v0.16.
</action>
<action issue="RAT-366" type="add" dev="pottlinger">
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.
</action>
Expand Down