archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r613739 - in /maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper: Synchronizer.java SynchronizerOptions.java
Date Mon, 21 Jan 2008 03:11:38 GMT
Author: carlos
Date: Sun Jan 20 19:11:37 2008
New Revision: 613739

URL: http://svn.apache.org/viewvc?rev=613739&view=rev
Log:
Bugfixes

Modified:
    maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/Synchronizer.java
    maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/SynchronizerOptions.java

Modified: maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/Synchronizer.java
URL: http://svn.apache.org/viewvc/maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/Synchronizer.java?rev=613739&r1=613738&r2=613739&view=diff
==============================================================================
--- maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/Synchronizer.java
(original)
+++ maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/Synchronizer.java
Sun Jan 20 19:11:37 2008
@@ -81,15 +81,19 @@
     }
 
     private void addCommonArguments(Commandline cl, SyncedRepository repo) {
-        cl.createArg().setValue(DRY_RUN);
+        if (options.isDryRun()) {
+            cl.createArg().setValue(DRY_RUN);
+        }
         // cl.createArg().setValue("$RSYNC_OPTS");
         cl.createArg().setValue("-Lrtivz");
         if (SyncedRepository.PROTOCOL_SSH.equals(repo.getProtocol())) {
             String s = repo.getSshOptions() == null ? "" : repo.getSshOptions();
             cl.createArg().setValue("--rsh=ssh " + s);
         }
-        cl.createArg().setValue(repo.getLocation() + "/" + repo.getGroupId());
-        cl.createArg().setValue(options.getBasedir() + "/" + repo.getGroupId());
+
+        String groupDir = repo.getGroupId().replaceAll("\\.", "\\/");
+        cl.createArg().setValue(repo.getLocation() + "/" + groupDir + "/");
+        cl.createArg().setValue(options.getBasedir() + "/" + groupDir + "/");
     }
 
     private int executeCommandLine(Commandline cl) {
@@ -145,9 +149,11 @@
             }
         }
 
-        String go = args[i++];
-        if ((go != null) && ("go".equals(go))) {
-            options.setDryRun(false);
+        if (args.length == 3) {
+            String go = args[i++];
+            if ((go != null) && ("go".equals(go))) {
+                options.setDryRun(false);
+            }
         }
 
         synchronizer.sync(repositories);

Modified: maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/SynchronizerOptions.java
URL: http://svn.apache.org/viewvc/maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/SynchronizerOptions.java?rev=613739&r1=613738&r2=613739&view=diff
==============================================================================
--- maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/SynchronizerOptions.java
(original)
+++ maven/archiva/tools/trunk/maven-meeper/src/main/java/org/apache/maven/archiva/meeper/SynchronizerOptions.java
Sun Jan 20 19:11:37 2008
@@ -1,6 +1,7 @@
 package org.apache.maven.archiva.meeper;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
@@ -49,21 +50,21 @@
 
     public static SynchronizerOptions parse(File f) {
 
-        FileReader reader;
+        FileInputStream is;
         try {
-            reader = new FileReader(f);
+            is = new FileInputStream(f);
         } catch (FileNotFoundException e) {
             throw new IllegalArgumentException("File does not exist: " + f, e);
         }
 
         Properties properties = new Properties();
         try {
-            properties.load(reader);
+            properties.load(is);
         } catch (IOException e) {
             throw new RuntimeException(e);
         } finally {
             try {
-                reader.close();
+                is.close();
             } catch (IOException e) {
             }
         }



Mime
View raw message