continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r548819 - in /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution: AbstractBuildExecutor.java ant/AntBuildExecutor.java maven/m1/MavenOneBuildExecutor.java maven/m2/MavenTwoBuildExecutor.java
Date Tue, 19 Jun 2007 18:39:35 GMT
Author: evenisse
Date: Tue Jun 19 11:39:35 2007
New Revision: 548819

URL: http://svn.apache.org/viewvc?view=rev&rev=548819
Log:
Use the builder used in profile instead of the default one.

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.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/maven/m1/MavenOneBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?view=diff&rev=548819&r1=548818&r2=548819
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Tue Jun 19 11:39:35 2007
@@ -302,4 +302,14 @@
     {
         this.installationService = installationService;
     }
+
+    public boolean isResolveExecutable()
+    {
+        return resolveExecutable;
+    }
+
+    public void setResolveExecutable( boolean resolveExecutable )
+    {
+        this.resolveExecutable = resolveExecutable;
+    }
 }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java?view=diff&rev=548819&r1=548818&r2=548819
==============================================================================
--- 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
Tue Jun 19 11:39:35 2007
@@ -85,7 +85,15 @@
         arguments +=
             StringUtils.clean( buildDefinition.getArguments() ) + " " + StringUtils.clean(
buildDefinition.getGoals() );
 
-        return executeShellCommand( project, executable, arguments, buildOutput, getEnvironments(
buildDefinition ) );
+        Map<String, String> environments = getEnvironments( buildDefinition );
+        String antHome = environments.get( getInstallationService().getEnvVar( InstallationService.ANT_TYPE
) );
+        if ( StringUtils.isNotEmpty( antHome ) )
+        {
+            executable = antHome + File.separator + "bin" + File.separator + executable;
+            setResolveExecutable( false );
+        }
+
+        return executeShellCommand( project, executable, arguments, buildOutput, environments
);
     }
 
     protected Map<String, String> getEnvironments( BuildDefinition buildDefinition
)

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java?view=diff&rev=548819&r1=548818&r2=548819
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
Tue Jun 19 11:39:35 2007
@@ -84,7 +84,15 @@
         arguments +=
             StringUtils.clean( buildDefinition.getArguments() ) + " " + StringUtils.clean(
buildDefinition.getGoals() );
 
-        return executeShellCommand( project, executable, arguments, buildOutput, getEnvironments(
buildDefinition ) );
+        Map<String, String> environments = getEnvironments( buildDefinition );
+        String m1Home = environments.get( getInstallationService().getEnvVar( InstallationService.MAVEN1_TYPE
) );
+        if ( StringUtils.isNotEmpty( m1Home ) )
+        {
+            executable = m1Home + File.separator + "bin" + File.separator + executable;
+            setResolveExecutable( false );
+        }
+
+        return executeShellCommand( project, executable, arguments, buildOutput, environments
);
     }
 
     protected Map<String, String> getEnvironments( BuildDefinition buildDefinition
)

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?view=diff&rev=548819&r1=548818&r2=548819
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
Tue Jun 19 11:39:35 2007
@@ -115,10 +115,15 @@
 
         arguments +=
             StringUtils.clean( buildDefinition.getArguments() ) + " " + StringUtils.clean(
buildDefinition.getGoals() );
-        Map<String, String> environments = new HashMap<String, String>();
-        Profile profile = buildDefinition.getProfile();
+        Map<String, String> environments = getEnvironments( buildDefinition );
+        String m2Home = environments.get( getInstallationService().getEnvVar( InstallationService.MAVEN2_TYPE
) );
+        if ( StringUtils.isNotEmpty( m2Home ) )
+        {
+            executable = m2Home + File.separator + "bin" + File.separator + executable;
+            setResolveExecutable( false );
+        }
 
-        return executeShellCommand( project, executable, arguments, buildOutput, getEnvironments(
buildDefinition ) );
+        return executeShellCommand( project, executable, arguments, buildOutput, environments
);
     }
 
     public void updateProjectFromCheckOut( File workingDirectory, Project project, BuildDefinition
buildDefinition )



Mime
View raw message