continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r671495 - in /continuum/trunk: continuum-api/ continuum-api/src/main/java/org/apache/maven/continuum/execution/ continuum-base/continuum-scm/ continuum-core/src/main/java/org/apache/maven/continuum/core/action/ continuum-core/src/main/java/...
Date Wed, 25 Jun 2008 10:08:26 GMT
Author: evenisse
Date: Wed Jun 25 03:08:25 2008
New Revision: 671495

URL: http://svn.apache.org/viewvc?rev=671495&view=rev
Log:
more java5

Modified:
    continuum/trunk/continuum-api/pom.xml
    continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
    continuum/trunk/continuum-base/continuum-scm/   (props changed)
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java

Modified: continuum/trunk/continuum-api/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/pom.xml?rev=671495&r1=671494&r2=671495&view=diff
==============================================================================
--- continuum/trunk/continuum-api/pom.xml (original)
+++ continuum/trunk/continuum-api/pom.xml Wed Jun 25 03:08:25 2008
@@ -47,5 +47,9 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-taskqueue</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java?rev=671495&r1=671494&r2=671495&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
Wed Jun 25 03:08:25 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ChangeSet;
@@ -47,7 +48,7 @@
     void killProcess( Project project );
 
     // TODO: are these part of the builder interface, or a separate project/build definition
interface?
-    List getDeployableArtifacts( Project project, File workingDirectory, BuildDefinition
buildDefinition )
+    List<Artifact> getDeployableArtifacts( Project project, File workingDirectory,
BuildDefinition buildDefinition )
         throws ContinuumBuildExecutorException;
 
     //TODO: Move as a plugin

Propchange: continuum/trunk/continuum-base/continuum-scm/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Jun 25 03:08:25 2008
@@ -3,3 +3,4 @@
 .project
 .settings
 *.iml
+build

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java?rev=671495&r1=671494&r2=671495&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/DeployArtifactContinuumAction.java
Wed Jun 25 03:08:25 2008
@@ -102,14 +102,12 @@
             {
                 BuildDefinition buildDefinition = getBuildDefinition( context );
 
-                List artifacts = buildExecutor.getDeployableArtifacts( project,
+                List<Artifact> artifacts = buildExecutor.getDeployableArtifacts( project,
                                                                        workingDirectoryService.getWorkingDirectory(
                                                                            project ), buildDefinition
);
 
-                for ( Iterator i = artifacts.iterator(); i.hasNext(); )
+                for ( Artifact artifact : artifacts )
                 {
-                    Artifact artifact = (Artifact) i.next();
-
                     ArtifactRepository localRepository = builderHelper.getLocalRepository();
 
                     ArtifactRepositoryLayout repositoryLayout = new DefaultRepositoryLayout();

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=671495&r1=671494&r2=671495&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Wed Jun 25 03:08:25 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
@@ -39,7 +40,6 @@
 import java.io.File;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -189,7 +189,7 @@
         // ----------------------------------------------------------------------
         // If we're not searching the path for the executable, prefix the
         // executable with the working directory to make sure the path is
-        // absolute and thus won't be tried resoled by using the PATH
+        // absolute and thus won't be tried resolved by using the PATH
         // ----------------------------------------------------------------------
 
         String actualExecutable;
@@ -200,7 +200,7 @@
         }
         else
         {
-            List path = executableResolver.getDefaultPath();
+            List<String> path = executableResolver.getDefaultPath();
 
             if ( StringUtils.isEmpty( executable ) )
             {
@@ -213,10 +213,8 @@
             {
                 getLogger().warn( "Could not find the executable '" + executable + "' in
this path: " );
 
-                for ( Iterator it = path.iterator(); it.hasNext(); )
+                for ( String element : path )
                 {
-                    String element = (String) it.next();
-
                     getLogger().warn( element );
                 }
 
@@ -342,7 +340,7 @@
     }
 
     /**
-     * By default, we return true because with a change, the projet must be rebuilt.
+     * By default, we return true because with a change, the project must be rebuilt.
      */
     public boolean shouldBuild( List<ChangeSet> changes, Project continuumProject,
File workingDirectory,
                                 BuildDefinition buildDefinition )
@@ -408,7 +406,7 @@
         getShellCommandHelper().killProcess( project.getId() );
     }
 
-    public List getDeployableArtifacts( Project project, File workingDirectory, BuildDefinition
buildDefinition )
+    public List<Artifact> getDeployableArtifacts( Project project, File workingDirectory,
BuildDefinition buildDefinition )
         throws ContinuumBuildExecutorException
     {
         // Not supported by this builder

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=671495&r1=671494&r2=671495&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
Wed Jun 25 03:08:25 2008
@@ -19,6 +19,17 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.continuum.configuration.ConfigurationException;
@@ -43,16 +54,6 @@
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -209,7 +210,7 @@
     }
 
     @Override
-    public List getDeployableArtifacts( Project continuumProject, File workingDirectory,
+    public List<Artifact> getDeployableArtifacts( Project continuumProject, File workingDirectory,
                                         BuildDefinition buildDefinition )
         throws ContinuumBuildExecutorException
     {
@@ -407,6 +408,7 @@
         {
             files.addAll( changeSet.getFiles() );
         }
+
         int i = 0;
         while ( i <= files.size() - 1 )
         {
@@ -437,6 +439,7 @@
         {
             getLogger().info( "Changes are only in sub-modules." );
         }
+
         if ( getLogger().isDebugEnabled() )
         {
             getLogger().debug( "shoulbuild = " + shouldBuild );



Mime
View raw message