Skip to content

Commit

Permalink
Make sure RAT plugin ignores files in the target folder (#813)
Browse files Browse the repository at this point in the history
* Make sure RAT plugin ignores files in the target folder
* Fix gitignore so that it can work with rat, do not inherit execution in children, use a single place to configure rat
* Exclude .asf.yaml from rat check
* Add repo/ to the .gitignore file as it's often used for local repository
  • Loading branch information
gnodet committed Oct 5, 2022
1 parent b89495e commit 7f9bde4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,4 @@
target/
**/target/**
.project
.classpath
.settings/
Expand All @@ -14,3 +14,4 @@ target/
.factorypath
.checkstyle
.vscode/
repo/
45 changes: 21 additions & 24 deletions pom.xml
Expand Up @@ -532,23 +532,6 @@ under the License.
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>src/test/resources*/**</exclude>
<exclude>src/test/projects/**</exclude>
<exclude>src/test/remote-repo/**</exclude>
<exclude>**/*.odg</exclude>
<!--
! Excluded the license files itself cause they do not have have a license of themselves.
-->
<exclude>src/main/appended-resources/licenses/EPL-1.0.txt</exclude>
<exclude>src/main/appended-resources/licenses/unrecognized-javax.annotation-api-1.2.txt</exclude>
</excludes>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
Expand Down Expand Up @@ -615,13 +598,27 @@ under the License.
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<exclude>bootstrap/**</exclude>
<exclude>README.bootstrap.txt</exclude>
<exclude>README.md</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>rat-check</id>
<inherited>false</inherited>
<configuration>
<excludes>
<exclude>**/.gitattributes</exclude>
<exclude>src/test/resources*/**</exclude>
<exclude>src/test/projects/**</exclude>
<exclude>src/test/remote-repo/**</exclude>
<exclude>**/*.odg</exclude>
<exclude>.asf.yaml</exclude>
<!--
! Excluded the license files itself cause they do not have have a license of themselves.
-->
<exclude>src/main/appended-resources/licenses/EPL-1.0.txt</exclude>
<exclude>src/main/appended-resources/licenses/unrecognized-javax.annotation-api-1.2.txt</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 7f9bde4

Please sign in to comment.