mirror of https://github.com/apache/archiva.git
Some error handling cleanup.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@587341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
322c16f688
commit
bdbd78a4fc
|
@ -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 )
|
||||
{
|
||||
// invalid POM : ignore
|
||||
// Unable to read POM : ignore.
|
||||
}
|
||||
catch ( XmlPullParserException e )
|
||||
{
|
||||
// Invalid POM : ignore
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue