archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r751932 - in /archiva/trunk: archiva-cli/src/main/java/org/apache/maven/archiva/cli/ archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ archiva-modules/archiv...
Date Tue, 10 Mar 2009 01:09:35 GMT
Author: brett
Date: Tue Mar 10 01:09:34 2009
New Revision: 751932

URL: http://svn.apache.org/viewvc?rev=751932&view=rev
Log:
[MRM-1102] don't swallow parsing exception too early where it still has context, and only
log the message not the trace in scanning

Modified:
    archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
    archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelReader.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300Reader.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400Reader.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolver.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/EffectiveProjectModelFilterTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/ProjectModelExpressionExpanderTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300ReaderTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400ReaderTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/writers/ProjectModel400WriterTest.java

Modified: archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
(original)
+++ archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
Tue Mar 10 01:09:34 2009
@@ -28,9 +28,9 @@
 import org.apache.maven.archiva.consumers.ConsumerException;
 import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
 import org.apache.maven.archiva.model.ArchivaProjectModel;
-import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
 import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
+import org.apache.maven.archiva.xml.XMLException;
 
 /**
  * ProjectReaderConsumer 
@@ -117,7 +117,7 @@
                 System.err.println( "Got null model on " + pomFile );
             }
         }
-        catch ( ProjectModelException e )
+        catch ( XMLException e )
         {
             System.err.println( "Unable to process: " + pomFile );
             e.printStackTrace( System.out );

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java
Tue Mar 10 01:09:34 2009
@@ -41,11 +41,11 @@
 import org.apache.maven.archiva.repository.RepositoryContentFactory;
 import org.apache.maven.archiva.repository.RepositoryException;
 import org.apache.maven.archiva.repository.content.ManagedLegacyRepositoryContent;
-import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
 import org.apache.maven.archiva.repository.project.filters.EffectiveProjectModelFilter;
 import org.apache.maven.archiva.repository.project.readers.ProjectModel300Reader;
 import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
+import org.apache.maven.archiva.xml.XMLException;
 import org.codehaus.plexus.cache.Cache;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -178,9 +178,9 @@
             }
 
         }
-        catch ( ProjectModelException e )
+        catch ( XMLException e )
         {
-            log.warn( "Unable to read project model " + artifactFile + " : " + e.getMessage(),
e );
+            log.warn( "Unable to read project model " + artifactFile + " : " + e.getMessage()
);
 
             addProblem( artifact, "Unable to read project model " + artifactFile + " : "
+ e.getMessage() );
         }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelReader.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelReader.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelReader.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/ProjectModelReader.java
Tue Mar 10 01:09:34 2009
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.archiva.model.ArchivaProjectModel;
+import org.apache.maven.archiva.xml.XMLException;
 
 import java.io.File;
 
@@ -30,5 +31,6 @@
  */
 public interface ProjectModelReader
 {
-    public ArchivaProjectModel read( File pomFile ) throws ProjectModelException;
+    public ArchivaProjectModel read( File pomFile )
+        throws XMLException;
 }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300Reader.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300Reader.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300Reader.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300Reader.java
Tue Mar 10 01:09:34 2009
@@ -19,6 +19,12 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.model.ArtifactReference;
@@ -30,18 +36,11 @@
 import org.apache.maven.archiva.model.Organization;
 import org.apache.maven.archiva.model.ProjectRepository;
 import org.apache.maven.archiva.model.Scm;
