continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r926634 - in /continuum/trunk: continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/ continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/action/ contin...
Date Tue, 23 Mar 2010 15:52:46 GMT
Author: oching
Date: Tue Mar 23 15:52:45 2010
New Revision: 926634

URL: http://svn.apache.org/viewvc?rev=926634&view=rev
Log:
[CONTINUUM-2391] Master should not pass full path to local repository to the agent
o pass only the repository name/id from the build server to the build agent during release
o add tests for local repo path in release prepare and release perform with distributed builds
o moved stub classes used for tests to its own package

Added:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/manager/
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.xml
Removed:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/action/
Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java?rev=926634&r1=926633&r2=926634&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
Tue Mar 23 15:52:45 2010
@@ -21,6 +21,7 @@ package org.apache.continuum.buildagent.
 
 import java.io.File;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
@@ -162,6 +163,7 @@ public class DefaultBuildAgentReleaseMan
         return "";
     }
 
+    @SuppressWarnings( "unchecked" )
     public void releasePerform( String releaseId, String goals, String arguments, boolean
useReleaseProfile,
                                 Map repository, String username )
         throws ContinuumReleaseException
@@ -174,10 +176,19 @@ public class DefaultBuildAgentReleaseMan
 
         if ( !repository.isEmpty() )
         {
-            repo = new LocalRepository();
-            repo.setLayout( ContinuumBuildAgentUtil.getLocalRepositoryLayout( repository
) );
-            repo.setName( ContinuumBuildAgentUtil.getLocalRepositoryName( repository ) );
-            repo.setLocation( ContinuumBuildAgentUtil.getLocalRepository( repository ) );
+            List<org.apache.continuum.buildagent.model.LocalRepository>  localRepos
= buildAgentConfigurationService.getLocalRepositories();
+            for( org.apache.continuum.buildagent.model.LocalRepository localRepo : localRepos
)
+            {
+                if( localRepo.getName().equalsIgnoreCase( ContinuumBuildAgentUtil.getLocalRepositoryName(
repository ) ) )
+                {
+                    repo = new LocalRepository();
+                    repo.setLayout( localRepo.getLayout() );
+                    repo.setName( localRepo.getName() );
+                    repo.setLocation( localRepo.getLocation() );
+                    
+                    break;
+                }   
+            }
         }
 
         File performDirectory =
@@ -267,7 +278,8 @@ public class DefaultBuildAgentReleaseMan
 
         ProjectGroup group = new ProjectGroup();
 
-        String localRepo = ContinuumBuildAgentUtil.getLocalRepository( context );
+        String localRepo = ContinuumBuildAgentUtil.getLocalRepositoryName( context );
+        
         if ( StringUtils.isBlank( localRepo ) )
         {
             group.setLocalRepository( null );
@@ -275,8 +287,16 @@ public class DefaultBuildAgentReleaseMan
         else
         {
             LocalRepository localRepository = new LocalRepository();
-            localRepository.setLocation( localRepo );
-            group.setLocalRepository( localRepository );
+            List<org.apache.continuum.buildagent.model.LocalRepository> localRepos
= buildAgentConfigurationService.getLocalRepositories();
+            for( org.apache.continuum.buildagent.model.LocalRepository localRepoBA : localRepos
)
+            {
+                if( localRepoBA.getName().equalsIgnoreCase( localRepo ) )
+                {
+                    localRepository.setLocation( localRepoBA.getLocation() );
+                    group.setLocalRepository( localRepository );
+                    break;
+                }
+            }
         }
 
         project.setProjectGroup( group );
@@ -350,5 +370,8 @@ public class DefaultBuildAgentReleaseMan
         return props;
     }
 
-
+    public void setBuildAgentConfigurationService( BuildAgentConfigurationService buildAgentConfigurationService
)
+    {
+        this.buildAgentConfigurationService = buildAgentConfigurationService;
+    }    
 }

