continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r232761 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/ continuum-core-it/src/test/java/org/apache/maven/continuum/it/ continuum-...
Date Mon, 15 Aug 2005 05:28:50 GMT
Author: brett
Date: Sun Aug 14 22:28:24 2005
New Revision: 232761

URL: http://svn.apache.org/viewcvs?rev=232761&view=rev
Log:
merge ant project into main project

Modified:
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
    maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
    maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
    maven/continuum/trunk/continuum-model/src/main/resources/META-INF/package.jdo
    maven/continuum/trunk/continuum-web/src/main/resources/forms/antProject.xml
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java

Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
Sun Aug 14 22:28:24 2005
@@ -19,7 +19,6 @@
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
@@ -131,20 +130,7 @@
         throws ContinuumException;
 
     // ----------------------------------------------------------------------
-    // Ant Projects
-    // ----------------------------------------------------------------------
-
-    String addAntProject( AntProject project )
-        throws ContinuumException;
-
-    AntProject getAntProject( String id )
-        throws ContinuumException;
-
-    void updateAntProject( AntProject project )
-        throws ContinuumException;
-
-    // ----------------------------------------------------------------------
-    // Shell projects
+    // Projects
     // ----------------------------------------------------------------------
 
     String addProject( ContinuumProject project, String executorId )

Modified: maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CruiseControlProjectBuilder.java
Sun Aug 14 22:28:24 2005
@@ -18,7 +18,6 @@
 
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
@@ -170,7 +169,7 @@
                         "A configuration can only have a single 'ant' or 'maven' schedule."
);
                 }
 
