You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2005/12/21 00:24:20 UTC

svn commit: r358140 - in /maven/components/branches/maven-2.0.x/maven-artifact-ant: sample.build.xml src/main/java/org/apache/maven/artifact/ant/Repository.java

Author: brett
Date: Tue Dec 20 15:24:03 2005
New Revision: 358140

URL: http://svn.apache.org/viewcvs?rev=358140&view=rev
Log:
make repository ID behaviour backwards compatible with 2.0

Modified:
    maven/components/branches/maven-2.0.x/maven-artifact-ant/sample.build.xml
    maven/components/branches/maven-2.0.x/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Repository.java

Modified: maven/components/branches/maven-2.0.x/maven-artifact-ant/sample.build.xml
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/maven-artifact-ant/sample.build.xml?rev=358140&r1=358139&r2=358140&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-artifact-ant/sample.build.xml (original)
+++ maven/components/branches/maven-2.0.x/maven-artifact-ant/sample.build.xml Tue Dec 20 15:24:03 2005
@@ -23,7 +23,7 @@
   <target name="initTaskDefs">
     <!-- don't forget to update the version! -->
     <path id="maven.classpath">
-      <pathelement location="target/maven-artifact-ant-2.0.1-SNAPSHOT-dep.jar" />
+      <pathelement location="target/maven-artifact-ant-2.0.2-SNAPSHOT-dep.jar" />
     </path>
 
     <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">

Modified: maven/components/branches/maven-2.0.x/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Repository.java
URL: http://svn.apache.org/viewcvs/maven/components/branches/maven-2.0.x/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Repository.java?rev=358140&r1=358139&r2=358140&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Repository.java (original)
+++ maven/components/branches/maven-2.0.x/maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/Repository.java Tue Dec 20 15:24:03 2005
@@ -28,25 +28,24 @@
 public abstract class Repository
     extends ProjectComponent
 {
-	private String id;
-	
+    private String id;
+    
     private String refid;
 
     private String layout = "default";
 
     public String getId()
     {
-    	    System.out.println("Repository.getId() == " + getInstance().id);
-    	    if (getInstance().id == null)
-    	    {
-    	    	    throw new BuildException("id must be specified for a repository definition");
-    	    }
-    	    return getInstance().id;
+        if ( getInstance().id == null )
+        {
+            getInstance().setId( "remote" );
+        }
+        return getInstance().id;
     }
     
     public void setId( String id )
     {
-    	    this.id = id;
+        this.id = id;
     }
     
     public String getRefid()