Added: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java?rev=926634&view=auto
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
(added)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
Tue Mar 23 15:52:45 2010
@@ -0,0 +1,316 @@
+package org.apache.continuum.buildagent.manager;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
+import org.apache.continuum.buildagent.model.LocalRepository;
+import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
+import org.apache.maven.continuum.release.ContinuumReleaseException;
+import org.codehaus.plexus.spring.PlexusInSpringTestCase;
+import org.jmock.Expectations;
+import org.jmock.Mockery;
+import org.jmock.integration.junit3.JUnit3Mockery;
+import org.jmock.lib.legacy.ClassImposteriser;
+
+/**
+ * For the CONTINUUM-2391 tests, checking of the local repository details is in ContinuumReleaseManagerStub.
An
+ * exception is thrown if the set local repository in the repository map is incorrect.
+ */
+public class BuildAgentReleaseManagerTest
+    extends PlexusInSpringTestCase
+{
+    private Mockery context;
+
+    private BuildAgentConfigurationService buildAgentConfigurationService;
+
+    private DefaultBuildAgentReleaseManager releaseManager;
+
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        context = new JUnit3Mockery();
+        context.setImposteriser( ClassImposteriser.INSTANCE );
+
+        releaseManager = (DefaultBuildAgentReleaseManager) lookup( BuildAgentReleaseManager.class
);
+
+        buildAgentConfigurationService = context.mock( BuildAgentConfigurationService.class
);
+
+        releaseManager.setBuildAgentConfigurationService( buildAgentConfigurationService
);
+    }
+
+    protected void tearDown()
+        throws Exception
+    {
+        releaseManager = null;
+
+        super.tearDown();
+    }
+
+    // CONTINUUM-2391
+    public void testLocalRepositoryInReleasePrepare()
+        throws Exception
+    {
+        final List<LocalRepository> localRepos = createLocalRepositories();
+        final File workingDir = new File( getBasedir(), "target/test-classes/working-dir"
);
+
+        context.checking( new Expectations()
+        {
+            {
+                one( buildAgentConfigurationService ).getLocalRepositories();
+                will( returnValue( localRepos ) );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory( 1 );
+                will( returnValue( workingDir ) );
+            }
+        } );
+
+        try
+        {
+            releaseManager.releasePrepare( createProjectMap(), createPropertiesMap(), createReleaseVersionMap(),
+                                           createDevVersionMap(), createEnvironmentsMap(),
"user" );
+        }
+        catch ( ContinuumReleaseException e )
+        {
+            fail( "An exception should not have been thrown!" );
+        }
+    }    
+
+    // CONTINUUM-2391
+    public void testLocalRepositoryNameMismatchedCaseInReleasePrepare()
+        throws Exception
+    {
+        final List<LocalRepository> localRepos = createLocalRepositories();
+        final File workingDir = new File( getBasedir(), "target/test-classes/working-dir"
);
+
+        context.checking( new Expectations()
+        {
+            {
+                one( buildAgentConfigurationService ).getLocalRepositories();
+                will( returnValue( localRepos ) );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory( 1 );
+                will( returnValue( workingDir ) );
+            }
+        } );
+
+        Map<String, Object> map = createProjectMap();
+
+        try
+        {
+            releaseManager.releasePrepare( map, createPropertiesMap(), createReleaseVersionMap(),
+                                           createDevVersionMap(), createEnvironmentsMap(),
"user" );
+        }
+        catch ( ContinuumReleaseException e )
+        {
+            fail( "An exception should not have been thrown!" );
+        }
+    }
+
+    // CONTINUUM-2391
+    @SuppressWarnings( "unchecked" )
+    public void testLocalRepositoryInReleasePerform()
+        throws Exception
+    {
+        final List<LocalRepository> localRepos = createLocalRepositories();
+        final File workingDir = new File( getBasedir(), "target/test-classes/working-dir"
);
+
+        context.checking( new Expectations()
+        {
+            {
+                one( buildAgentConfigurationService ).getLocalRepositories();
+                will( returnValue( localRepos ) );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory();
+                will( returnValue( workingDir ) );
+            }
+        } );
+
+        Map repository = createRepositoryMap();
+        repository.put( ContinuumBuildAgentUtil.KEY_LOCAL_REPOSITORY_NAME, "DEFAULT" );
+
+        try
+        {
+            releaseManager.releasePerform( "1", "clean deploy", "", true, repository, "user"
);
+        }
+        catch ( ContinuumReleaseException e )
+        {
+            fail( "An exception should not have been thrown!" );
+        }
+    }
+
+    // CONTINUUM-2391
+    public void testLocalRepositoryNameMismatchedCaseInReleasePerform()
+        throws Exception
+    {
+        final List<LocalRepository> localRepos = createLocalRepositories();
+        final File workingDir = new File( getBasedir(), "target/test-classes/working-dir"
);
+
+        context.checking( new Expectations()
+        {
+            {
+                one( buildAgentConfigurationService ).getLocalRepositories();
+                will( returnValue( localRepos ) );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory();
+                will( returnValue( workingDir ) );
+            }
+        } );
+
+        try
+        {
+            releaseManager.releasePerform( "1", "clean deploy", "", true, createRepositoryMap(),
"user" );
+        }
+        catch ( ContinuumReleaseException e )
+        {
+            fail( "An exception should not have been thrown!" );
+        }
+    }
+
+    // CONTINUUM-2391
+    @SuppressWarnings( "unchecked" )
+    public void testLocalRepositoryInReleasePerformFromScm()
+        throws Exception
+    {
+        final List<LocalRepository> localRepos = createLocalRepositories();
+        final File workingDir = new File( getBasedir(), "target/test-classes/working-dir"
);
+
+        context.checking( new Expectations()
+        {
+            {
+                one( buildAgentConfigurationService ).getLocalRepositories();
+                will( returnValue( localRepos ) );
+
+                one( buildAgentConfigurationService ).getWorkingDirectory();
+                will( returnValue( workingDir ) );
+            }
+        } );
+
+        Map repository = new HashMap();
+        repository.put( ContinuumBuildAgentUtil.KEY_USERNAME, "user" );
+        repository.put( ContinuumBuildAgentUtil.KEY_LOCAL_REPOSITORY_NAME, "default" );
+
+        try
+        {
+            releaseManager.releasePerformFromScm(
+                                                  "clean deploy",
+                                                  "",
+                                                  true,
+                                                  repository,
+                                                  "scm:svn:http://svn.example.com/repos/test-project",
+                                                  "user",
+                                                  "mypasswrd",
+                                                  "scm:svn:http://svn.example.com/repos/test-project/tags/test-project-1.0",
+                                                  "scm:svn:http://svn.example.com/repos/test-project/tags",
null,
+                                                  "user" );
+        }
+        catch ( ContinuumReleaseException e )
+        {
+            fail( "An exception should not have been thrown!" );
+        }
+    }
+
+    private List<LocalRepository> createLocalRepositories()
+    {
+        List<LocalRepository> localRepos = new ArrayList<LocalRepository>();
+        LocalRepository localRepo = new LocalRepository();
+        localRepo.setName( "temp" );
+        localRepo.setLocation( "/tmp/.m2/repository" );
+        localRepo.setLayout( "default" );
+
+        localRepos.add( localRepo );
+
+        localRepo = new LocalRepository();
+        localRepo.setName( "default" );
+        localRepo.setLocation( "/home/user/.m2/repository" );
+        localRepo.setLayout( "default" );
+
+        localRepos.add( localRepo );
+
+        return localRepos;
+    }
+    
+    private Map<String, String> createEnvironmentsMap()
+    {
+        Map<String, String> environments = new HashMap<String, String>();
+        environments.put( "M2_HOME", "/tmp/bin/apache-maven-2.2.1" );
+        
+        return environments;
+    }
+
+    private Map<String, String> createDevVersionMap()
+    {
+        Map<String, String> devVersion = new HashMap<String, String>();
+        devVersion.put( "1.1-SNAPSHOT", "1.1-SNAPSHOT" );
+     
+        return devVersion;
+    }
+
+    private Map<String, String> createReleaseVersionMap()
+    {
+        Map<String, String> releaseVersion = new HashMap<String, String>();
+        releaseVersion.put( "1.0", "1.0" );
+        
+        return releaseVersion;
+    }
+
+    private Map<String, Object> createPropertiesMap()
+    {
+        Map<String, Object> properties = new HashMap<String, Object>();
+        properties.put( ContinuumBuildAgentUtil.KEY_SCM_USERNAME, "scmusername" );
+        properties.put( ContinuumBuildAgentUtil.KEY_SCM_PASSWORD, "scmpassword" );
+        properties.put( ContinuumBuildAgentUtil.KEY_SCM_TAGBASE,
+                        "scm:svn:http://svn.example.com/repos/test-project/tags" );
+        properties.put( ContinuumBuildAgentUtil.KEY_PREPARE_GOALS, "clean install" );
+        properties.put( ContinuumBuildAgentUtil.KEY_ARGUMENTS, "" );
+        properties.put( ContinuumBuildAgentUtil.KEY_SCM_TAG, "test-project-1.0" );
+        
+        return properties;
+    }
+
+    private Map<String, Object> createProjectMap()
+    {
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put( ContinuumBuildAgentUtil.KEY_LOCAL_REPOSITORY_NAME, "default" );
+        map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, 1 );
+        map.put( ContinuumBuildAgentUtil.KEY_GROUP_ID, "1" );
+        map.put( ContinuumBuildAgentUtil.KEY_ARTIFACT_ID, "test-project" );
+        map.put( ContinuumBuildAgentUtil.KEY_SCM_URL, "scm:svn:http://svn.example.com/repos/test-project/trunk"
);
+        
+        return map;
+    }
+    
+    @SuppressWarnings( "unchecked" )
+    private Map createRepositoryMap()
+    {
+        Map repository = new HashMap();
+        repository.put( ContinuumBuildAgentUtil.KEY_USERNAME, "user" );
+        repository.put( ContinuumBuildAgentUtil.KEY_LOCAL_REPOSITORY_NAME, "default" );
+        
+        return repository;
+    }
+}