-import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
 import org.apache.maven.archiva.xml.XMLException;
 import org.apache.maven.archiva.xml.XMLReader;
 import org.dom4j.Element;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
 /**
  * ProjectModel300Reader 
  *
@@ -52,66 +51,54 @@
 {
 
     public ArchivaProjectModel read( File pomFile )
-        throws ProjectModelException
+        throws XMLException
     {
-        try
-        {
-            XMLReader xml = new XMLReader( "project", pomFile );
-
-            ArchivaProjectModel model = new ArchivaProjectModel();
+        XMLReader xml = new XMLReader( "project", pomFile );
 
-            xml.removeNamespaces();
+        ArchivaProjectModel model = new ArchivaProjectModel();
 
-            Element project = xml.getElement( "//project" );
+        xml.removeNamespaces();
 
-            // TODO: Handle <extend /> ?? (is this even possible?)
-
-            model.setGroupId( project.elementTextTrim( "groupId" ) );
-            model.setArtifactId( project.elementTextTrim( "artifactId" ) );
-            // TODO: Handle <id />
-            model.setVersion( project.elementTextTrim( "currentVersion" ) );
-            model.setName( project.elementTextTrim( "name" ) );
-            model.setDescription( project.elementTextTrim( "description" ) );
-            // TODO: what to do with <shortDescription /> ?
-            model.setUrl( project.elementTextTrim( "url" ) );
-            // TODO: Handle <logo />
-            // TODO: Handle <inceptionYear />
+        Element project = xml.getElement( "//project" );
 
-            model.setIssueManagement( getIssueManagement( xml ) );
-            // TODO: What to do with <gumpRepositoryId /> ?
-            // TODO: Handle <siteAddress />
-            // TODO: Handle <siteDirectory /> ?
-            // TODO: Handle <distributionSite />
-            // TODO: Handle <distributionDirectory />
-            model.setMailingLists( getMailingLists( xml ) );
-            model.setIndividuals( getIndividuals( xml ) );
-            model.setLicenses( getLicenses( xml ) );
-            model.setReports( getReports( xml ) );
-            model.setRepositories( getRepositories( xml ) );
-            model.setScm( getSCM( xml ) );
-            model.setOrganization( getOrganization( xml ) );
-            model.setProperties( getProperties( xml.getElement( "//project/properties" )
) );
-            model.setDependencies( getDependencies( xml ) );
-            
-            model.setOrigin("filesystem");
+        // TODO: Handle <extend /> ?? (is this even possible?)
 
-            /* Following are not valid for <pomVersion>3</pomVersion> / Maven
1 pom files.
-             * 
-             * model.setDependencyManagement()
-             * model.setPlugins()
-             * model.setParentProject()
-             * model.setPackaging()
-             * model.setCiManagement()
-             * model.setBuildExtensions()
-             * model.setRelocation()
-             */
+        model.setGroupId( project.elementTextTrim( "groupId" ) );
+        model.setArtifactId( project.elementTextTrim( "artifactId" ) );
+        // TODO: Handle <id />
+        model.setVersion( project.elementTextTrim( "currentVersion" ) );
+        model.setName( project.elementTextTrim( "name" ) );
+        model.setDescription( project.elementTextTrim( "description" ) );
+        // TODO: what to do with <shortDescription /> ?
+        model.setUrl( project.elementTextTrim( "url" ) );
+        // TODO: Handle <logo />
+        // TODO: Handle <inceptionYear />
+
+        model.setIssueManagement( getIssueManagement( xml ) );
+        // TODO: What to do with <gumpRepositoryId /> ?
+        // TODO: Handle <siteAddress />
+        // TODO: Handle <siteDirectory /> ?
+        // TODO: Handle <distributionSite />
+        // TODO: Handle <distributionDirectory />
+        model.setMailingLists( getMailingLists( xml ) );
+        model.setIndividuals( getIndividuals( xml ) );
+        model.setLicenses( getLicenses( xml ) );
+        model.setReports( getReports( xml ) );
+        model.setRepositories( getRepositories( xml ) );
+        model.setScm( getSCM( xml ) );
+        model.setOrganization( getOrganization( xml ) );
+        model.setProperties( getProperties( xml.getElement( "//project/properties" ) ) );
+        model.setDependencies( getDependencies( xml ) );
+
+        model.setOrigin( "filesystem" );
+
+        /*
+         * Following are not valid for <pomVersion>3</pomVersion> / Maven 1 pom
files. model.setDependencyManagement()
+         * model.setPlugins() model.setParentProject() model.setPackaging() model.setCiManagement()
+         * model.setBuildExtensions() model.setRelocation()
+         */
 
-            return model;
-        }
-        catch ( XMLException e )
-        {
-            throw new ProjectModelException( e.getMessage(), e );
-        }
+        return model;
     }
 
     private ArtifactReference getArtifactReference( Element elemPlugin, String defaultType
)

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400Reader.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400Reader.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400Reader.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400Reader.java
Tue Mar 10 01:09:34 2009
@@ -19,6 +19,12 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.model.ArtifactReference;
@@ -34,18 +40,11 @@
 import org.apache.maven.archiva.model.ProjectRepository;
 import org.apache.maven.archiva.model.Scm;
 import org.apache.maven.archiva.model.VersionedReference;
