creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pottlin...@apache.org
Subject svn commit: r1623233 - in /creadur/tentacles/trunk: ./ src/main/java/org/apache/creadur/tentacles/ src/site/
Date Sun, 07 Sep 2014 21:57:42 GMT
Author: pottlinger
Date: Sun Sep  7 21:57:42 2014
New Revision: 1623233

URL: http://svn.apache.org/r1623233
Log:
TENTACLES-4 Build infra

* Updating dependencies.
* Adding rat to every run and rat report to site reports.
* Started basic site and augmented pom.xml
* Enabled new maven skin for tentacles site.
* LHF: Removed some PMD warnings.


Added:
    creadur/tentacles/trunk/src/site/
    creadur/tentacles/trunk/src/site/site.xml
Modified:
    creadur/tentacles/trunk/pom.xml
    creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Deauthorize.java
    creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/IOSystem.java
    creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Main.java
    creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/NexusClient.java

Modified: creadur/tentacles/trunk/pom.xml
URL: http://svn.apache.org/viewvc/creadur/tentacles/trunk/pom.xml?rev=1623233&r1=1623232&r2=1623233&view=diff
==============================================================================
--- creadur/tentacles/trunk/pom.xml (original)
+++ creadur/tentacles/trunk/pom.xml Sun Sep  7 21:57:42 2014
@@ -30,19 +30,29 @@
   <description>Utility to download binaries from a remote repository and scan them
for LICENSE and NOTICE files</description>
   <dependencies>
     <dependency>
