continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r232211 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/core/action/ continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/ continuum-core/src/main/java/org/apache/maven/continuum...
Date Fri, 12 Aug 2005 05:50:17 GMT
Author: brett
Date: Thu Aug 11 22:50:01 2005
New Revision: 232211

URL: http://svn.apache.org/viewcvs?rev=232211&view=rev
Log:
remove unused fields from project group

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
    maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java?rev=232211&r1=232210&r2=232211&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
Thu Aug 11 22:50:01 2005
@@ -2,10 +2,9 @@
 
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.project.ContinuumProjectGroup;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 
-import java.io.File;
 import java.util.Map;
 
 /**
@@ -29,23 +28,6 @@
         projectGroup = store.addProjectGroup( projectGroup );
 
         context.put( KEY_PROJECT_GROUP_ID, projectGroup.getId() );
-
-        // ----------------------------------------------------------------------
-        // Set the working directory
-        // ----------------------------------------------------------------------
-
-        File projectWorkingDirectory = new File( getWorkingDirectory( context ), projectGroup.getId()
);
-
-        if ( !projectWorkingDirectory.exists() && !projectWorkingDirectory.mkdirs()
)
-        {
-            throw new ContinuumException( "Could not make the working directory for the project
" +
-                                          "'" + projectWorkingDirectory.getAbsolutePath()
+ "'." );
-        }
-
-        // The working directory is created based on the project id so we can always
-        // figure out what it is.
-
-        projectGroup.setWorkingDirectory( projectWorkingDirectory.getAbsolutePath() );
 
         store.updateProjectGroup( projectGroup );
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=232211&r1=232210&r2=232211&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Thu Aug 11 22:50:01 2005
@@ -26,7 +26,6 @@
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
 import org.apache.maven.continuum.utils.ContinuumUtils;
-import org.apache.maven.model.IssueManagement;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -211,6 +210,7 @@
 
         projectGroup.setUrl( mavenProject.getUrl() );
 
+/*
         // ----------------------------------------------------------------------
         //
         // ----------------------------------------------------------------------
@@ -226,6 +226,7 @@
 
         projectGroup.setIssueManagementUrl( issueManagementUrl );
 
+*/
         return projectGroup;
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java?rev=232211&r1=232210&r2=232211&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scheduler/ContinuumBuildJob.java
Thu Aug 11 22:50:01 2005
@@ -1,16 +1,9 @@
 package org.apache.maven.continuum.scheduler;
 
-import org.apache.maven.continuum.Continuum;
-import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.project.ContinuumBuildSettings;
-import org.apache.maven.continuum.project.ContinuumProjectGroup;
 import org.codehaus.plexus.logging.Logger;
 import org.quartz.Job;
 import org.quartz.JobDetail;
 import org.quartz.JobExecutionContext;
-
-import java.util.Iterator;
-import java.util.Set;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=232211&r1=232210&r2=232211&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Thu Aug 11 22:50:01 2005
@@ -16,22 +16,21 @@
  * limitations under the License.
  */
 
+import org.apache.maven.continuum.project.ContinuumNotifier;
+import org.apache.maven.continuum.project.ContinuumProjectGroup;
+import org.apache.maven.continuum.project.MavenTwoProject;
+import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
+import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
+import org.codehaus.plexus.PlexusTestCase;
+
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.PrintStream;
-import java.io.ByteArrayOutputStream;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.maven.continuum.project.ContinuumNotifier;
-import org.apache.maven.continuum.project.MavenTwoProject;
-import org.apache.maven.continuum.project.ContinuumProjectGroup;
-import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
-import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-
-import org.codehaus.plexus.PlexusTestCase;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -42,8 +41,8 @@
     public void testGetEmailAddressWhenTypeIsSetToEmail()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder)
-            lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID
);
 
         File pom = getTestFile( "src/test/repository/maven-builder-helper-1.xml" );
 
@@ -57,13 +56,13 @@
 
         assertEquals( 1, result.getProjects().size() );
 
-        MavenTwoProject project = ( MavenTwoProject ) result.getProjects().get( 0 );
+        MavenTwoProject project = (MavenTwoProject) result.getProjects().get( 0 );
 
         assertNotNull( project.getNotifiers() );
 
         assertEquals( 1, project.getNotifiers().size() );
 
-        ContinuumNotifier notifier = (ContinuumNotifier) project.getNotifiers().get(0);
+        ContinuumNotifier notifier = (ContinuumNotifier) project.getNotifiers().get( 0 );
 
         assertEquals( "mail", notifier.getType() );
 
@@ -73,8 +72,8 @@
     public void testGetEmailAddressWhenTypeIsntSet()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder)
-            lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID
);
 
         File pom = getTestFile( "src/test/repository/maven-builder-helper-2.xml" );
 
@@ -94,7 +93,7 @@
 
         assertEquals( 1, project.getNotifiers().size() );
 