-import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
 import org.apache.maven.archiva.xml.XMLException;
 import org.apache.maven.archiva.xml.XMLReader;
 import org.dom4j.Element;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
 /**
  * ProjectModel400Reader - read in modelVersion 4.0.0 pom files into archiva-model structures.
  *
@@ -54,64 +53,56 @@
 public class ProjectModel400Reader
     implements ProjectModelReader
 {
-
     public ArchivaProjectModel read( File pomFile )
-        throws ProjectModelException
+        throws XMLException
     {
-        try
-        {
-            XMLReader xml = new XMLReader( "project", pomFile );
-
-            ArchivaProjectModel model = new ArchivaProjectModel();
-
-            if ( !"http://maven.apache.org/POM/4.0.0".equals( xml.getDefaultNamespaceURI()
) )
-            {
-                // No namespace defined
-                // TODO: Output to monitor the problem with the Namespace.
-            }
-
-            xml.removeNamespaces();
+        XMLReader xml = new XMLReader( "project", pomFile );
 
-            Element project = xml.getElement( "//project" );
+        ArchivaProjectModel model = new ArchivaProjectModel();
 
-            model.setGroupId( project.elementTextTrim( "groupId" ) );
-            model.setArtifactId( project.elementTextTrim( "artifactId" ) );
-            model.setVersion( project.elementTextTrim( "version" ) );
-            model.setName( project.elementTextTrim( "name" ) );
-            model.setDescription( project.elementTextTrim( "description" ) );
-            model.setUrl( project.elementTextTrim( "url" ) );
+        if ( !"http://maven.apache.org/POM/4.0.0".equals( xml.getDefaultNamespaceURI() )
)
+        {
+            // No namespace defined
+            // TODO: Output to monitor the problem with the Namespace.
+        }
 
-            model.setPackaging( StringUtils.defaultIfEmpty( project.elementTextTrim( "packaging"
), "jar" ) );
+        xml.removeNamespaces();
 
-            model.setParentProject( getParentProject( xml ) );
+        Element project = xml.getElement( "//project" );
 
-            model.setMailingLists( getMailingLists( xml ) );
-            model.setCiManagement( getCiManagement( xml ) );
-            model.setIndividuals( getIndividuals( xml ) );
-            model.setIssueManagement( getIssueManagement( xml ) );
-            model.setLicenses( getLicenses( xml ) );
-            model.setOrganization( getOrganization( xml ) );
-            model.setScm( getSCM( xml ) );
-            model.setRepositories( getRepositories( xml ) );
+        model.setGroupId( project.elementTextTrim( "groupId" ) );
+        model.setArtifactId( project.elementTextTrim( "artifactId" ) );
+        model.setVersion( project.elementTextTrim( "version" ) );
+        model.setName( project.elementTextTrim( "name" ) );
+        model.setDescription( project.elementTextTrim( "description" ) );
+        model.setUrl( project.elementTextTrim( "url" ) );
+
+        model.setPackaging( StringUtils.defaultIfEmpty( project.elementTextTrim( "packaging"
), "jar" ) );
+
+        model.setParentProject( getParentProject( xml ) );
+
+        model.setMailingLists( getMailingLists( xml ) );
+        model.setCiManagement( getCiManagement( xml ) );
+        model.setIndividuals( getIndividuals( xml ) );
+        model.setIssueManagement( getIssueManagement( xml ) );
+        model.setLicenses( getLicenses( xml ) );
+        model.setOrganization( getOrganization( xml ) );
+        model.setScm( getSCM( xml ) );
+        model.setRepositories( getRepositories( xml ) );
+
+        model.setDependencies( getDependencies( xml ) );
+        model.setDependencyManagement( getDependencyManagement( xml ) );
+        model.setPlugins( getPlugins( xml ) );
+        model.setReports( getReports( xml ) );
+        model.setProperties( getProperties( xml.getElement( "//project/properties" ) ) );
 
-            model.setDependencies( getDependencies( xml ) );
-            model.setDependencyManagement( getDependencyManagement( xml ) );
-            model.setPlugins( getPlugins( xml ) );
-            model.setReports( getReports( xml ) );
-            model.setProperties( getProperties( xml.getElement( "//project/properties" )
) );
+        model.setBuildExtensions( getBuildExtensions( xml ) );
 
-            model.setBuildExtensions( getBuildExtensions( xml ) );
+        model.setRelocation( getRelocation( xml ) );
 
-            model.setRelocation( getRelocation( xml ) );
-            
-            model.setOrigin("filesystem");
+        model.setOrigin( "filesystem" );
 
-            return model;
-        }
-        catch ( XMLException e )
-        {
-            throw new ProjectModelException( e.getMessage(), e );
-        }
+        return model;
     }
 
     private ArtifactReference getArtifactReference( Element elemPlugin, String defaultType
)

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolver.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolver.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolver.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolver.java
Tue Mar 10 01:09:34 2009
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import java.io.File;
+
 import org.apache.maven.archiva.model.ArchivaArtifact;
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.model.VersionedReference;
@@ -26,8 +28,7 @@
 import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
 import org.apache.maven.archiva.repository.project.ProjectModelResolver;
-
-import java.io.File;
+import org.apache.maven.archiva.xml.XMLException;
 
 /**
  * Resolve Project from managed repository. 
@@ -55,7 +56,14 @@
 
         File repoFile = repository.toFile( artifact );
 
-        return reader.read( repoFile );
+        try
+        {
+            return reader.read( repoFile );
+        }
+        catch ( XMLException e )
+        {
+            throw new ProjectModelException( e.getMessage(), e );
+        }
     }
 
 }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/EffectiveProjectModelFilterTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/EffectiveProjectModelFilterTest.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/EffectiveProjectModelFilterTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/EffectiveProjectModelFilterTest.java
Tue Mar 10 01:09:34 2009
@@ -32,6 +32,7 @@
 import org.apache.maven.archiva.repository.project.ProjectModelResolverFactory;
 import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
 import org.apache.maven.archiva.repository.project.resolvers.ManagedRepositoryProjectResolver;
+import org.apache.maven.archiva.xml.XMLException;
 
 import java.io.File;
 import java.util.HashMap;
@@ -56,7 +57,7 @@
     }
 
     private ArchivaProjectModel createArchivaProjectModel( String path )
-        throws ProjectModelException
+        throws XMLException
     {
         ProjectModelReader reader = new ProjectModel400Reader();
 

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/ProjectModelExpressionExpanderTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/ProjectModelExpressionExpanderTest.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/ProjectModelExpressionExpanderTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/filters/ProjectModelExpressionExpanderTest.java
Tue Mar 10 01:09:34 2009
@@ -27,6 +27,7 @@
 import org.apache.maven.archiva.repository.project.ProjectModelWriter;
 import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
 import org.apache.maven.archiva.repository.project.writers.ProjectModel400Writer;
+import org.apache.maven.archiva.xml.XMLException;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
 import java.io.File;
@@ -136,7 +137,7 @@
     }
 
     private ArchivaProjectModel createArchivaProjectModel( String path )
-        throws ProjectModelException
+        throws XMLException
     {
         ProjectModelReader reader = new ProjectModel400Reader();
 

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300ReaderTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300ReaderTest.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300ReaderTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel300ReaderTest.java
Tue Mar 10 01:09:34 2009
@@ -19,14 +19,14 @@
  * under the License.
  */
 