-                project = new AntProject();
+                project = new ContinuumProject();
 
                 project.setExecutorId( ContinuumBuildExecutor.ANT_EXECUTOR_ID );
             }

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
(original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/AntIntegrationTest.java
Sun Aug 14 22:28:24 2005
@@ -17,9 +17,10 @@
  */
 
 import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
+import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
-import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.util.FileUtils;
 
@@ -51,16 +52,19 @@
 
         progress( "Adding Ant SVN project" );
 
-        AntProject p = new AntProject();
+        ContinuumProject p = new ContinuumProject();
         p.setScmUrl( makeScmUrl( "svn", getSvnRoot(), "ant-svn" ) );
         p.setName( "Ant SVN Project" );
 //        p.getNotifiers().add( makeMailNotifier( email ) );
         p.setVersion( "3.0" );
-        p.setCommandLineArguments( "-v" );
-        p.setExecutable( "ant" );
-        p.setTargets( "clean build" );
 
-        String projectId = continuum.addAntProject( p );
+        BuildDefinition bd = new BuildDefinition();
+        bd.setArguments( "-v" );
+        bd.setBuildFile( "build.xml" );
+        bd.setGoals( "clean build" );
+        p.addBuildDefinition( bd );
+
+        String projectId = continuum.addProject( p, ContinuumBuildExecutor.ANT_EXECUTOR_ID
);
 
         waitForSuccessfulCheckout( projectId );
 
@@ -92,16 +96,19 @@
 
         cvsImport( root, "ant-cvs", getCvsRoot() );
 
-        AntProject p = new AntProject();
+        ContinuumProject p = new ContinuumProject();
         p.setScmUrl( makeScmUrl( "cvs", getCvsRoot(), "ant-cvs" ) );
         p.setName( "Ant CVS Project" );
 //        p.getNotifiers().add( makeMailNotifier( email ) );
         p.setVersion( "3.0" );
-        p.setCommandLineArguments( "-debug" );
-        p.setExecutable( "ant" );
-        p.setTargets( "clean build" );
 
-        String projectId = continuum.addAntProject( p );
+        BuildDefinition bd = new BuildDefinition();
+        bd.setArguments( "-debug" );
+        bd.setBuildFile( "build.xml" );
+        bd.setGoals( "clean build" );
+        p.addBuildDefinition( bd );
+
+        String projectId = continuum.addProject( p, ContinuumBuildExecutor.ANT_EXECUTOR_ID
);
 
         waitForSuccessfulCheckout( projectId );
 

Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
(original)
+++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ContinuumXmlRpcClient.java
Sun Aug 14 22:28:24 2005
@@ -21,7 +21,6 @@
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
@@ -246,24 +245,6 @@
     // ----------------------------------------------------------------------
     // Ant Projects
     // ----------------------------------------------------------------------
-
-    public String addAntProject( AntProject antProject )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public AntProject getAntProject( String s )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public void updateAntProject( AntProject antProject )
-        throws ContinuumException
-    {
-        throw new UnsupportedOperationException();
-    }
 
     // ----------------------------------------------------------------------
     // Notification

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=232761&r1=232760&r2=232761&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
Sun Aug 14 22:28:24 2005
@@ -26,7 +26,6 @@
 import org.apache.maven.continuum.core.action.AddProjectToCheckOutQueueAction;
 import org.apache.maven.continuum.core.action.CreateProjectsFromMetadata;
 import org.apache.maven.continuum.core.action.StoreProjectAction;
-import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
 import org.apache.maven.continuum.initialization.ContinuumInitializationException;
@@ -35,7 +34,6 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.ProjectNotifier;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumBuildSettings;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
@@ -347,26 +345,6 @@
     // ----------------------------------------------------------------------
     // Ant Projects
     // ----------------------------------------------------------------------
-
-    public String addAntProject( AntProject project )
-        throws ContinuumException
-    {
-        project.setExecutorId( AntBuildExecutor.ID );
-
-        return executeAddProjectFromScmActivity( project );
-    }
-
-    public AntProject getAntProject( String projectId )
-        throws ContinuumException
-    {
-        return (AntProject) getProject( projectId );
-    }
-
-    public void updateAntProject( AntProject project )
-        throws ContinuumException
-    {
-        updateProject( (ContinuumProject) project );
-    }
 
     // ----------------------------------------------------------------------
     // Maven 1.x projects

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
Sun Aug 14 22:28:24 2005
@@ -21,7 +21,6 @@
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
-import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -62,18 +61,12 @@
                                                 File buildOutput )
         throws ContinuumBuildExecutorException
     {
-        return build( project, buildOutput );
-    }
-
-    public ContinuumBuildExecutionResult build( ContinuumProject p, File buildOutput )
-        throws ContinuumBuildExecutorException
-    {
-        AntProject project = (AntProject) p;
-
-        String executable = project.getExecutable();
+        // TODO: get from installation
+//        String executable = project.getExecutable();
+        String executable = "ant";
 
-        String arguments = StringUtils.clean( project.getCommandLineArguments() ) + " " +
-            StringUtils.clean( project.getTargets() );
+        String arguments = StringUtils.clean( buildDefinition.getArguments() ) + " " +
+            StringUtils.clean( buildDefinition.getGoals() );
 
         return executeShellCommand( project, executable, arguments, buildOutput );
     }
@@ -81,11 +74,5 @@
     public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject p )
         throws ContinuumBuildExecutorException
     {
-        AntProject project = (AntProject) p;
-
-        if ( project.getTargets() == null )
-        {
-            project.setTargets( "" );
-        }
     }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
Sun Aug 14 22:28:24 2005
@@ -64,7 +64,7 @@
         if ( new File( executable ).isAbsolute() )
         {
             throw new ContinuumBuildExecutorException(
-                "The shell script must be a relative path. " + "It will be relative to the
checkout" );
+                "The shell script must be a relative path. It will be relative to the checkout."
);
         }
 
         return executeShellCommand( project, executable, buildDefinition.getArguments(),
buildOutput );

Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original)
+++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Sun Aug 14 22:28:24 2005
@@ -886,30 +886,6 @@
       </fields>
     </class>
 
-    <class stash.storable="true">
-      <packageName>org.apache.maven.continuum.project</packageName>
-      <name>AntProject</name>
-      <version>1.0.0</version>
-      <superClass>ContinuumProject</superClass>
-      <fields>
-        <field>
-          <name>executable</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>targets</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-        <field>
-          <name>commandLineArguments</name>
-          <version>1.0.0</version>
-          <type>String</type>
-        </field>
-      </fields>
-    </class>
-
     <class>
       <packageName>org.apache.maven.continuum.project</packageName>
       <name>ContinuumBuildSettings</name>

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=232761&r1=232760&r2=232761&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 Sun Aug
14 22:28:24 2005
@@ -76,15 +76,6 @@
         <column name="M1_GOALS"/>
       </field>
     </class>
