maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ogusa...@apache.org
Subject svn commit: r681167 - in /maven/sandbox/trunk/mercury/src: main/java/org/apache/maven/mercury/repository/remote/m2/ main/java/org/apache/maven/mercury/spi/http/client/ main/java/org/apache/maven/mercury/spi/http/client/deploy/ main/java/org/apache/mave...
Date Wed, 30 Jul 2008 18:40:59 GMT
Author: ogusakov
Date: Wed Jul 30 11:40:58 2008
New Revision: 681167

URL: http://svn.apache.org/viewvc?rev=681167&view=rev
Log:
stopped working on HttpReaderTransport as it should be native in jetty client

Added:
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/HttpClientException.java
      - copied, changed from r680915, maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/MercuryException.java
Removed:
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/MercuryException.java
Modified:
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/repository/remote/m2/RemoteRepositoryReaderM2.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployResponse.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployer.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeployResponse.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeploymentTarget.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/FilePutExchange.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetrievalResponse.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetriever.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/FileGetExchange.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalResponse.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java
    maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/transport/api/TransportTransaction.java
    maven/sandbox/trunk/mercury/src/test/java/org/apache/maven/mercury/spi/http/client/JettyDeployerTest.java

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/repository/remote/m2/RemoteRepositoryReaderM2.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/repository/remote/m2/RemoteRepositoryReaderM2.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/repository/remote/m2/RemoteRepositoryReaderM2.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/repository/remote/m2/RemoteRepositoryReaderM2.java
Wed Jul 30 11:40:58 2008
@@ -26,7 +26,7 @@
 import org.apache.maven.mercury.repository.api.RepositoryReader;
 import org.apache.maven.mercury.repository.metadata.Metadata;
 import org.apache.maven.mercury.repository.metadata.io.xpp3.MetadataXpp3Reader;
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.spi.http.client.retrieve.DefaultRetrievalRequest;
 import org.apache.maven.mercury.spi.http.client.retrieve.DefaultRetriever;
 import org.apache.maven.mercury.spi.http.client.retrieve.RetrievalResponse;
@@ -85,7 +85,7 @@
       //                     and come with appropriate Transport implementation 
       _transport = new DefaultRetriever();
     }
-    catch( MercuryException e )
+    catch( HttpClientException e )
     {
       throw new RepositoryException(e);
     }

