ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r740887 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/repository/url/URLRepository.java
Date Wed, 04 Feb 2009 21:12:06 GMT
Author: maartenc
Date: Wed Feb  4 21:12:06 2009
New Revision: 740887

URL: http://svn.apache.org/viewvc?rev=740887&view=rev
Log:
FIX: overwrite='false' completely prevents publishing into url repositories (IVY-1007)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=740887&r1=740886&r2=740887&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Wed Feb  4 21:12:06 2009
@@ -94,6 +94,7 @@
 - IMPROVEMENT: Error message is not clear when specifying an invalid value for checksums
(IVY-977)
 - IMPROVEMENT: catch AccessControlException on System.getProperties() (IVY-1015)
 
+- FIX: overwrite='false' completely prevents publishing into url repositories (IVY-1007)
 - FIX: Fixed broken logo link in ivy-report.xsl (IVY-1024) (thanks to Carlton Brown)
 - FIX: Support for opensll sha1 and md5 checksum (IVY-1006)
 - FIX: TTL does not work as expected (IVY-1012)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java?rev=740887&r1=740886&r2=740887&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/url/URLRepository.java Wed
Feb  4 21:12:06 2009
@@ -71,9 +71,8 @@
     }
 
     public void put(File source, String destination, boolean overwrite) throws IOException
{
-        if (!overwrite) {
-            throw new UnsupportedOperationException(
-                    "URL repository do not support append operations at the moment");
+        if (!overwrite && getResource(destination).exists()) {
+            throw new IOException("destination file exists and overwrite == false");
         }
 
         fireTransferInitiated(getResource(destination), TransferEvent.REQUEST_PUT);



Mime
View raw message