continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r652889 - in /continuum/trunk/continuum-core/src: main/java/org/apache/maven/continuum/execution/ main/java/org/apache/maven/continuum/execution/maven/m1/ main/java/org/apache/maven/continuum/execution/maven/m2/ main/resources/META-INF/ tes...
Date Fri, 02 May 2008 20:09:13 GMT
Author: carlos
Date: Fri May  2 13:09:13 2008
New Revision: 652889

URL: http://svn.apache.org/viewvc?rev=652889&view=rev
Log:
Inject missing fields. Add getters/setters

Modified:
    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/m1/MavenOneBuildExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
    continuum/trunk/continuum-core/src/main/resources/META-INF/spring-context.xml
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java

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=652889&r1=652888&r2=652889&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
Fri May  2 13:09:13 2008
@@ -137,6 +137,11 @@
     // Component Lifecycle
     // ----------------------------------------------------------------------
 
+    public String getDefaultExecutable()
+    {
+        return defaultExecutable;
+    }
+
     public void initialize()
         throws InitializationException
     {
@@ -425,6 +430,11 @@
         this.executableResolver = executableResolver;
     }
 
+    public ExecutableResolver getExecutableResolver()
+    {
+        return executableResolver;
+    }
+
     public void setChrootJailDirectory( File chrootJailDirectory )
     {
         this.chrootJailDirectory = chrootJailDirectory;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java?rev=652889&r1=652888&r2=652889&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
Fri May  2 13:09:13 2008
@@ -64,6 +64,11 @@
         super( ID, true );
     }
 
+    public MavenOneMetadataHelper getMetadataHelper()
+    {
+        return metadataHelper;
+    }
+
     public void setMetadataHelper( MavenOneMetadataHelper metadataHelper )
     {
         this.metadataHelper = metadataHelper;

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=652889&r1=652888&r2=652889&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
Fri May  2 13:09:13 2008
@@ -96,6 +96,36 @@
         super( ID, true );
     }
 
+    public MavenBuilderHelper getBuilderHelper()
+    {
+        return builderHelper;
+    }
+
+    public void setBuilderHelper( MavenBuilderHelper builderHelper )
+    {
+        this.builderHelper = builderHelper;
+    }
+
+    public MavenProjectHelper getProjectHelper()
+    {
+        return projectHelper;
+    }
+
+    public void setProjectHelper( MavenProjectHelper projectHelper )
+    {
+        this.projectHelper = projectHelper;
+    }
+
+    public ConfigurationService getConfigurationService()
+    {
+        return configurationService;
+    }
+
+    public void setConfigurationService( ConfigurationService configurationService )
+    {
+        this.configurationService = configurationService;
+    }
+
     // ----------------------------------------------------------------------
     // ContinuumBuilder Implementation
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-core/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/resources/META-INF/spring-context.xml?rev=652889&r1=652888&r2=652889&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/resources/META-INF/spring-context.xml (original)
+++ continuum/trunk/continuum-core/src/main/resources/META-INF/spring-context.xml Fri May
 2 13:09:13 2008
@@ -10,6 +10,8 @@
   <bean name="continuumBuildExecutor#maven2"
          class="org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor" autowire="byName">
     <property name="defaultExecutable" value="mvn"/>
+    <property name="builderHelper" ref="mavenBuilderHelper"/>
+    <property name="projectHelper" ref="mavenProjectHelper"/>
   </bean>
   <bean name="continuumBuildExecutor#maven-1"
          class="org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor" autowire="byName">

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java?rev=652889&r1=652888&r2=652889&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java
(original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/manager/DefaultBuildExecutorManagerTest.java
Fri May  2 13:09:13 2008
@@ -20,6 +20,11 @@
  */
 
 import org.apache.maven.continuum.AbstractContinuumTest;
+import org.apache.maven.continuum.execution.AbstractBuildExecutor;
+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.execution.shell.ShellBuildExecutor;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -28,9 +33,59 @@
 public class DefaultBuildExecutorManagerTest
     extends AbstractContinuumTest
 {
-    public void testBasic()
+    private BuildExecutorManager builderManager;
+
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        builderManager = (BuildExecutorManager) lookup( BuildExecutorManager.ROLE );
+    }
+
+    public void testMavenTwoBuildExecutorDependencyInjection()
+        throws Exception
+    {
+        MavenTwoBuildExecutor executor =
+            (MavenTwoBuildExecutor) builderManager.getBuildExecutor( MavenTwoBuildExecutor.ID
);
+
+        assertCommonFields( executor );
+        assertNotNull( executor.getBuilderHelper() );
+        assertNotNull( executor.getProjectHelper() );
+        assertNotNull( executor.getConfigurationService() );
+    }
+
+    public void testMavenOneBuildExecutorDependencyInjection()
+        throws Exception
+    {
+        MavenOneBuildExecutor executor =
+            (MavenOneBuildExecutor) builderManager.getBuildExecutor( MavenOneBuildExecutor.ID
);
+
+        assertCommonFields( executor );
+        assertNotNull( executor.getMetadataHelper() );
+    }
+
+    public void testAntBuildExecutorDependencyInjection()
+        throws Exception
+    {
+        AntBuildExecutor executor = (AntBuildExecutor) builderManager.getBuildExecutor( AntBuildExecutor.ID
);
+
+        assertCommonFields( executor );
+    }
+
+    public void testShellBuildExecutorDependencyInjection()
         throws Exception
     {
-        lookup( BuildExecutorManager.ROLE );
+        ShellBuildExecutor executor = (ShellBuildExecutor) builderManager.getBuildExecutor(
ShellBuildExecutor.ID );
+
+        assertCommonFields( executor );
+    }
+
+    private void assertCommonFields( AbstractBuildExecutor executor )
+    {
+        assertNotNull( executor.getShellCommandHelper() );
+        assertNotNull( executor.getExecutableResolver() );
+        assertNotNull( executor.getWorkingDirectoryService() );
+        assertNotNull( executor.getInstallationService() );
     }
 }



Mime
View raw message