Copied: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/HttpClientException.java
(from r680915, maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/MercuryException.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/HttpClientException.java?p2=maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/HttpClientException.java&p1=maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/MercuryException.java&r1=680915&r2=681167&rev=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/MercuryException.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/HttpClientException.java
Wed Jul 30 11:40:58 2008
@@ -40,24 +40,24 @@
  * Exception that occurs whilst deploying or retrieving files
  * asynchronously.
  */
-public class MercuryException
+public class HttpClientException
     extends Exception
 {
     private Binding binding;
 
-    public MercuryException( Binding b, String s )
+    public HttpClientException( Binding b, String s )
     {
         super( s );
         binding = b;
     }
 
-    public MercuryException( Binding b, String s, Throwable throwable )
+    public HttpClientException( Binding b, String s, Throwable throwable )
     {
         super( s, throwable );
         binding = b;
     }
 
-    public MercuryException( Binding b, Throwable throwable )
+    public HttpClientException( Binding b, Throwable throwable )
     {
         super( throwable );
         binding = b;

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployResponse.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployResponse.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployResponse.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployResponse.java
Wed Jul 30 11:40:58 2008
@@ -23,22 +23,22 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 
 public class DefaultDeployResponse implements DeployResponse
 {
-    private Set<MercuryException> _exceptions = Collections.synchronizedSet( new HashSet<MercuryException>()
);
+    private Set<HttpClientException> _exceptions = Collections.synchronizedSet( new
HashSet<HttpClientException>() );
 
     public DefaultDeployResponse()
     {
     }
 
-    public void add( MercuryException e )
+    public void add( HttpClientException e )
     {
         _exceptions.add( e );
     }
 
-    public Set<MercuryException> getExceptions()
+    public Set<HttpClientException> getExceptions()
     {
         return _exceptions;
     }

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployer.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployer.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DefaultDeployer.java
Wed Jul 30 11:40:58 2008
@@ -22,7 +22,7 @@
 
 import org.apache.maven.mercury.spi.http.client.FileExchange;
 import org.apache.maven.mercury.spi.http.client.HandshakeExchange;
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.transport.api.Binding;
 import org.apache.maven.mercury.transport.api.Server;
 import org.apache.maven.mercury.transport.api.StreamObserver;
@@ -53,7 +53,7 @@
     private Set<Server> _servers = new HashSet<Server>();
 
     public DefaultDeployer()
-        throws MercuryException
+        throws HttpClientException
     {
         _idGenerator = new RandomBatchIdGenerator();
         _httpClient = new HttpClient();
@@ -65,17 +65,17 @@
         }
         catch ( Exception e )
         {
-            throw new MercuryException( null, "unable to start http client", e );
+            throw new HttpClientException( null, "unable to start http client", e );
         }
     }
 
     public DefaultDeployer( HttpClient client, BatchIdGenerator idGenerator )
-        throws MercuryException
+        throws HttpClientException
     {
         _idGenerator = idGenerator;
         if ( _idGenerator == null )
         {
-            throw new MercuryException( null, "no id generator supplied" );
+            throw new HttpClientException( null, "no id generator supplied" );
         }
 
         _httpClient = client;
@@ -88,7 +88,7 @@
         }
         catch ( Exception e )
         {
-            throw new MercuryException( null, "unable to start http client", e );
+            throw new HttpClientException( null, "unable to start http client", e );
         }
     }
 
@@ -200,7 +200,7 @@
                         checkComplete( callback, batchId, count, request, response, remoteHandshakeUrls
);
                     }
 
-                    public void onError( MercuryException exception )
+                    public void onError( HttpClientException exception )
                     {
                         if ( getRemoteJettyUrl() != null )
                         {
@@ -214,7 +214,7 @@
             }
             catch ( Exception e )
             {
-                response.add( new MercuryException( binding, e ) );
+                response.add( new HttpClientException( binding, e ) );
                 checkComplete( callback, batchId, count, request, response, remoteHandshakeUrls
);
             }
         }
@@ -285,7 +285,7 @@
 
                     public void onHandshakeError( String url, Exception e )
                     {
-                        response.getExceptions().add( new MercuryException( null, e ) );
+                        response.getExceptions().add( new HttpClientException( null, e )
);
                         checkHandshakeComplete( callback, response, count );
                     }
                 };

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeployResponse.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeployResponse.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeployResponse.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeployResponse.java
Wed Jul 30 11:40:58 2008
@@ -21,7 +21,7 @@
 
 import java.util.Set;
 
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 
 /**
  * DeployResponse
@@ -38,5 +38,5 @@
      *
      * @return
      */
-    public Set<MercuryException> getExceptions();
+    public Set<HttpClientException> getExceptions();
 }

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeploymentTarget.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeploymentTarget.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeploymentTarget.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/DeploymentTarget.java
Wed Jul 30 11:40:58 2008
@@ -19,7 +19,7 @@
 
 package org.apache.maven.mercury.spi.http.client.deploy;
 
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.spi.http.validate.Validator;
 import org.apache.maven.mercury.transport.api.Binding;
 import org.apache.maven.mercury.transport.api.StreamObserver;
@@ -47,7 +47,7 @@
     protected Set<Validator> _validators;
     protected TargetState _targetState;
     protected TargetState _checksumState;
-    protected MercuryException _exception;
+    protected HttpClientException _exception;
     protected String _remoteJettyUrl;
     protected Set<StreamObserver> _observers = new HashSet<StreamObserver>();
     protected List<Verifier> _verifiers = new ArrayList<Verifier>();
@@ -55,7 +55,7 @@
     
     public abstract void onComplete();
 
-    public abstract void onError( MercuryException exception );
+    public abstract void onError( HttpClientException exception );
 
 
     public class TargetState