Added: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java?rev=926634&view=auto
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java
(added)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumActionStub.java
Tue Mar 23 15:52:45 2010
@@ -0,0 +1,42 @@
+package org.apache.continuum.buildagent.stubs;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
+import org.codehaus.plexus.action.AbstractAction;
+
+/**
+ * This is used for testing the fix for CONTINUUM-2391. See BuildPRrojectTaskExecutorTest.java
and
+ * BuildProjectTaskExecutorTest.xml for details.
+ */
+public class ContinuumActionStub
+    extends AbstractAction
+{
+    public void execute( Map context )
+        throws Exception
+    {
+        if ( !ContinuumBuildAgentUtil.getLocalRepository( context ).equals( "/home/user/.m2/repository"
) )
+        {
+            throw new Exception( "Local repository set in the build context should not have
been a full path!" );
+        }
+    }
+}

Added: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java?rev=926634&view=auto
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java
(added)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/stubs/ContinuumReleaseManagerStub.java
Tue Mar 23 15:52:45 2010
@@ -0,0 +1,51 @@
+package org.apache.continuum.buildagent.stubs;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+import org.apache.continuum.model.repository.LocalRepository;
+import org.apache.maven.continuum.release.ContinuumReleaseException;
+import org.apache.maven.continuum.release.ContinuumReleaseManagerListener;
+import org.apache.maven.continuum.release.DefaultContinuumReleaseManager;
+
+public class ContinuumReleaseManagerStub
+    extends DefaultContinuumReleaseManager
+{
+    public void perform( String releaseId, File buildDirectory, String goals, String arguments,
+                         boolean useReleaseProfile, ContinuumReleaseManagerListener listener,
LocalRepository repository )
+        throws ContinuumReleaseException
+    {
+        if( !repository.getName().equalsIgnoreCase( "default" ) )
+        {
+            throw new ContinuumReleaseException( "Incorrect local repository name!" );
+        }
+        
+        if( !repository.getLocation().equals( "/home/user/.m2/repository" ) )
+        {
+            throw new ContinuumReleaseException( "Incorrect local repository location!" );
+        }
+        
+        if( !repository.getLayout().equals( "default" ) )
+        {
+            throw new ContinuumReleaseException( "Incorrect local repository layout!" );
+        }
+    }
+}

Added: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.xml?rev=926634&view=auto
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.xml
(added)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.xml
Tue Mar 23 15:52:45 2010
@@ -0,0 +1,52 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<plexus>
+  <components>
+    <component>
+      <role>org.apache.maven.continuum.release.ContinuumReleaseManager</role>
+      <role-hint>default</role-hint>
+      <implementation>org.apache.continuum.buildagent.stubs.ContinuumReleaseManagerStub</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.shared.release.config.ReleaseDescriptorStore</role>
+          <role-hint>continuum-release-properties</role-hint>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+          <role-hint>prepare-release</role-hint>
+          <field-name>prepareReleaseQueue</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+          <role-hint>perform-release</role-hint>
+          <field-name>performReleaseQueue</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.taskqueue.TaskQueue</role>
+          <role-hint>rollback-release</role-hint>
+          <field-name>rollbackReleaseQueue</field-name>
+        </requirement>
+        <requirement>
+          <role>org.apache.maven.scm.manager.ScmManager</role>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</plexus>
\ No newline at end of file

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml?rev=926634&r1=926633&r2=926634&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/resources/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutorTest.xml
Tue Mar 23 15:52:45 2010
@@ -22,12 +22,12 @@
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>update-project-from-agent-working-directory</role-hint>
-     <implementation>org.apache.continuum.buildagent.action.ContinuumActionStub</implementation>
+     <implementation>org.apache.continuum.buildagent.stubs.ContinuumActionStub</implementation>
     </component>
     <component>
       <role>org.codehaus.plexus.action.Action</role>
       <role-hint>execute-agent-builder</role-hint>
-      <implementation>org.apache.continuum.buildagent.action.ContinuumActionStub</implementation>
+      <implementation>org.apache.continuum.buildagent.stubs.ContinuumActionStub</implementation>
     </component>
   </components>
 </plexus>
\ No newline at end of file

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java?rev=926634&r1=926633&r2=926634&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
Tue Mar 23 15:52:45 2010
@@ -332,10 +332,8 @@ public class DefaultDistributedReleaseMa
         map.put( DistributedReleaseUtil.KEY_USERNAME, username );
 
         if ( repository != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY, repository.getLocation()
);
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_NAME, repository.getName()
);
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_LAYOUT, repository.getLayout()
);
+        {   
+            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_NAME, repository.getName()
);         
         }
 
         try
@@ -385,10 +383,8 @@ public class DefaultDistributedReleaseMa
         map.put( DistributedReleaseUtil.KEY_USERNAME, username );
 
         if ( repository != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY, repository.getLocation()
);
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_NAME, repository.getName()
);
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_LAYOUT, repository.getLayout()
);
+        {            
+            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_NAME, repository.getName()
);         
         }
 
         try
@@ -539,8 +535,8 @@ public class DefaultDistributedReleaseMa
         map.put( DistributedReleaseUtil.KEY_SCM_URL, project.getScmUrl() );
         if ( project.getProjectGroup().getLocalRepository() != null )
         {
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY,
-                     project.getProjectGroup().getLocalRepository().getLocation() );
+            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_NAME,
+                     project.getProjectGroup().getLocalRepository().getName() );
         }
 
         return map;



Mime
View raw message