-    <class name="AntProject" persistence-capable-superclass="org.apache.maven.continuum.project.ContinuumProject"
-           detachable="true">
-      <inheritance strategy="new-table"/>
-      <field name="commandLineArguments" persistence-modifier="persistent"/>
-      <field name="executable" persistence-modifier="persistent">
-        <column name="ANT_EXECUTABLE"/>
-      </field>
-      <field name="targets" persistence-modifier="persistent"/>
-    </class>
     <class name="ContinuumBuildSettings" detachable="true">
       <field name="name" persistence-modifier="persistent"/>
       <field name="cronExpression" persistence-modifier="persistent"/>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/antProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/antProject.xml?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/antProject.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/antProject.xml Sun Aug 14
22:28:24 2005
@@ -1,20 +1,22 @@
 <form>
   <extend>continuumProject</extend>
   <id>antProject</id>
-  <target-class>org.apache.maven.continuum.project.AntProject</target-class>
-  <lookup-expression>getAntProject(#id)</lookup-expression>
+  <target-class>org.apache.maven.continuum.project.ContinuumProject</target-class>
+  <lookup-expression>getProject(#id)</lookup-expression>
   <elements>
-    <element>
-      <id>project.targets</id>
-      <validators>
-        <validator>
-          <id>required</id>
-          <error-message-key>project.targets.error</error-message-key>
-        </validator>
-      </validators>
-      <expression>targets</expression>
-      <type>text</type>
-    </element>
+    <!-- TODO: into build definition
+        <element>
+          <id>project.targets</id>
+          <validators>
+            <validator>
+              <id>required</id>
+              <error-message-key>project.targets.error</error-message-key>
+            </validator>
+          </validators>
+          <expression>targets</expression>
+          <type>text</type>
+        </element>
+    -->
   </elements>
 
   <!-- Add -->
@@ -24,16 +26,6 @@
     <view>Summary.vm</view>
     <view-on-failure>Add.vm</view-on-failure>
     <fid-on-failure>antProject</fid-on-failure>
-    <expression>addAntProject(#entity)</expression>
+    <expression>addProject(#entity,"ant")</expression>
   </add>
-
-  <!-- Update -->
-  <update>
-    <title-key>project.title.update</title-key>
-    <action>updateEntity</action>
-    <view>Summary.vm</view>
-    <view-on-failure>Edit.vm</view-on-failure>
-    <expression>updateAntProject(#entity)</expression>
-  </update>
-
 </form>

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpc.java
Sun Aug 14 22:28:24 2005
@@ -21,6 +21,7 @@
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
+ * @todo - do we need the per-type variations?
  */
 public interface ContinuumXmlRpc
 {

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java?rev=232761&r1=232760&r2=232761&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
Sun Aug 14 22:28:24 2005
@@ -19,7 +19,6 @@
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.project.AntProject;
 import org.apache.maven.continuum.project.ContinuumProject;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.MavenTwoProject;
@@ -292,11 +291,11 @@
     {
         try
         {
-            AntProject project = new AntProject();
+            ContinuumProject project = new ContinuumProject();
 
             xmlRpcHelper.hashtableToObject( antProject, project );
 
-            String projectId = continuum.addAntProject( project );
+            String projectId = continuum.addProject( project, ShellBuildExecutor.ANT_EXECUTOR_ID
);
 
             Collection projectIds = new ArrayList();
 
@@ -316,11 +315,11 @@
 
         try
         {
-            AntProject project = continuum.getAntProject( id );
+            ContinuumProject project = continuum.getProject( id );
 
             xmlRpcHelper.hashtableToObject( antProject, project );
 
-            continuum.updateAntProject( project );
+            continuum.updateProject( project );
 
             return makeHashtable();
         }



Mime
View raw message