dion 2002/06/18 17:14:27
Modified: src/java/org/apache/maven Build.java
Log:
Added more repository handling (this is a test for netbeans commits)
Revision Changes Path
1.10 +37 -4 jakarta-turbine-maven/src/java/org/apache/maven/Build.java
Index: Build.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/Build.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Build.java 17 Jun 2002 16:21:36 -0000 1.9
+++ Build.java 19 Jun 2002 00:14:27 -0000 1.10
@@ -61,6 +61,9 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.MissingArgumentException;
@@ -267,16 +270,46 @@
// if not, check if it's in the list of non-distributables and warn
// the user?
}
+
+ /**
+ * Verify dependencies for the build are available
+ */
+ public void verifyDependencies()
+ {
+ }
/**
- * The local repository of jar files, aka lib.repo
+ * The local repository of jar files, aka lib.repo/maven.repo.local
*
* @return a local Repository of jars
*/
- private Repository getLocalRepository() throws MalformedURLException
+ public Repository getLocalRepository() throws MalformedURLException
{
- File libRepo = new File(getProperty("lib.repo"));
+ File libRepo = new File(getProperty("maven.repo.local"));
return new Repository(libRepo.toURL().toExternalForm());
+ }
+
+ /**
+ * The list of remote repositories, aka maven.repo.remote
+ */
+ public Repository[] getRemoteRepositories() throws MalformedURLException
+ {
+ String remoteList = getProperty("maven.repo.remote");
+
+ if (remoteList == null)
+ {
+ return new Repository[0];
+ }
+
+ StringTokenizer tokenizer = new StringTokenizer(remoteList, ",");
+ List tokens = new ArrayList();
+
+ while (tokenizer.hasMoreTokens())
+ {
+ tokens.add(new Repository(tokenizer.nextToken().trim()));
+ }
+
+ return (Repository[]) tokens.toArray(new Repository[0]);
}
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>