incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickcha...@apache.org
Subject svn commit: rev 20190 - in incubator/depot/trunk/update/src: java/org/apache/depot/update/ant/cache sample/export
Date Fri, 21 May 2004 07:53:18 GMT
Author: nickchalko
Date: Fri May 21 00:53:17 2004
New Revision: 20190

Modified:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSetExportTask.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java
   incubator/depot/trunk/update/src/sample/export/build.xml
Log:
group works,  remote version now works.

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSetExportTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSetExportTask.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSetExportTask.java
Fri May 21 00:53:17 2004
@@ -22,6 +22,9 @@
 import java.io.Writer;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.depot.version.Version;
+import org.apache.depot.version.specification.formatting.VersionFormat;
+import org.apache.depot.version.specification.formatting.VersionFormatFactory;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
 /**
@@ -98,8 +101,13 @@
 						+ nameValue("group", resource.getGroup() == null
 								? resource.getName()
 								: resource.getGroup()));
+				Version version = resource.getDownloadedVersion();
+				if (version == null) {
+					version = Version.UNKNOWN;
+				}
+			
 				out.println("              "
-						+ nameValue("version", resource.getDownloadedVersion().toString()));
+						+ nameValue("version", version.toString()));
 				out.println("              "
 						+ nameValue("href", resource.getDownloadedFrom()));
 				out.println("     />");

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java
Fri May 21 00:53:17 2004
@@ -205,27 +205,26 @@
 	public String getDownloadedFrom() {
 		if (bestRemoteResource == null) {
 			bestRemoteResource = findBestRemoteResource();
-			if (bestRemoteResource != null) {
-				return bestRemoteResource.getLocation().toExternalForm();
-			}
 		}
-		return null;
+		if (bestRemoteResource != null) {
+			return bestRemoteResource.getLocation().toExternalForm();
+		} else {
+			return null;
+		}
 	}
-	
 	/**
 	 * @return
 	 */
 	public Version getDownloadedVersion() {
 		if (bestRemoteResource == null) {
 			bestRemoteResource = findBestRemoteResource();
-			if (bestRemoteResource != null) {
-				return bestRemoteResource.getVersion();
-			}
 		}
-		return null;
+		if (bestRemoteResource != null) {
+			return bestRemoteResource.getVersion();
+		} else {
+			return null;
+		}
 	}
-	
-
 	/**
 	 * @param this
 	 * @return
@@ -243,7 +242,7 @@
 							+ " returning first", Project.MSG_VERBOSE);
 			resource = ResourceResult.getFirstResource(res);
 		}
-		bestRemoteResource=resource;
+		bestRemoteResource = resource;
 		return resource;
 	}
 	ResourceResult query(IRepository repo) { //TODO

Modified: incubator/depot/trunk/update/src/sample/export/build.xml
==============================================================================
--- incubator/depot/trunk/update/src/sample/export/build.xml	(original)
+++ incubator/depot/trunk/update/src/sample/export/build.xml	Fri May 21 00:53:17 2004
@@ -24,7 +24,7 @@
 	<property name="antlets.repo" value="http://antworks.sourceforge.net/library/antlets/"
/>
 
 	<importer name="init-0.1" href="${antlets.repo}" />
-	<importer name="depot-update-0.1-dev-20040507" />
+	<importer name="depot-update-0.1" />
 
 		
     <repository id="maven" url="http://www.ibiblio.org/maven/" remote="true" />		

Mime
View raw message