+      <groupId>org.apache.maven.skins</groupId>
+      <artifactId>maven-fluido-skin</artifactId>
+      <version>1.3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.rat</groupId>
+      <artifactId>apache-rat-plugin</artifactId>
+      <version>${apacheRatVersion}</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>
-      <version>4.3.2</version>
+      <version>${httpClientVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore</artifactId>
-      <version>4.3.2</version>
+      <version>${httpClientVersion}</version>
     </dependency>
     <dependency>
       <groupId>com.fasterxml.jackson.module</groupId>
       <artifactId>jackson-module-jaxb-annotations</artifactId>
-      <version>2.4.0</version>
+      <version>2.4.2</version>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
@@ -57,33 +67,49 @@
     <dependency>
       <groupId>org.codehaus.swizzle</groupId>
       <artifactId>swizzle-stream</artifactId>
-      <!-- Upgrade when 1.6.2 is released -->
-      <!--version>1.6.2-SNAPSHOT</version-->
-      <version>1.6.1</version>
+      <version>1.6.2</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.8.1</version>
+      <version>4.11</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <javaVersion>1.6</javaVersion>
+    <httpClientVersion>4.3.2</httpClientVersion>
+    <apacheRatVersion>0.11</apacheRatVersion>
   </properties>
   <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>
+  <ciManagement>
+    <system>Buildbot</system>
+    <url>http://ci.apache.org/builders/tentacles_trunk</url>
+    <!--
 		Jenkins builds are at:
 		https://builds.apache.org/job/Creadur-Tentacles/ - check Java6 compliance and run all tests
 		https://builds.apache.org/job/Creadur-Tentacles-Site/ - generate mvn site
-	</ciManagement>
 	 -->
+  </ciManagement>
+  <mailingLists>
+    <mailingList>
+      <name>Whisker Development (Apache Creadur project)</name>
+      <subscribe>dev-subscribe@creadur.apache.org</subscribe>
+      <unsubscribe>dev-unsubscribe@creadur.apache.org</unsubscribe>
+      <post>dev@creadur.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/creadur-dev/</archive>
+    </mailingList>
+    <mailingList>
+      <name>WHisker Commits (Apache Creadur project)</name>
+      <subscribe>commits-subscribe@creadur.apache.org</subscribe>
+      <unsubscribe>commits-unsubscribe@creadur.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/creadur-commits/</archive>
+    </mailingList>
+  </mailingLists>
   <build>
     <defaultGoal>install</defaultGoal>
     <plugins>
@@ -91,11 +117,66 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
+          <source>${javaVersion}</source>
+          <target>${javaVersion}</target>
         </configuration>
       </plugin>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <executions>
+          <execution>
+            <!-- This checks the bytecode version of the dependencies transitively -->
+            <id>enforce-bytecode-version</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <enforceBytecodeVersion>
+                  <maxJdkVersion>${javaVersion}</maxJdkVersion>
+                </enforceBytecodeVersion>
+              </rules>
+              <fail>true</fail>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>extra-enforcer-rules</artifactId>
+            <version>1.0-beta-2</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>animal-sniffer-maven-plugin</artifactId>
+        <version>1.11</version>
+        <executions>
+          <execution>
+            <!-- This checks the source code of our project -->
+            <!--
+              Note that this cannot use our ${javaVersion} property, so it must
+              be changed manually when we decide to move to a higher version of
+              Java
+            -->
+            <id>check-java-1.6-compat</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+            <configuration>
+              <signature>
+                <groupId>org.codehaus.mojo.signature</groupId>
+                <artifactId>java16</artifactId>
+                <version>1.0</version>
+              </signature>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
         <configuration>
           <appendAssemblyId>true</appendAssemblyId>
@@ -130,10 +211,6 @@
           <!-- 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>
@@ -231,38 +308,50 @@
             <plugin>
               <groupId>org.apache.rat</groupId>
               <artifactId>apache-rat-plugin</artifactId>
-              <version>0.10</version>
+              <version>${apacheRatVersion}</version>
             </plugin>
           </reportPlugins>
         </configuration>
       </plugin>
     </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>${apacheRatVersion}</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>
+    </pluginManagement>
   </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>
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/creadur/tentacles/trunk</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/creadur/tentacles/trunk</developerConnection>
+    <url>http://svn.apache.org/repos/asf/creadur/tentacles/trunk</url>
+  </scm>
+  <licenses>
+    <license>
+      <name>Apache License, Version 2</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+      <comments>An OSI approved open source license.</comments>
+    </license>
+  </licenses>
+  <organization>
+    <name>Apache Software Foundation</name>
+    <url>http://www.apache.org</url>
+  </organization>
 </project>

Modified: creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Deauthorize.java
URL: http://svn.apache.org/viewvc/creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Deauthorize.java?rev=1623233&r1=1623232&r2=1623233&view=diff
==============================================================================
--- creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Deauthorize.java (original)
+++ creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Deauthorize.java Sun
Sep  7 21:57:42 2014
@@ -112,7 +112,7 @@ public class Deauthorize {
             final String text = io.slurp(file);
 
             // You really can't trust text to be in the native line ending
-            final String eol = (text.contains("\r\n")) ? "\r\n" : "\n";
+            final String eol = text.contains("\r\n") ? "\r\n" : "\n";
             final String startComment = eol + "/*";
             final String endComment = "*/" + eol;
 

Modified: creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/IOSystem.java
URL: http://svn.apache.org/viewvc/creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/IOSystem.java?rev=1623233&r1=1623232&r2=1623233&view=diff
==============================================================================
--- creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/IOSystem.java (original)
+++ creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/IOSystem.java Sun Sep
 7 21:57:42 2014
@@ -34,10 +34,13 @@ import java.io.OutputStream;
 import java.net.URL;
 import java.util.zip.ZipInputStream;
 
+import org.apache.log4j.Logger;
+
 /**
  * @version $Rev$ $Date$
  */
 public class IOSystem {
+    private static final Logger LOG = Logger.getLogger(IOSystem.class);
 
     public String slurp(final File file) throws IOException {
         final ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -114,10 +117,12 @@ public class IOSystem {
                 ((Flushable) closeable).flush();
             }
         } catch (final IOException e) {
+        	LOG.error("Error when trying to flush before closing " + closeable, e);
         }
         try {
             closeable.close();
         } catch (final IOException e) {
+        	LOG.error("Error when trying to close " + closeable, e);
         }
     }
 

Modified: creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Main.java
URL: http://svn.apache.org/viewvc/creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Main.java?rev=1623233&r1=1623232&r2=1623233&view=diff
==============================================================================
--- creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Main.java (original)
+++ creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Main.java Sun Sep 
7 21:57:42 2014
@@ -52,8 +52,7 @@ public class Main {
         root.setLevel(Level.INFO);
     }
 
-    private static final org.apache.log4j.Logger log = org.apache.log4j.Logger
-            .getLogger(Main.class);
+    private static final Logger log = Logger.getLogger(Main.class);
     private static final String CRAWL_PATTERN = ".*\\.(jar|zip|war|ear|rar|tar.gz)";
 
     private final Reports reports;

Modified: creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/NexusClient.java
URL: http://svn.apache.org/viewvc/creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/NexusClient.java?rev=1623233&r1=1623232&r2=1623233&view=diff
==============================================================================
--- creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/NexusClient.java (original)
+++ creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/NexusClient.java Sun
Sep  7 21:57:42 2014
@@ -49,7 +49,7 @@ public class NexusClient {
     public File download(final URI uri, final File file) throws IOException {
         if (file.exists()) {
 
-            final long length = getConentLength(uri);
+            final long length = getContentLength(uri);
 
             if (file.length() == length) {
                 log.info("Exists " + uri);
@@ -72,14 +72,13 @@ public class NexusClient {
         return file;
     }
 
-    private long getConentLength(final URI uri) throws IOException {
+    private long getContentLength(final URI uri) throws IOException {
         final HttpResponse head = head(uri);
         final Header[] headers = head.getHeaders("Content-Length");
 
-        for (final Header header : headers) {
-            return new Long(header.getValue());
+        if(headers != null && headers.length >= 1) {
+        	return Long.valueOf(headers[0].getValue());
         }
-
         return -1;
     }
 

Added: creadur/tentacles/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/creadur/tentacles/trunk/src/site/site.xml?rev=1623233&view=auto
==============================================================================
--- creadur/tentacles/trunk/src/site/site.xml (added)
+++ creadur/tentacles/trunk/src/site/site.xml Sun Sep  7 21:57:42 2014
@@ -0,0 +1,60 @@
+<project name="apache-tentacles">
+  <skin>
+    <groupId>org.apache.maven.skins</groupId>
+    <artifactId>maven-fluido-skin</artifactId>
+    <version>1.3.1</version>
+  </skin>
+
+  <custom>
+    <fluidoSkin>
+<googleSearch>
+        <sitesearch/>
+      </googleSearch>
+      <topBarEnabled>true</topBarEnabled>
+      <sideBarEnabled>true</sideBarEnabled>
+    </fluidoSkin>
+  </custom>
+
+<body>
+    <menu name="The Apache Software Foundation" inherit="bottom">
+        <item name='About the Foundation'
+            href="http://www.apache.org/foundation"/>
+        <item name='The projects'
+            href="http://projects.apache.org"/>
+        <item name='The people'
+            href="http://people.apache.org"/>
+        <item name='How we work'
+            href='http://www.apache.org/foundation/how-it-works.html'/>
+        <item name='Our history'
+            href='http://www.apache.org/foundation/how-it-works.html#history'/>
+        <item name='News'
+            href='http://blogs.apache.org/foundation/'/>
+    </menu>
+
+    <menu name="Contribute" inherit="bottom">
+      <item name="Get Involved" href='http://www.apache.org/foundation/getinvolved.html'/>
+    </menu>
+
+    <menu name="Committer Info" inherit="bottom">
+      <item name="Publish this site" href="site-publish.html"/>
+      <item name="Committers' FAQ" href='http://www.apache.org/dev/committers.html'/>
+      <item name='New Committers Guide' href='http://www.apache.org/dev/new-committers-guide.html'/>
+      <item name='Plant Apache' href='http://planet.apache.org/committers/'/>
+      <item name='Community' href='http://community.apache.org/'/>
+      <item name='Legal' href='http://www.apache.org/legal/'/>
+      <item name='Branding' href='http://www.apache.org/foundation/marks/'/>
+      <item name='Media Relations' href='http://www.apache.org/press/'/>
+    </menu>
+
+    <menu ref="modules"/>
+    <menu ref="reports"/>
+
+    <footer>Copyright &#169; 2014 The Apache Software Foundation, Licensed under
the Apache License, Version 2.0.
+      Apache Creadur, Creadur, Apache Rat, Apache Tentacles, Apache Whisker, Apache and the
Apache feather logo are trademarks
+      of The Apache Software Foundation.
+      Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+      All other marks mentioned may be trademarks or registered trademarks of their respective
owners.</footer>
+
+</body>
+
+</project>



Mime
View raw message