]> source.dussan.org Git - archiva.git/commitdiff
[MRM-380]: When trying to look at project with empty groupId
authorJoakim Erdfelt <joakime@apache.org>
Tue, 29 May 2007 19:47:26 +0000 (19:47 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Tue, 29 May 2007 19:47:26 +0000 (19:47 +0000)
Update for exception on Roles and JDODetachedFieldException

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@542634 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-consumers/archiva-database-consumers/src/main/java/org/apache/maven/archiva/consumers/database/ProjectModelToDatabaseConsumer.java
archiva-base/archiva-model/src/main/mdo/archiva-base.xml

index 334ac7ae052e420b53078040f4b3084138707a7c..763c2c2ba455aee59849138726ca4fc625b42180 100644 (file)
@@ -192,6 +192,13 @@ public class ProjectModelToDatabaseConsumer
             getLogger().warn( "Unable to save project model " + artifactFile + " to the database : " + e.getMessage(),
                               e );
         }
+        catch ( Throwable t )
+        {
+            // Catch the other errors in the process to allow the rest of the process to complete.
+            getLogger().error(
+                               "Unable to process model " + artifactFile + " due to : " + t.getClass().getName()
+                                   + " : " + t.getMessage(), t );
+        }
     }
 
     private boolean hasProjectModelInDatabase( String groupId, String artifactId, String version )
index 00d1e17e67b366cc007f97a27e326cbfec5df20b..314fee4775b93cf24659a24ce8d1a553b652b7ab 100644 (file)
 
     <class stash.storable="true"
            jpox.table="ARTIFACT"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.use-identifiers-as-primary-key="false"
            jpox.identity-type="application"
            jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactModelKey">
     </class>
     <class stash.storable="true"
            jpox.table="JAVA_ARTIFACT"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.use-identifiers-as-primary-key="false"
            jpox.identity-type="application"
            jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaArtifactJavaDetailsKey">
     
     <class stash.storable="true"
            jpox.use-identifiers-as-primary-key="false"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.identity-type="application"
            jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaRepositoryMetadataKey"
            jpox.table="REPOSITORY_METADATA">
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="REPOSITORY_METADATA_SNAPSHOTS">
       <name>SnapshotVersion</name>
       <description>The Snapshot Version</description>
      -->
 
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="PROJECT_REFERENCE">
       <name>ProjectReference</name>
       <description>A reference to another (unversioned) Project</description>
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="VERSIONED_REFERENCE">
       <name>VersionedReference</name>
       <description>A reference to another Versioned Project</description>
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="ARTIFACT_REFERENCE">
       <name>ArtifactReference</name>
       <version>1.0.0+</version>
 
     <class stash.storable="true"
            jpox.table="PROJECT"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.use-identifiers-as-primary-key="false"
            jpox.identity-type="application"
            jpox.identity-class="org.apache.maven.archiva.model.jpox.ArchivaProjectModelKey">
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="MAILING_LISTS">
       <name>MailingList</name>
       <description>A Mailing List</description>
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="ORGANIZATION">
       <name>Organization</name>
       <description>Specifies the organization that produces this project.</description>
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="LICENSES">
       <name>License</name>
       <description><![CDATA[
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="ISSUE_MANAGEMENT">
       <name>IssueManagement</name>
       <description>
       </codeSegments>
     </class>
     
-    <class>
+    <class jpox.not-persisted-fields="modelEncoding">
       <name>CiManagement</name>
       <version>1.0.0+</version>
       <fields>
       </codeSegments>
     </class>
     
-    <class stash.storable="true">
+    <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding">
       <name>Individual</name>
       <description>
         Description of a person who has contributed to the project.
             described by a <code>role</code> element, the body of which is a
             role name. This can also be used to describe the contribution.
           ]]></description>
-          <association>
+          <association stash.part="true"
+                       jpox.join="false">
             <type>String</type>
             <multiplicity>*</multiplicity>
           </association>
     </class>
 
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="DEPENDENCY">
       <name>Dependency</name>
       <version>1.0.0+</version>
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="EXCLUSIONS">
       <name>Exclusion</name>
       <version>1.0.0+</version>
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="SCM">
       <name>Scm</name>
       <version>1.0.0+</version>
     </class>
     
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="PROJECT_REPOSITORIES">
       <name>ProjectRepository</name>
       <version>1.0.0+</version>
       -->
 
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="REPOSITORY_PROBLEMS">
       <name>RepositoryProblem</name>
       <version>1.0.0+</version>
       -->
 
     <class stash.storable="true"
+           jpox.not-persisted-fields="modelEncoding"
            jpox.table="REPOSITORY_STATS">
       <name>RepositoryContentStatistics</name>
       <version>1.0.0+</version>