logo Apache Creadur Rat::Plugin4Maven

A plugin for Apache Maven that runs Apache Rat to audit the source to be distributed.

homepage: creadur.apache.org/rat
fresh index:
last release: 3 years ago, first release: 1 decade ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
apache-rat:check (phase: validate)

Run Rat to perform a violation check.

apache-rat:help

Display help information on apache-rat-plugin. Call mvn apache-rat:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

apache-rat:rat

Generates a report with Rat's output.

Often used code snippets:

<plugin>
  <groupId>org.apache.rat</groupId>
  <artifactId>apache-rat-plugin</artifactId>
  <version>${commons.rat.version}</version>
  <configuration>
    <excludes>
      <exclude>src/test/resources/CSVFileParser/bom.csv</exclude>
      <exclude>src/test/resources/CSVFileParser/test.csv</exclude>
      <exclude>src/test/resources/CSVFileParser/test_default.txt</exclude>
      <exclude>src/test/resources/CSVFileParser/test_default_comment.txt</exclude>
      <exclude>src/test/resources/CSVFileParser/test_rfc4180.txt</exclude>
      <exclude>src/test/resources/CSVFileParser/test_rfc4180_trim.txt</exclude>
      <exclude>src/test/resources/CSVFileParser/testCSV85.csv</exclude>
      <exclude>src/test/resources/CSVFileParser/testCSV85_default.txt</exclude>
      <exclude>src/test/resources/CSVFileParser/testCSV85_ignoreEmpty.txt</exclude>
      <exclude>src/test/resources/ferc.gov/contract.txt</exclude>
      <exclude>src/test/resources/ferc.gov/transaction.txt</exclude>
    </excludes>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.rat</groupId>
  <artifactId>apache-rat-plugin</artifactId>
  <configuration>
    <excludes>
      <exclude>.gitattributes</exclude>
      <exclude>.gitignore</exclude>
      <exclude>.git/**</exclude>
      <exclude>.idea/**</exclude>
      <exclude>**/build/**</exclude>
    </excludes>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.rat</groupId>
  <artifactId>apache-rat-plugin</artifactId>
  <configuration>
    <excludes>
      <exclude>.gitattributes</exclude>
      <exclude>.gitignore</exclude>
      <exclude>.git/**</exclude>
      <exclude>.idea/**</exclude>
      <exclude>**/build/**</exclude>
      <exclude>**/patchprocess/**</exclude>
    </excludes>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.rat</groupId>
  <artifactId>apache-rat-plugin</artifactId>
  <configuration>
    <excludes>
      <exclude>.gitattributes</exclude>
      <exclude>.gitignore</exclude>
      <exclude>.git/**</exclude>
      <exclude>.idea/**</exclude>
    </excludes>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.rat</groupId>
  <artifactId>apache-rat-plugin</artifactId>
  <configuration>
    <licenses>
      <license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
        <patterns>
          <note>CERN license for Colt -- basically only requires attribution</note>
          <pattern>1999 CERN - European Organization for Nuclear Research</pattern>
        </patterns>
      </license>
      <license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
        <patterns>
          <pattern>public domain</pattern>
        </patterns>
      </license>
    </licenses>
    <excludes>
      <exclude>**/*.conf</exclude>
      <exclude>**/*.iml</exclude>
      <exclude>**/*.md</exclude>
      <exclude>**/*.props</exclude>
      <exclude>**/gen/**</exclude>
      <exclude>**/resources/**</exclude>
      <exclude>**/images/**</exclude>
      <exclude>**/target/**</exclude>
      <exclude>**/testdata/**</exclude>
      <exclude>**/.idea/**</exclude>
      <exclude>**/package-info.java</exclude>
      <exclude>**/.git/**</exclude>
      <exclude>**/.classpath</exclude>
      <exclude>**/.project</exclude>
      <exclude>**/.settings/**</exclude>
      <exclude>**/*.patch</exclude>
    </excludes>
    <excludeSubProjects>false</excludeSubProjects>
  </configuration>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.