-        ContinuumNotifier notifier = (ContinuumNotifier) project.getNotifiers().get(0);
+        ContinuumNotifier notifier = (ContinuumNotifier) project.getNotifiers().get( 0 );
 
         assertEquals( "mail", notifier.getType() );
 
@@ -104,8 +103,8 @@
     public void testCreateProjectsWithModules()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder)
-            lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID
);
 
         String url = getTestFile( "src/test/resources/projects/continuum/pom.xml" ).toURL().toExternalForm();
 
@@ -148,9 +147,6 @@
         assertEquals( "projectGroup.description", "Continuum Project Description", projectGroup.getDescription()
);
 
         assertEquals( "projectGroup.url", "http://cvs.continuum.codehaus.org/", projectGroup.getUrl()
);
-
-        assertEquals( "projectGroup.issueManagementUrl", "http://jira.codehaus.org/browse/CONTINUUM",
-                      projectGroup.getIssueManagementUrl() );
 
         // ----------------------------------------------------------------------
         // Assert the projects built

Modified: maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo?rev=232211&r1=232210&r2=232211&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo Thu Aug
11 22:50:01 2005
@@ -146,19 +146,11 @@
       <field name="name" persistence-modifier="persistent"/>
       <field name="description" persistence-modifier="persistent"/>
       <field name="url" persistence-modifier="persistent"/>
-      <field name="issueManagementUrl" persistence-modifier="persistent"/>
-      <field name="scmUrl" persistence-modifier="persistent"/>
-      <field name="workingDirectory" persistence-modifier="persistent"/>
       <field name="projects" persistence-modifier="persistent" mapped-by="projectGroup">
         <collection element-type="ContinuumProject"/>
       </field>
-      <field name="buildSettings" persistence-modifier="persistent" table="pg_build_settings">
-        <collection element-type="ContinuumBuildSettings"/>
-        <join/>
-      </field>
       <fetch-group name="project-group-detail">
         <field name="projects"/>
-        <field name="buildSettings"/>
       </fetch-group>
     </class>
 
@@ -171,12 +163,6 @@
       <field name="scmMode" persistence-modifier="persistent"/>
       <field name="jdkVersion" persistence-modifier="persistent"/>
       <field name="cronExpression" persistence-modifier="persistent"/>
-      <field name="projectGroups" persistence-modifier="persistent" mapped-by="buildSettings">
-        <collection element-type="ContinuumProjectGroup"/>
-      </field>
-      <fetch-group name="build-settings-detail">
-        <field name="projectGroups"/>
-      </fetch-group>
     </class>
 
   </package>

Modified: maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo?rev=232211&r1=232210&r2=232211&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/resources/continuum.mdo Thu Aug 11 22:50:01
2005
@@ -603,21 +603,6 @@
           <type>String</type>
         </field>
         <field>
-          <name>issueManagementUrl</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>scmUrl</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>workingDirectory</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
           <name>projects</name>
           <version>1.0.0</version>
           <type>Set</type>
@@ -626,15 +611,6 @@
             <multiplicity>*</multiplicity>
           </association>
         </field>
-        <field>
-          <name>buildSettings</name>
-          <version>1.0.0</version>
-          <type>Set</type>
-          <association stash.part="false">
-            <type>ContinuumBuildSettings</type>
-            <multiplicity>*</multiplicity>
-          </association>
-        </field>
       </fields>
     </class>
 
@@ -677,15 +653,6 @@
           <name>cronExpression</name>
           <version>1.0.0</version>
           <type>String</type>
-        </field>
-        <field>
-          <name>projectGroups</name>
-          <version>1.0.0</version>
-          <type>Set</type>
-          <association stash.part="false">
-            <type>ContinuumProjectGroup</type>
-            <multiplicity>*</multiplicity>
-          </association>
         </field>
       </fields>
     </class>

Modified: maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?rev=232211&r1=232210&r2=232211&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Thu Aug 11 22:50:01 2005
@@ -45,7 +45,6 @@
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -709,19 +708,6 @@
             Object id = pm.newObjectIdInstance( ContinuumBuildSettings.class, buildSettingsId
);
 
             ContinuumBuildSettings buildSettings = (ContinuumBuildSettings) pm.getObjectById(
id );
-
-            // remove references of this buildSettings object in the project groups
-            if ( buildSettings.getProjectGroups() != null && buildSettings.getProjectGroups().size()
> 0 )
-            {
-                Set projects = buildSettings.getProjectGroups();
-
-                for ( Iterator i = projects.iterator(); i.hasNext(); )
-                {
-                    ContinuumProjectGroup project = (ContinuumProjectGroup) i.next();
-
-                    project.getBuildSettings().remove( buildSettings );
-                }
-            }
 
             pm.deletePersistent( buildSettings );
 



Mime
View raw message