continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r354442 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Tue, 06 Dec 2005 14:30:12 GMT
Author: evenisse
Date: Tue Dec  6 06:30:09 2005
New Revision: 354442

URL: http://svn.apache.org/viewcvs?rev=354442&view=rev
Log:
PR: CONTINUUM-485
Submitted by; Nick Gonzalez

Add a default build definition for ant project

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=354442&r1=354441&r2=354442&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Tue Dec  6 06:30:09 2005
@@ -29,6 +29,7 @@
 import org.apache.maven.continuum.core.action.StoreProjectAction;
 import org.apache.maven.continuum.initialization.ContinuumInitializationException;
 import org.apache.maven.continuum.initialization.ContinuumInitializer;
+import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
@@ -589,6 +590,32 @@
         throws ContinuumException
     {
         project.setExecutorId( executorId );
+
+        if ( "executorId".equalsIgnoreCase( "ant" ) )
+        {
+            try
+            {
+                BuildDefinition bd = new BuildDefinition();
+
+                bd.setDefaultForProject( true );
+
+                bd.setArguments( "" );
+
+                bd.setGoals( "build" );
+
+                bd.setBuildFile( "build.xml" );
+
+                Schedule schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
+
+                bd.setSchedule( schedule );
+
+                project.addBuildDefinition( bd );       
+            }
+            catch ( ContinuumStoreException e )
+            {
+                getLogger().warn( "Can't get default schedule.", e );
+            }
+        }
 
         return executeAddProjectFromScmActivity( project );
     }



Mime
View raw message