creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1462786 - in /creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles: Deauthorize.java FileSystem.java Files.java Main.java NexusClient.java
Date Sat, 30 Mar 2013 15:53:46 GMT
Author: rdonkin
Date: Sat Mar 30 15:53:46 2013
New Revision: 1462786

URL: http://svn.apache.org/r1462786
Log:
First steps towards injecting an object

Added:
    creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/FileSystem.java
      - copied, changed from r1462784, creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Files.java
Removed:
    creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Files.java
Modified:
    creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Deauthorize.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/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=1462786&r1=1462785&r2=1462786&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 Sat
Mar 30 15:53:46 2013
@@ -85,7 +85,7 @@ public class Deauthorize {
      * @throws IOException
      */
     private static void deauthorize(File dir) throws IOException {
-        for (File file : Files.collect(dir, ".*\\.java")) {
+        for (File file : FileSystem.collect(dir, ".*\\.java")) {
 
             if (not(file.canRead(), "File not readable: %s", file.getAbsolutePath())) continue;
 

Copied: creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/FileSystem.java
(from r1462784, creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Files.java)
URL: http://svn.apache.org/viewvc/creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/FileSystem.java?p2=creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/FileSystem.java&p1=creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Files.java&r1=1462784&r2=1462786&rev=1462786&view=diff
==============================================================================
--- creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/Files.java (original)
+++ creadur/tentacles/trunk/src/main/java/org/apache/creadur/tentacles/FileSystem.java Sat
Mar 30 15:53:46 2013
@@ -25,7 +25,7 @@ import java.util.regex.Pattern;
 /**
  * @version $Rev$ $Date$
  */
-public class Files {
+public class FileSystem {
 
     public static List<File> collect(final File dir, final String regex) {
         return collect(dir, Pattern.compile(regex));

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=1462786&r1=1462785&r2=1462786&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 Sat Mar 30
15:53:46 2013
@@ -74,13 +74,13 @@ public class Main {
         this.local =
                 new File(this.configuration.getRootDirectoryForLocalOutput());
 
-        Files.mkdirs(this.local);
+        FileSystem.mkdirs(this.local);
 
         this.repository = new File(this.local, "repo");
         this.content = new File(this.local, "content");
 
-        Files.mkdirs(this.repository);
-        Files.mkdirs(this.content);
+        FileSystem.mkdirs(this.repository);
+        FileSystem.mkdirs(this.content);
 
         log.info("Remote repository: "
                 + this.configuration.getStagingRepositoryURI());
@@ -113,7 +113,7 @@ public class Main {
         prepare();
 
         final List<File> jars =
-                Files.collect(this.repository, new FileFilter() {
+                FileSystem.collect(this.repository, new FileFilter() {
                     @Override
                     public boolean accept(final File pathname) {
                         return pathname.isFile();
@@ -151,7 +151,7 @@ public class Main {
 
         for (final Archive archive : archives) {
             final List<File> files =
-                    Files.collect(contents(archive.getFile()),
+                    FileSystem.collect(contents(archive.getFile()),
                             new LicenseFilter());
             for (final File file : files) {
                 final License license = new License(IO.slurp(file));
@@ -201,7 +201,7 @@ public class Main {
 
         final File contents = contents(archive.getFile());
         final List<File> files =
-                Files.collect(contents, new Filters(
+                FileSystem.collect(contents, new Filters(
                         new DeclaredFilter(contents), new LicenseFilter()));
 
         for (final File file : files) {
@@ -239,7 +239,7 @@ public class Main {
 
             final File contents = contents(archive.getFile());
             final List<File> files =
-                    Files.collect(contents, new Filters(new DeclaredFilter(
+                    FileSystem.collect(contents, new Filters(new DeclaredFilter(
                             contents), new NoticeFilter()));
 
             for (final File file : files) {
@@ -276,7 +276,7 @@ public class Main {
 
         for (final Archive archive : archives) {
             final List<File> files =
-                    Files.collect(contents(archive.getFile()),
+                    FileSystem.collect(contents(archive.getFile()),
                             new NoticeFilter());
             for (final File file : files) {
                 final Notice notice = new Notice(IO.slurp(file));
@@ -310,7 +310,7 @@ public class Main {
     }
 
     private List<URI> allNoticeFiles() {
-        final List<File> legal = Files.collect(this.content, new LegalFilter());
+        final List<File> legal = FileSystem.collect(this.content, new LegalFilter());
         for (final File file : legal) {
             log.info("Legal " + file);
         }
@@ -344,7 +344,7 @@ public class Main {
                 .startsWith("file:")) {
             final File file =
                     new File(this.configuration.getStagingRepositoryURI());
-            final List<File> collect = Files.collect(file, new FileFilter() {
+            final List<File> collect = FileSystem.collect(file, new FileFilter() {
                 @Override
                 public boolean accept(final File pathname) {
                     final String path = pathname.getAbsolutePath();
@@ -385,7 +385,7 @@ public class Main {
 
                     final File fileEntry = new File(contents, path);
 
-                    Files.mkparent(fileEntry);
+                    FileSystem.mkparent(fileEntry);
 
                     // Open the output file
 
@@ -556,7 +556,7 @@ public class Main {
         }
 
         final File contents = new File(this.content, path + ".contents");
-        Files.mkdirs(contents);
+        FileSystem.mkdirs(contents);
         return contents;
     }
 
@@ -574,7 +574,7 @@ public class Main {
 
         log.info("Copy " + uri);
 
-        Files.mkparent(file);
+        FileSystem.mkparent(file);
 
         IO.copy(IO.read(src), file);
 
@@ -751,7 +751,7 @@ public class Main {
         private Map<URI, URI> mapOther() {
             final File jarContents = contents(this.file);
             final List<File> legal =
-                    Files.collect(jarContents,
+                    FileSystem.collect(jarContents,
                             new Filters(new N(new DeclaredFilter(jarContents)),
                                     new LegalFilter()));
 
@@ -769,7 +769,7 @@ public class Main {
         private Map<URI, URI> map() {
             final File jarContents = contents(this.file);
             final List<File> legal =
-                    Files.collect(jarContents, new Filters(new DeclaredFilter(
+                    FileSystem.collect(jarContents, new Filters(new DeclaredFilter(
                             jarContents), new LegalFilter()));
 
             final Map<URI, URI> map = new LinkedHashMap<URI, URI>();

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=1462786&r1=1462785&r2=1462786&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 Sat
Mar 30 15:53:46 2013
@@ -59,7 +59,7 @@ public class NexusClient {
 
         final InputStream content = response.getEntity().getContent();
 
-        Files.mkparent(file);
+        FileSystem.mkparent(file);
 
         IO.copy(content, file);
 



Mime
View raw message