continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r289250 - in /maven/continuum/trunk: continuum-core-it/src/test/java/org/apache/maven/continuum/it/ continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/ continuum-core/src/main/java/org/apache/maven/continuum/project/...
Date Thu, 15 Sep 2005 14:53:33 GMT
Author: evenisse
Date: Thu Sep 15 07:53:21 2005
New Revision: 289250

URL: http://svn.apache.org/viewcvs?rev=289250&view=rev
Log:
[CONTINUUM-312] Fix build definitions added in m1 builds.

Modified:
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java?rev=289250&r1=289249&r2=289250&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
(original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenOneIntegrationTest.java
Thu Sep 15 07:53:21 2005
@@ -54,6 +54,8 @@
 
         waitForSuccessfulCheckout( projectId );
 
+        assertEquals(1, continuum.getProjectWithAllDetails( projectId ).getBuildDefinitions().size());
+
         Project project = continuum.getProjectWithCheckoutResult( projectId );
 
         assertProject( projectId, "Maven 1 Project", "1.0", "", MavenOneBuildExecutor.ID,
project );
@@ -69,6 +71,8 @@
         int buildId = buildProject( projectId, ContinuumProjectState.TRIGGER_UNKNOWN ).getId();
 
         assertSuccessfulMaven1Build( buildId, projectId );
+
+        assertEquals(1, continuum.getProjectWithAllDetails( projectId ).getBuildDefinitions().size());
 
         // ----------------------------------------------------------------------
         //

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=289250&r1=289249&r2=289250&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
Thu Sep 15 07:53:21 2005
@@ -16,14 +16,9 @@
  * limitations under the License.
  */
 
-import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
-import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.notification.ContinuumRecipientSource;
-import org.apache.maven.continuum.store.ContinuumStore;
-import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
@@ -44,11 +39,6 @@
     extends AbstractLogEnabled
     implements MavenOneMetadataHelper
 {
-    /**
-     * @plexus.requirement
-     */
-    private ContinuumStore store;
-
     // ----------------------------------------------------------------------
     // MavenOneMetadataHelper Implementation
     // ----------------------------------------------------------------------
@@ -249,27 +239,6 @@
         project.setScmUrl( scmConnection );
 
         project.setNotifiers( notifiers );
-
-        BuildDefinition bd = new BuildDefinition();
-
-        bd.setArguments( "" );
-
-        bd.setGoals( "clean:clean jar:install" );
-
-        bd.setBuildFile( "project.xml" );
-
-        try
-        {
-            Schedule schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
-
-            bd.setSchedule( schedule );
-        }
-        catch ( ContinuumStoreException e )
-        {
-            getLogger().warn( "Can't get default schedule.", e );
-        }
-
-        project.addBuildDefinition( bd );
     }
 
     // ----------------------------------------------------------------------

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java?rev=289250&r1=289249&r2=289250&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
Thu Sep 15 07:53:21 2005
@@ -19,11 +19,16 @@
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelperException;
+import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
+import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
+import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
+import org.apache.maven.continuum.store.ContinuumStore;
+import org.apache.maven.continuum.store.ContinuumStoreException;
 
 import java.io.File;
 import java.io.IOException;
@@ -44,6 +49,11 @@
      */
     private MavenOneMetadataHelper metadataHelper;
 
+    /**
+     * @plexus.requirement
+     */
+    private ContinuumStore store;
+
     // ----------------------------------------------------------------------
     // ProjectCreator Implementation
     // ----------------------------------------------------------------------
@@ -72,6 +82,27 @@
             Project project = new Project();
 
             metadataHelper.mapMetadata( pomFile, project );
+
+            BuildDefinition bd = new BuildDefinition();
+
+            bd.setArguments( "" );
+
+            bd.setGoals( "clean:clean jar:install" );
+
+            bd.setBuildFile( "project.xml" );
+
+            try
+            {
+                Schedule schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
+
+                bd.setSchedule( schedule );
+            }
+            catch ( ContinuumStoreException e )
+            {
+                getLogger().warn( "Can't get default schedule.", e );
+            }
+
+            project.addBuildDefinition( bd );
 
             result.addProject( project, MavenOneBuildExecutor.ID );
         }

Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?rev=289250&r1=289249&r2=289250&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
Thu Sep 15 07:53:21 2005
@@ -255,11 +255,6 @@
     <component>
       <role>org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper</role>
       <implementation>org.apache.maven.continuum.execution.maven.m1.DefaultMavenOneMetadataHelper</implementation>
-      <requirements>
-        <requirement>
-          <role>org.apache.maven.continuum.store.ContinuumStore</role>
-        </requirement>
-      </requirements>
     </component>
 
     <component>
@@ -317,6 +312,9 @@
       <requirements>
         <requirement>
           <role>org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper</role>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
         </requirement>
       </requirements>
     </component>



Mime
View raw message