TENTACLES-4 Streamline Build Infrastructure
- Added rat profile to enable RAT checks.
- Added rat reports to site-plugin configuration.
- Upgraded dependencies and added license headers and exclusions.
git-svn-id: https://svn.apache.org/repos/asf/creadur/tentacles/trunk@1618987 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 58329ee..a9cbb8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,58 +15,45 @@
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">
+<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>
-
-
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>14</version>
</parent>
-
<groupId>org.apache.creadur.tentacles</groupId>
<artifactId>apache-tentacles</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<name>Apache Tentacles</name>
<description>Utility to download binaries from a remote repository and scan them for LICENSE and NOTICE files</description>
-
-
<dependencies>
-
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.2</version>
</dependency>
-
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3.2</version>
</dependency>
-
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.4.0</version>
</dependency>
-
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.16</version>
+ <version>1.2.17</version>
</dependency>
-
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
-
<dependency>
<groupId>org.codehaus.swizzle</groupId>
<artifactId>swizzle-stream</artifactId>
@@ -74,27 +61,21 @@
<!--version>1.6.2-SNAPSHOT</version-->
<version>1.6.1</version>
</dependency>
-
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
-
</dependencies>
-
-
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
-
- <issueManagement>
- <system>JIRA</system>
- <url>https://issues.apache.org/jira/browse/TENTACLES</url>
- </issueManagement>
-
- <!-- TODO
+ <issueManagement>
+ <system>JIRA</system>
+ <url>https://issues.apache.org/jira/browse/TENTACLES</url>
+ </issueManagement>
+ <!-- TODO
<ciManagement>
<system>Jenkins</system>
<url>http://ci.apache.org/builders/tentacles_trunk</url>
@@ -103,7 +84,6 @@
https://builds.apache.org/job/Creadur-Tentacles-Site/ - generate mvn site
</ciManagement>
-->
-
<build>
<defaultGoal>install</defaultGoal>
<plugins>
@@ -115,7 +95,6 @@
<target>1.6</target>
</configuration>
</plugin>
-
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
@@ -139,8 +118,150 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.4</version>
+ <configuration>
+ <outputEncoding>${project.build.sourceEncoding}</outputEncoding>
+ <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
+ <relativizeDecorationLinks>false</relativizeDecorationLinks>
+ <!-- reporting plugins are configured according to new mvn3 standard -->
+ <!-- Until Maven finds a way to allow inheritance, duplicated in plugin4maven -->
+ <reportPlugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.12.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <aggregate>true</aggregate>
+ <linkJavadoc>true</linkJavadoc>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.17</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <!-- Later versions require Java 1.6+ -->
+ <version>3.1</version>
+ <configuration>
+ <linkXRef>true</linkXRef>
+ <sourceEncoding>utf-8</sourceEncoding>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>${target.jdk}</targetJdk>
+ <excludes>
+ <exclude>**/generated/**/*.java</exclude>
+ <exclude>**/target/clover/**/*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <!-- read changes.xml -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>2.10</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>changes-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ <!-- jdepend plugin -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <!-- cobertura plugin -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+ <!-- catch code tags -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <tags>
+ <tag>TODO</tag>
+ <tag>todo</tag>
+ <tag>FIXME</tag>
+ <tag>fixme</tag>
+ <tag>REFACTOR</tag>
+ <tag>refactor</tag>
+ <tag>REVIEW</tag>
+ <tag>review</tag>
+ <tag>@todo</tag>
+ <tag>@deprecated</tag>
+ </tags>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.10</version>
+ </plugin>
+ </reportPlugins>
+ </configuration>
+ </plugin>
</plugins>
</build>
-
+ <profiles>
+ <profile>
+ <id>rat</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.10</version>
+ <configuration>
+ <excludes>
+ <exclude>README*</exclude>
+ <exclude>src/main/resources/licenses/*</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
-
diff --git a/src/main/java/org/apache/creadur/tentacles/Deauthorize.java b/src/main/java/org/apache/creadur/tentacles/Deauthorize.java
index 66cd5b5..af493b3 100644
--- a/src/main/java/org/apache/creadur/tentacles/Deauthorize.java
+++ b/src/main/java/org/apache/creadur/tentacles/Deauthorize.java
@@ -41,7 +41,7 @@
*
* @param args
* a list of directories to scan and fix
- * @throws Exception
+ * @throws Exception in case of errors.
*/
public static void main(final String[] args) throws Exception {
diff --git a/src/main/resources/legal/style.css b/src/main/resources/legal/style.css
index 19f7734..a7ffcba 100644
--- a/src/main/resources/legal/style.css
+++ b/src/main/resources/legal/style.css
@@ -1,3 +1,23 @@
+/**
+####################################################################################
+#
+# 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.
+#
+####################################################################################
+**/
pre {
background: #eee;
}
diff --git a/src/test/java/org/apache/creadur/tentacles/filter/ListOfFilesFilterTest.java b/src/test/java/org/apache/creadur/tentacles/filter/ListOfFilesFilterTest.java
index be2520c..2e028ee 100644
--- a/src/test/java/org/apache/creadur/tentacles/filter/ListOfFilesFilterTest.java
+++ b/src/test/java/org/apache/creadur/tentacles/filter/ListOfFilesFilterTest.java
@@ -1,3 +1,21 @@
+/**
+ * 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.
+ */
package org.apache.creadur.tentacles.filter;
import static org.junit.Assert.*;