brett 2005/04/19 18:55:24
Modified: maven-artifact/src/main/java/org/apache/maven/artifact/manager
DefaultWagonManager.java
Log:
reinstate error handling
Revision Changes Path
1.28 +10 -10
maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
Index: DefaultWagonManager.java
===================================================================
RCS file:
/home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- DefaultWagonManager.java 19 Apr 2005 17:15:35 -0000 1.27
+++ DefaultWagonManager.java 20 Apr 2005 01:55:24 -0000 1.28
@@ -33,6 +33,7 @@
import org.apache.maven.wagon.proxy.ProxyInfo;
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.PlexusContainer;
+import
org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
import
org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.codehaus.plexus.context.Context;
import org.codehaus.plexus.context.ContextException;
@@ -42,6 +43,7 @@
import java.io.File;
import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -77,9 +79,8 @@
return wagon;
}
- // TODO: don't throw exception
private void releaseWagon( Wagon wagon )
- throws Exception
+ throws ComponentLifecycleException
{
container.release( wagon );
}
@@ -131,16 +132,15 @@
// }
// TODO: configure these
- // TODO: Clean up this try/catch if it truly isn't needed.
-// try
-// {
+ try
+ {
wagon.addTransferListener( new ChecksumObserver( "MD5" ) );
wagon.addTransferListener( new ChecksumObserver( "SHA-1" ) );
-// }
-// catch ( NoSuchAlgorithmException e )
-// {
-// throw new TransferFailedException( "Unable to add checksum
methods", e );
-// }
+ }
+ catch ( NoSuchAlgorithmException e )
+ {
+ throw new TransferFailedException( "Unable to add checksum
methods", e );
+ }
try
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]