incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: rev 23097 - incubator/depot/trunk/update/src/java/org/apache/depot/update/tool
Date Tue, 20 Jul 2004 21:00:23 GMT
Author: mmay
Date: Tue Jul 20 14:00:23 2004
New Revision: 23097

Modified:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/Tool.java
Log:
Added UpdaterConfig once again


Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java
Tue Jul 20 14:00:23 2004
@@ -28,9 +28,8 @@
 	private static Option l_targetOption = null;
 	private static Option l_groupOption = null;
 	private static Option l_configOption = null;
-	static {
-		l_repoOption = new Option("r", "repo", true, "Repository");
-
+	static {l_repoOption = new Option("r", "repo", true, "Repository");
+	
 		l_configOption = new Option("c", "config", true,
 				"The configuration file");
 		l_groupOption = new Option("g", "group", true, "The group to go get");
@@ -61,28 +60,32 @@
 		// Optional configuration
 		String configName = cmdline.getOptionValue(l_configOption);
 		// Optional repository URL
-		String repoUrl = cmdline.getOptionValue(l_repoOption);
-
+		String repoUrl=cmdline.getOptionValue(l_repoOption);
+		
 		ArtifactUpdater updater = new ArtifactUpdater();
-
-		if (null != repoUrl) {
+		
+		if (null != repoUrl)
+		{
 			RepositorySet repoSet = new RepositorySet("gump");
-			repoSet.addRepository(new DefaultRepository("gump", repoUrl));
+			repoSet.addRepository(new DefaultRepository("gump",repoUrl));
 			updater.setRepositorySet(repoSet);
-		} else {
-			updater.setRepositorySet(RepositorySet.getRepositorySet("gump",
-					false));
+		}
+		else
+		{
+			updater.setRepositorySet(
+						RepositorySet.getRepositorySet("gump",
+									false));
 		}
 
 		// Assigned the target (to copy into)
 		updater.setTargetRepository(getTargetRepository(targetDir));
-
+		
 		// The group to go get
 		ArtifactGroup group = new ArtifactGroup(groupName);
 
 		// Update...
 		updater.getArtifacts(group);
-
+		
 		// Cleanup (to remove duplicates)
 		updater.cleanTarget(group);
 	}
@@ -90,4 +93,4 @@
 	public static void main(String[] args) {
 		(new DownloaderTool()).run(args);
 	}
-}
\ No newline at end of file
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/Tool.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/Tool.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/Tool.java	Tue Jul 20
14:00:23 2004
@@ -26,6 +26,7 @@
 import org.apache.depot.common.util.cli.Options;
 import org.apache.depot.common.util.cli.ParseException;
 import org.apache.depot.common.util.debug.DebugUtils;
+import org.apache.depot.update.config.UpdaterConfig;
 import org.apache.depot.update.monitor.Monitor;
 import org.apache.depot.update.monitor.StatisticsMonitor;
 import org.apache.depot.update.version.VersionHelper;
@@ -100,6 +101,7 @@
 		//:TODO:Hack
 		//DebugUtils.enableCommonsLogging();
 		//DebugUtils.enableHttpClientDebug();
+		UpdaterConfig.configure();
 		init();
 		CommandLine cmdline = parseCommandLine(args);
 		if (l_help) {

Mime
View raw message