+import java.io.File;
+
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.model.Dependency;
-import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
+import org.apache.maven.archiva.xml.XMLException;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
-import java.io.File;
-
 /**
  * ProjectModel300ReaderTest 
  *
@@ -36,7 +36,7 @@
     extends PlexusInSpringTestCase
 {
     public void testLoadSimple()
-        throws ProjectModelException
+        throws XMLException
     {
         File defaultRepoDir = new File( getBasedir(), "src/test/repositories/legacy-repository"
);
         File pomFile = new File( defaultRepoDir, "org.apache.maven/poms/maven-model-v3-2.0.pom"
);

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400ReaderTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400ReaderTest.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400ReaderTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/readers/ProjectModel400ReaderTest.java
Tue Mar 10 01:09:34 2009
@@ -19,14 +19,14 @@
  * under the License.
  */
 
+import java.io.File;
+
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.model.VersionedReference;
-import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
+import org.apache.maven.archiva.xml.XMLException;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 
-import java.io.File;
-
 /**
  * ProjectModel400ReaderTest 
  *
@@ -36,7 +36,7 @@
     extends PlexusInSpringTestCase
 {
     public void testLoadSimple()
-        throws ProjectModelException
+        throws XMLException
     {
         File defaultRepoDir = new File( getBasedir(), "src/test/repositories/default-repository"
);
         File pomFile = new File( defaultRepoDir,
@@ -66,7 +66,7 @@
     }
 
     public void testLoadWithNamespace()
-        throws ProjectModelException
+        throws XMLException
     {
         File defaultRepoDir = new File( getBasedir(), "src/test/repositories/default-repository"
);
         File pomFile = new File( defaultRepoDir,

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/writers/ProjectModel400WriterTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/writers/ProjectModel400WriterTest.java?rev=751932&r1=751931&r2=751932&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/writers/ProjectModel400WriterTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/writers/ProjectModel400WriterTest.java
Tue Mar 10 01:09:34 2009
@@ -25,6 +25,7 @@
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
 import org.apache.maven.archiva.repository.project.ProjectModelWriter;
 import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
+import org.apache.maven.archiva.xml.XMLException;
 import org.codehaus.plexus.spring.PlexusInSpringTestCase;
 import org.custommonkey.xmlunit.DetailedDiff;
 import org.custommonkey.xmlunit.Diff;
@@ -128,7 +129,7 @@
     }
 
     private ArchivaProjectModel createArchivaProjectModel( String path )
-        throws ProjectModelException
+        throws XMLException
     {
         ProjectModelReader reader = new ProjectModel400Reader();
 



Mime
View raw message