@@ -156,7 +156,7 @@
     {
         if ( t != null && _exception == null )
         {
-            _exception = ( t instanceof MercuryException ? (MercuryException) t : new MercuryException(
_binding, t ) );
+            _exception = ( t instanceof HttpClientException ? (HttpClientException) t : new
HttpClientException( _binding, t ) );
         }
 
         if (_exception != null)

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/FilePutExchange.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/FilePutExchange.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/FilePutExchange.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/deploy/FilePutExchange.java
Wed Jul 30 11:40:58 2008
@@ -21,7 +21,7 @@
 
 
 import org.apache.maven.mercury.spi.http.client.FileExchange;
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.spi.http.client.ObservableInputStream;
 import org.apache.maven.mercury.transport.ChecksumCalculator;
 import org.apache.maven.mercury.transport.api.Binding;
@@ -119,13 +119,13 @@
         {
             if ( _status != HttpServletResponse.SC_OK && _status != HttpServletResponse.SC_CREATED
&& _status != HttpServletResponse.SC_NO_CONTENT )
             {
-                onFileError( _url, new MercuryException( _binding, "Http status code=" +
_status ) );
+                onFileError( _url, new HttpClientException( _binding, "Http status code="
+ _status ) );
                 return;
             }
 
             if ( _remoteBatchId != null && !_batchId.equals( _remoteBatchId ) )
             {
-                onFileError( _url, new MercuryException( _binding,
+                onFileError( _url, new HttpClientException( _binding,
                     "Non matching mercury ids. Sent=" + _batchId + " received=" + _remoteBatchId
) );
                 return;
             }
@@ -135,7 +135,7 @@
         }
         catch ( Exception e )
         {
-            onFileError( _url, new MercuryException( _binding, e.getLocalizedMessage() )
);
+            onFileError( _url, new HttpClientException( _binding, e.getLocalizedMessage()
) );
         }
     }
 

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetrievalResponse.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetrievalResponse.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetrievalResponse.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetrievalResponse.java
Wed Jul 30 11:40:58 2008
@@ -23,22 +23,22 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 
 public class DefaultRetrievalResponse implements RetrievalResponse
 {
-    private Set<MercuryException> _exceptions = Collections.synchronizedSet( new HashSet<MercuryException>()
);
+    private Set<HttpClientException> _exceptions = Collections.synchronizedSet( new
HashSet<HttpClientException>() );
 
     public DefaultRetrievalResponse()
     {
     }
 
-    protected void add( MercuryException exception )
+    protected void add( HttpClientException exception )
     {
         _exceptions.add( exception );
     }
 
-    public Set<MercuryException> getExceptions()
+    public Set<HttpClientException> getExceptions()
     {
         return _exceptions;
     }

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetriever.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetriever.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetriever.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/DefaultRetriever.java
Wed Jul 30 11:40:58 2008
@@ -20,7 +20,7 @@
 package org.apache.maven.mercury.spi.http.client.retrieve;
 
 
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.transport.api.Binding;
 import org.apache.maven.mercury.transport.api.Server;
 import org.apache.maven.mercury.transport.api.StreamObserver;
@@ -43,7 +43,7 @@
     
 
     public DefaultRetriever()
-        throws MercuryException
+        throws HttpClientException
     {
         // TODO take the default settings for now
         _httpClient = new HttpClient();
@@ -56,12 +56,12 @@
         }
         catch ( Exception e )
         {
-            throw new MercuryException( null, "Unable to start http client.", e );
+            throw new HttpClientException( null, "Unable to start http client.", e );
         }
     }
 
     public DefaultRetriever( HttpClient client )
-        throws MercuryException
+        throws HttpClientException
     {
         // TODO take the default settings for now
         _httpClient = client;
@@ -74,7 +74,7 @@
         }
         catch ( Exception e )
         {
-            throw new MercuryException( null, "unable to start http client", e );
+            throw new HttpClientException( null, "unable to start http client", e );
         }
     }
                            
@@ -178,7 +178,7 @@
                         boolean checksumOK = verifyChecksum();
                         if ( !checksumOK )
                         {
-                            response.add( new MercuryException( binding, "Checksum failed")
);
+                            response.add( new HttpClientException( binding, "Checksum failed")
);
                         }
 
                         //if the file checksum is ok, then apply the validators
@@ -189,7 +189,7 @@
                             {
                                 for ( String s : validateErrors )
                                 {
-                                    response.add( new MercuryException( binding, s ) );
+                                    response.add( new HttpClientException( binding, s ) );
                                 }
                             }
                         }
@@ -200,7 +200,7 @@
                         }
                     }
 
-                    public void onError( MercuryException exception )
+                    public void onError( HttpClientException exception )
                     {
                         response.add( exception );
                         if ( DefaultRetriever.this.isComplete( count, request, response,
targets ) )
@@ -214,7 +214,7 @@
             }
             catch ( Exception e )
             {
-                response.add( new MercuryException( binding, e ) );
+                response.add( new HttpClientException( binding, e ) );
                 if ( isComplete( count, request, response, targets ) )
                 {
                     callback.onComplete( response );

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/FileGetExchange.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/FileGetExchange.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/FileGetExchange.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/FileGetExchange.java
Wed Jul 30 11:40:58 2008
@@ -32,7 +32,7 @@
 
 
 import org.apache.maven.mercury.spi.http.client.FileExchange;
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.spi.http.client.ObservableOutputStream;
 import org.apache.maven.mercury.transport.api.Binding;
 import org.apache.maven.mercury.transport.api.StreamObserver;
@@ -98,7 +98,7 @@
         }
         catch ( Exception e )
         {
-            onFileError( _url, new MercuryException( _binding, e.getLocalizedMessage() )
);
+            onFileError( _url, new HttpClientException( _binding, e.getLocalizedMessage()
) );
         }
     }
 

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalResponse.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalResponse.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalResponse.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalResponse.java
Wed Jul 30 11:40:58 2008
@@ -21,7 +21,7 @@
 
 import java.util.Set;
 
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 
 
 /**
@@ -38,7 +38,7 @@
      *
      * @return
      */
-    Set<MercuryException> getExceptions();
+    Set<HttpClientException> getExceptions();
     
     boolean hasExceptions();
 }

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/spi/http/client/retrieve/RetrievalTarget.java
Wed Jul 30 11:40:58 2008
@@ -33,7 +33,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.maven.mercury.spi.http.client.FileExchange;
-import org.apache.maven.mercury.spi.http.client.MercuryException;
+import org.apache.maven.mercury.spi.http.client.HttpClientException;
 import org.apache.maven.mercury.spi.http.validate.Validator;
 import org.apache.maven.mercury.transport.api.Binding;
 import org.apache.maven.mercury.transport.api.StreamObserver;
@@ -60,7 +60,7 @@
     protected int _checksumState;
     protected int _targetState;
     
-    protected MercuryException _exception;
+    protected HttpClientException _exception;
     protected Binding _binding;
     protected File _tempFile;
     protected DefaultRetriever _retriever;
@@ -74,7 +74,7 @@
     
     public abstract void onComplete();
 
-    public abstract void onError( MercuryException exception );
+    public abstract void onError( HttpClientException exception );
 
     /**
      * Constructor
@@ -113,11 +113,11 @@
         
         if ( _tempFile.exists() )
         {
-            onError( new MercuryException( binding, "File exists " + _tempFile.getAbsolutePath()
) );
+            onError( new HttpClientException( binding, "File exists " + _tempFile.getAbsolutePath()
) );
         }
         else if ( !_tempFile.getParentFile().canWrite() )
         {
-            onError( new MercuryException( binding,
+            onError( new HttpClientException( binding,
                 "Unable to write to dir " + _tempFile.getParentFile().getAbsolutePath() )
);
         }
     }
@@ -182,13 +182,13 @@
     {
         if ( _exception == null && ex != null )
         {
-            if ( ex instanceof MercuryException )
+            if ( ex instanceof HttpClientException )
             {
-                _exception = (MercuryException) ex;
+                _exception = (HttpClientException) ex;
             }
             else
             {
-                _exception = new MercuryException( _binding, ex );
+                _exception = new HttpClientException( _binding, ex );
             }
         }
         
@@ -296,13 +296,13 @@
         _targetState = state;
         if ( _exception == null && ex != null )
         {
-            if ( ex instanceof MercuryException )
+            if ( ex instanceof HttpClientException )
             {
-                _exception = (MercuryException) ex;
+                _exception = (HttpClientException) ex;
             }
             else
             {
-                _exception = new MercuryException( _binding, ex );
+                _exception = new HttpClientException( _binding, ex );
             }
         }
 

Modified: maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/transport/api/TransportTransaction.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/transport/api/TransportTransaction.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/transport/api/TransportTransaction.java
(original)
+++ maven/sandbox/trunk/mercury/src/main/java/org/apache/maven/mercury/transport/api/TransportTransaction.java
Wed Jul 30 11:40:58 2008
@@ -101,6 +101,14 @@
     this._bindings = bindings;
   }
   //------------------------------------------------------------------------------------------------
+  public boolean isEmpty()
+  {
+    if( _bindings == null || _bindings.size() < 1 )
+      return true;
+    
+    return false;
+  }
+  //------------------------------------------------------------------------------------------------
   public boolean hasErrors()
   {
     if( _bindings == null )

Modified: maven/sandbox/trunk/mercury/src/test/java/org/apache/maven/mercury/spi/http/client/JettyDeployerTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/mercury/src/test/java/org/apache/maven/mercury/spi/http/client/JettyDeployerTest.java?rev=681167&r1=681166&r2=681167&view=diff
==============================================================================
--- maven/sandbox/trunk/mercury/src/test/java/org/apache/maven/mercury/spi/http/client/JettyDeployerTest.java
(original)
+++ maven/sandbox/trunk/mercury/src/test/java/org/apache/maven/mercury/spi/http/client/JettyDeployerTest.java
Wed Jul 30 11:40:58 2008
@@ -161,7 +161,7 @@
         
         DeployResponse response = _deployer.deploy(request);
 
-        for (MercuryException t:response.getExceptions())
+        for (HttpClientException t:response.getExceptions())
             t.printStackTrace();
         
         assertEquals(0, response.getExceptions().size());



Mime
View raw message