continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r393453 - in /maven/continuum/branches/continuum-1.0.x: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum...
Date Wed, 12 Apr 2006 13:08:32 GMT
Author: evenisse
Date: Wed Apr 12 06:08:30 2006
New Revision: 393453

URL: http://svn.apache.org/viewcvs?rev=393453&view=rev
Log:
Load dependencies and parent only when it's necessary (only in the project sorter feature)
and not in the default fetch group, so we reduce a little memory usage

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/mdo/continuum.mdo
    maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
    maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=393453&r1=393452&r2=393453&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
Wed Apr 12 06:08:30 2006
@@ -63,6 +63,9 @@
     Collection getProjects()
         throws ContinuumException;
 
+    Collection getProjectsWithDependencies()
+        throws ContinuumException;
+
     BuildResult getLatestBuildResultForProject( int projectId );
 
     Map getLatestBuildResults();

Modified: maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?rev=393453&r1=393452&r2=393453&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
Wed Apr 12 06:08:30 2006
@@ -76,6 +76,8 @@
 
     List getAllProjectsByName();
 
+    List getAllProjectsByNameWithDependencies();
+
     List getAllProjectsByNameWithBuildDetails();
 
     List getAllSchedulesByName();

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=393453&r1=393452&r2=393453&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Wed Apr 12 06:08:30 2006
@@ -162,6 +162,12 @@
         return store.getAllProjectsByName();
     }
 
+    public Collection getProjectsWithDependencies()
+        throws ContinuumException
+    {
+        return store.getAllProjectsByNameWithDependencies();
+    }
+
     public Map getLatestBuildResults()
     {
         Map result = store.getLatestBuildResults();
@@ -650,7 +656,7 @@
     public List getProjectsInBuildOrder()
         throws CycleDetectedException, ContinuumException
     {
-        return getProjectsInBuildOrder( getProjects() );
+        return getProjectsInBuildOrder( getProjectsWithDependencies() );
     }
 
     private List getProjectsInBuildOrder( Collection projects )

Modified: maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/mdo/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/mdo/continuum.mdo?rev=393453&r1=393452&r2=393453&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-model/src/main/mdo/continuum.mdo Wed
Apr 12 06:08:30 2006
@@ -184,17 +184,17 @@
             <multiplicity>*</multiplicity>
           </association>
         </field>
-        <field jpox.fetchGroupNames="project-all-details">
+        <field jpox.fetchGroupNames="project-all-details project-dependencies">
           <name>parent</name>
           <version>1.0.0+</version>
-          <association stash.part="true" jpox.join="false">
+          <association jpox.join="false">
             <type>ProjectDependency</type>
           </association>
         </field>
-        <field jpox.fetchGroupNames="project-all-details">
+        <field jpox.fetchGroupNames="project-all-details project-dependencies">
           <name>dependencies</name>
           <version>1.0.0+</version>
-          <association stash.part="true" jpox.join="false">
+          <association jpox.join="false">
             <type>ProjectDependency</type>
             <multiplicity>*</multiplicity>
           </association>

Modified: maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?rev=393453&r1=393452&r2=393453&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Wed Apr 12 06:08:30 2006
@@ -82,6 +82,8 @@
 
     private static final String PROJECT_ALL_DETAILS_FETCH_GROUP = "project-all-details";
 
+    private static final String PROJECT_DEPENDENCIES_FETCH_GROUP = "project-dependencies";
+
     private static final String DEFAULT_GROUP_ID = "default";
 
     // ----------------------------------------------------------------------
@@ -631,6 +633,11 @@
     public List getAllProjectsByName()
     {
         return getAllObjectsDetached( Project.class, "name ascending", null );
+    }
+
+    public List getAllProjectsByNameWithDependencies()
+    {
+        return getAllObjectsDetached( Project.class, "name ascending", PROJECT_DEPENDENCIES_FETCH_GROUP
);
     }
 
     public List getAllProjectsByNameWithBuildDetails()

Modified: maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java?rev=393453&r1=393452&r2=393453&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
Wed Apr 12 06:08:30 2006
@@ -1479,10 +1479,11 @@
             try
             {
                 project.getDependencies();
+
+                fail( "dependencies should be in the default fetch group" );
             }
             catch ( JDODetachedFieldAccessException expected )
             {
-                fail( "dependencies should be in the default fetch group" );
             }
         }
 



Mime
View raw message