aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-web/archiva-webapp
diff options
context:
space:
mode:
authorJoakim Erdfelt <joakime@apache.org>2007-10-23 00:51:13 +0000
committerJoakim Erdfelt <joakime@apache.org>2007-10-23 00:51:13 +0000
commitbdbd78a4fc83e251d12d8fd462561f1f64fe9663 (patch)
treee6a391df9d5d84464d8e4f41133a006aa843dac5 /archiva-web/archiva-webapp
parent322c16f688a286da1b96884ea613dd69da864eb4 (diff)
downloadarchiva-bdbd78a4fc83e251d12d8fd462561f1f64fe9663.tar.gz
archiva-bdbd78a4fc83e251d12d8fd462561f1f64fe9663.zip
Some error handling cleanup.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@587341 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-web/archiva-webapp')
-rw-r--r--archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java
index cfa63a093..7dedee43b 100644
--- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java
+++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/ProxiedDavServer.java
@@ -36,6 +36,7 @@ import org.apache.maven.model.DistributionManagement;
import org.apache.maven.model.Model;
import org.apache.maven.model.Relocation;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import org.codehaus.plexus.webdav.AbstractDavServerComponent;
import org.codehaus.plexus.webdav.DavServerComponent;
import org.codehaus.plexus.webdav.DavServerException;
@@ -355,6 +356,12 @@ public class ProxiedDavServer
// Open and read the POM from the managed repo
File pom = managedRepository.toFile( pomReference );
+
+ if( !pom.exists() )
+ {
+ return;
+ }
+
try
{
Model model = new MavenXpp3Reader().read( new FileReader( pom ) );
@@ -384,9 +391,13 @@ public class ProxiedDavServer
{
// Artifact has no POM in repo : ignore
}
- catch ( Exception e )
+ catch ( IOException e )
+ {
+ // Unable to read POM : ignore.
+ }
+ catch ( XmlPullParserException e )
{
- // invalid POM : ignore
+ // Invalid POM : ignore
}
}