From depot-cvs-return-677-apmail-incubator-depot-cvs-archive=incubator.apache.org@incubator.apache.org Wed Aug 18 20:43:19 2004 Return-Path: Delivered-To: apmail-incubator-depot-cvs-archive@www.apache.org Received: (qmail 63417 invoked from network); 18 Aug 2004 20:43:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Aug 2004 20:43:19 -0000 Received: (qmail 85190 invoked by uid 500); 18 Aug 2004 20:43:18 -0000 Delivered-To: apmail-incubator-depot-cvs-archive@incubator.apache.org Received: (qmail 85160 invoked by uid 500); 18 Aug 2004 20:43:18 -0000 Mailing-List: contact depot-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: depot-dev@incubator.apache.org Delivered-To: mailing list depot-cvs@incubator.apache.org Received: (qmail 85130 invoked by uid 99); 18 Aug 2004 20:43:18 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Wed, 18 Aug 2004 13:43:17 -0700 Received: (qmail 63383 invoked by uid 65534); 18 Aug 2004 20:43:17 -0000 Date: 18 Aug 2004 20:43:17 -0000 Message-ID: <20040818204317.63381.qmail@minotaur.apache.org> From: ajack@apache.org To: depot-cvs@incubator.apache.org Subject: svn commit: rev 36579 - incubator/depot/trunk/update/src/java/org/apache/depot/update/tool X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: ajack Date: Wed Aug 18 13:43:16 2004 New Revision: 36579 Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java Log: Added -rs (-set) to DownloaderTool so Gump can specify a repository set (i.e. gump) not just a URL. 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 Wed Aug 18 13:43:16 2004 @@ -14,6 +14,7 @@ * limitations under the License. */ package org.apache.depot.update.tool; +import org.apache.depot.common.DepotException; import org.apache.depot.common.log.Logger; import org.apache.depot.common.util.cli.CommandLine; import org.apache.depot.common.util.cli.Option; @@ -29,6 +30,7 @@ private static Option l_repoOption = null; private static Option l_targetOption = null; private static Option l_groupOption = null; + private static Option l_setOption = null; private static Option l_configOption = null; static { l_repoOption = new Option("r", "repo", true, "Repository"); @@ -36,6 +38,7 @@ l_configOption = new Option("c", "config", true, "The configuration file"); l_groupOption = new Option("g", "group", true, "The group to go get"); + l_setOption = new Option("rs", "set", true, "The repository set to use"); l_targetOption = new Option("t", "target", true, "The target directory to put it into"); } @@ -48,6 +51,7 @@ getOptions().addOption(l_repoOption); getOptions().addOption(l_configOption); getOptions().addOption(l_groupOption); + getOptions().addOption(l_setOption); getOptions().addOption(l_targetOption); } @@ -64,6 +68,8 @@ String configName = cmdline.getOptionValue(l_configOption); // Optional repository URL String repoUrl = cmdline.getOptionValue(l_repoOption); + // Optional repository set name + String setName = cmdline.getOptionValue(l_setOption); ArtifactUpdater updater = new ArtifactUpdater(); @@ -74,8 +80,13 @@ Logger.getLogger().info("Repository @ " + repoUrl); } else { - updater.setRepositorySet(RepositorySet.getRepositorySet("gump", + if (null != setName) { + + updater.setRepositorySet(RepositorySet.getRepositorySet(setName, false)); + } + else + throw new DepotException("No repository URL or set specificed."); } if ( null != configName )