continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r988510 - in /continuum/trunk: continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ continuum-buildagent/c...
Date Tue, 24 Aug 2010 12:34:45 GMT
Author: ctan
Date: Tue Aug 24 12:34:44 2010
New Revision: 988510

URL: http://svn.apache.org/viewvc?rev=988510&view=rev
Log:
fixed constants used during release to avoid confusion, make sure to use the same keys in
a distributed build and non-distributed build

Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java
    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/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
    continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-api/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentService.java
Tue Aug 24 12:34:44 2010
@@ -21,6 +21,7 @@ package org.apache.continuum.buildagent;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 public interface ContinuumBuildAgentService
 {
@@ -51,7 +52,7 @@ public interface ContinuumBuildAgentServ
     List<Map<String, String>> processProject( int projectId, String pomFilename,
boolean autoVersionSubmodules )
         throws ContinuumBuildAgentException;
 
-    String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
+    String releasePrepare( Map project, Properties properties, Map releaseVersion, Map developmentVersion,
                            Map<String, String> environments, String username )
         throws ContinuumBuildAgentException;
 

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
Tue Aug 24 12:34:44 2010
@@ -26,6 +26,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -439,11 +440,11 @@ public class ContinuumBuildAgentServiceI
                                     goals += "site-deploy";
                                 }
 
-                                releaseParameters.put( ContinuumBuildAgentUtil.KEY_GOALS,
goals );
+                                releaseParameters.put( ContinuumBuildAgentUtil.KEY_PERFORM_GOALS,
goals );
                             }
                             else
                             {
-                                releaseParameters.put( ContinuumBuildAgentUtil.KEY_GOALS,
"" );
+                                releaseParameters.put( ContinuumBuildAgentUtil.KEY_PERFORM_GOALS,
"" );
                             }
                         }
                     }
@@ -477,7 +478,7 @@ public class ContinuumBuildAgentServiceI
         return projects;
     }
 
-    public String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
+    public String releasePrepare( Map project, Properties properties, Map releaseVersion,
Map developmentVersion,
                                   Map<String, String> environments, String username
)
         throws ContinuumBuildAgentException
     {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManager.java
Tue Aug 24 12:34:44 2010
@@ -20,6 +20,7 @@ package org.apache.continuum.buildagent.
  */
 
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.maven.continuum.release.ContinuumReleaseException;
 import org.apache.maven.shared.release.ReleaseResult;
@@ -28,7 +29,7 @@ public interface BuildAgentReleaseManage
 {
     String ROLE = BuildAgentReleaseManager.class.getName();
 
-    String releasePrepare( Map<String, Object> project, Map<String, Object> properties,
+    String releasePrepare( Map<String, Object> project, Properties properties,
                            Map<String, String> releaseVersion, Map<String, String>
developmentVersion,
                            Map<String, String> environments, String username )
         throws ContinuumReleaseException;

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=988510&r1=988509&r2=988510&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 Aug 24 12:34:44 2010
@@ -65,15 +65,13 @@ public class DefaultBuildAgentReleaseMan
      */
     BuildAgentInstallationService buildAgentInstallationService;
 
-    public String releasePrepare( Map<String, Object> projectMap, Map<String, Object>
properties,
+    public String releasePrepare( Map<String, Object> projectMap, Properties releaseProperties,
                                   Map<String, String> releaseVersion, Map<String,
String> developmentVersion,
                                   Map<String, String> environments, String username
)
         throws ContinuumReleaseException
     {
         Project project = getProject( projectMap );
 
-        Properties releaseProperties = getReleaseProperties( properties );
-
         ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
         
         listener.setUsername( username );
@@ -304,72 +302,6 @@ public class DefaultBuildAgentReleaseMan
         return project;
     }
 
-    private Properties getReleaseProperties( Map<String, Object> context )
-    {
-        Properties props = new Properties();
-
-        String prop = ContinuumBuildAgentUtil.getScmUsername( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "username", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getScmPassword( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "password", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getScmTagBase( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "tagBase", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getScmCommentPrefix( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "commentPrefix", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getScmTag( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "tag", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getPrepareGoals( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "prepareGoals", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getArguments( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "arguments", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getUseEditMode( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "useEditMode", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getAddSchema( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "addSchema", prop );
-        }
-
-        prop = ContinuumBuildAgentUtil.getAutoVersionSubmodules( context );
-        if ( StringUtils.isNotBlank( prop ) )
-        {
-            props.put( "autoVersionSubmodules", prop );
-        }
-        return props;
-    }
-
     public void setBuildAgentConfigurationService( BuildAgentConfigurationService buildAgentConfigurationService
)
     {
         this.buildAgentConfigurationService = buildAgentConfigurationService;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
Tue Aug 24 12:34:44 2010
@@ -218,6 +218,8 @@ public class ContinuumBuildAgentUtil
 
     public static final String KEY_PREPARE_GOALS = "preparation-goals";
 
+    public static final String KEY_PERFORM_GOALS = "perform-goals";
+
     public static final String KEY_SCM_COMMENT_PREFIX = "scm-comment-prefix";
 
     public static final String KEY_AUTO_VERSION_SUBMODULES = "auto-version-submodules";
@@ -508,6 +510,11 @@ public class ContinuumBuildAgentUtil
         return getString( context, KEY_PREPARE_GOALS, "" );
     }
 
+    public static String getPerformGoals( Map<String, Object> context )
+    {
+        return getString( context, KEY_PERFORM_GOALS, "" );
+    }
+
     public static String getUseEditMode( Map<String, Object> context )
     {
         return getString( context, KEY_USE_EDIT_MODE, "" );

Modified: 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=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/test/java/org/apache/continuum/buildagent/manager/BuildAgentReleaseManagerTest.java
Tue Aug 24 12:34:44 2010
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.continuum.buildagent.configuration.BuildAgentConfigurationService;
 import org.apache.continuum.buildagent.model.LocalRepository;
@@ -91,7 +92,7 @@ public class BuildAgentReleaseManagerTes
 
         try
         {
-            releaseManager.releasePrepare( createProjectMap(), createPropertiesMap(), createReleaseVersionMap(),
+            releaseManager.releasePrepare( createProjectMap(), createProperties(), createReleaseVersionMap(),
                                            createDevVersionMap(), createEnvironmentsMap(),
"user" );
         }
         catch ( ContinuumReleaseException e )
@@ -122,7 +123,7 @@ public class BuildAgentReleaseManagerTes
 
         try
         {
-            releaseManager.releasePrepare( map, createPropertiesMap(), createReleaseVersionMap(),
+            releaseManager.releasePrepare( map, createProperties(), createReleaseVersionMap(),
                                            createDevVersionMap(), createEnvironmentsMap(),
"user" );
         }
         catch ( ContinuumReleaseException e )
@@ -278,9 +279,9 @@ public class BuildAgentReleaseManagerTes
         return releaseVersion;
     }
 
-    private Map<String, Object> createPropertiesMap()
+    private Properties createProperties()
     {
-        Map<String, Object> properties = new HashMap<String, Object>();
+        Properties properties = new Properties();
         properties.put( ContinuumBuildAgentUtil.KEY_SCM_USERNAME, "scmusername" );
         properties.put( ContinuumBuildAgentUtil.KEY_SCM_PASSWORD, "scmpassword" );
         properties.put( ContinuumBuildAgentUtil.KEY_SCM_TAGBASE,

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
Tue Aug 24 12:34:44 2010
@@ -38,6 +38,8 @@ public class DistributedReleaseUtil
 
     public static final String KEY_PREPARE_GOALS = "preparation-goals";
 
+    public static final String KEY_PERFORM_GOALS = "perform-goals";
+
     public static final String KEY_SCM_COMMENT_PREFIX = "scm-comment-prefix";
 
     public static final String KEY_AUTO_VERSION_SUBMODULES = "auto-version-submodules";
@@ -122,6 +124,11 @@ public class DistributedReleaseUtil
         return getString( context, KEY_PREPARE_GOALS, defaultValue );
     }
 
+    public static String getPerformGoals( Map<String, Object> context, String defaultValue
)
+    {
+        return getString( context, KEY_PERFORM_GOALS, defaultValue );
+    }
+
     public static String getScmCommentPrefix( Map<String, Object> context, String defaultValue
)
     {
         return getString( context, KEY_SCM_COMMENT_PREFIX, defaultValue );

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=988510&r1=988509&r2=988510&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 Aug 24 12:34:44 2010
@@ -177,7 +177,7 @@ public class DefaultDistributedReleaseMa
                 SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient(
new URL( buildAgentUrl ) );
     
                 String releaseId =
-                    client.releasePrepare( createProjectMap( project ), createPropertiesMap(
releaseProperties ),
+                    client.releasePrepare( createProjectMap( project ), releaseProperties,
                                            releaseVersion, developmentVersion, environments,
username );
     
                 addReleasePrepare( releaseId, buildAgentUrl, releaseVersion.get( releaseId
), "prepare" );
@@ -657,73 +657,6 @@ public class DefaultDistributedReleaseMa
         return map;
     }
 
-    private Map<String, String> createPropertiesMap( Properties properties )
-    {
-        Map<String, String> map = new HashMap<String, String>();
-
-        String prop = properties.getProperty( "username" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_SCM_USERNAME, prop );
-        }
-
-        prop = properties.getProperty( "password" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_SCM_PASSWORD, prop );
-        }
-
-        prop = properties.getProperty( "tagBase" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_SCM_TAGBASE, prop );
-        }
-
-        prop = properties.getProperty( "commentPrefix" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_SCM_COMMENT_PREFIX, prop );
-        }
-
-        prop = properties.getProperty( "tag" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_SCM_TAG, prop );
-        }
-
-        prop = properties.getProperty( "prepareGoals" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_PREPARE_GOALS, prop );
-        }
-
-        prop = properties.getProperty( "arguments" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_ARGUMENTS, prop );
-        }
-
-        prop = properties.getProperty( "useEditMode" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_USE_EDIT_MODE, prop );
-        }
-
-        prop = properties.getProperty( "addSchema" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_ADD_SCHEMA, prop );
-        }
-
-        prop = properties.getProperty( "autoVersionSubmodules" );
-        if ( prop != null )
-        {
-            map.put( DistributedReleaseUtil.KEY_AUTO_VERSION_SUBMODULES, prop );
-        }
-
-        return map;
-    }
-
     private List<PreparedRelease> getPreparedReleases()
         throws ContinuumReleaseException
     {

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java
(original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/continuum/builder/distributed/stubs/SlaveBuildAgentTransportClientStub.java
Tue Aug 24 12:34:44 2010
@@ -21,6 +21,7 @@ package org.apache.continuum.builder.dis
 
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportService;
 
@@ -195,7 +196,7 @@ public class SlaveBuildAgentTransportCli
         return null;
     }
 
-    public String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
+    public String releasePrepare( Map project, Properties properties, Map releaseVersion,
Map developmentVersion,
                                   Map environments, String username )
         throws Exception
     {

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
(original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-api/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportService.java
Tue Aug 24 12:34:44 2010
@@ -23,6 +23,7 @@ import com.atlassian.xmlrpc.ServiceObjec
 
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 /**
  * SlaveBuildAgentTransportService
@@ -60,7 +61,7 @@ public interface SlaveBuildAgentTranspor
     public List<Map<String, String>> processProject( int projectId, String pomFilename,
boolean autoVersionSubmodules )
         throws Exception;
 
-    public String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
+    public String releasePrepare( Map project, Properties properties, Map releaseVersion,
Map developmentVersion,
                                   Map environments, String username )
         throws Exception;
 

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
(original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
Tue Aug 24 12:34:44 2010
@@ -27,6 +27,7 @@ import com.atlassian.xmlrpc.DefaultBinde
 import java.net.URL;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -258,7 +259,7 @@ public class SlaveBuildAgentTransportCli
         return result;
     }
 
-    public String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
+    public String releasePrepare( Map project, Properties properties, Map releaseVersion,
Map developmentVersion,
                                   Map environments, String username )
         throws Exception
     {

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
(original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
Tue Aug 24 12:34:44 2010
@@ -21,6 +21,7 @@ package org.apache.continuum.distributed
 
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.apache.continuum.buildagent.ContinuumBuildAgentException;
 import org.apache.continuum.buildagent.ContinuumBuildAgentService;
@@ -197,7 +198,7 @@ public class SlaveBuildAgentTransportSer
         }
     }
 
-    public String releasePrepare( Map project, Map properties, Map releaseVersion, Map developmentVersion,
+    public String releasePrepare( Map project, Properties properties, Map releaseVersion,
Map developmentVersion,
                                   Map environments, String username )
         throws Exception
     {

Modified: continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
(original)
+++ continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java
Tue Aug 24 12:34:44 2010
@@ -124,7 +124,7 @@ public class DefaultContinuumReleaseMana
         if ( listener == null )
         {
             listener = new DefaultReleaseManagerListener();
-            listener.setUsername( releaseProperties.getProperty( "releaseBy" ) );
+            listener.setUsername( releaseProperties.getProperty( "release-by" ) );
         }
 
         getListeners().put( releaseId, listener );
@@ -266,17 +266,17 @@ public class DefaultContinuumReleaseMana
         descriptor.setScmSourceUrl( project.getScmUrl() );
 
         //required properties
-        descriptor.setScmReleaseLabel( releaseProperties.getProperty( "tag" ) );
-        descriptor.setScmTagBase( releaseProperties.getProperty( "tagBase" ) );
+        descriptor.setScmReleaseLabel( releaseProperties.getProperty( "scm-tag" ) );
+        descriptor.setScmTagBase( releaseProperties.getProperty( "scm-tagbase" ) );
         descriptor.setReleaseVersions( relVersions );
         descriptor.setDevelopmentVersions( devVersions );
-        descriptor.setPreparationGoals( releaseProperties.getProperty( "prepareGoals" ) );
+        descriptor.setPreparationGoals( releaseProperties.getProperty( "preparation-goals"
) );
         descriptor.setAdditionalArguments( releaseProperties.getProperty( "arguments" ) );
-        descriptor.setAddSchema( Boolean.valueOf( releaseProperties.getProperty( "addSchema"
) ) );
+        descriptor.setAddSchema( Boolean.valueOf( releaseProperties.getProperty( "add-schema"
) ) );
         descriptor.setAutoVersionSubmodules(
-            Boolean.valueOf( releaseProperties.getProperty( "autoVersionSubmodules" ) ) );
+            Boolean.valueOf( releaseProperties.getProperty( "auto-version-submodules" ) )
);
 
-        String useEditMode = releaseProperties.getProperty( "useEditMode" );
+        String useEditMode = releaseProperties.getProperty( "use-edit-mode" );
         if ( BooleanUtils.toBoolean( useEditMode ) )
         {
             descriptor.setScmUseEditMode( Boolean.valueOf( useEditMode ) );
@@ -300,21 +300,21 @@ public class DefaultContinuumReleaseMana
         }
 
         //other properties
-        if ( releaseProperties.containsKey( "username" ) )
+        if ( releaseProperties.containsKey( "scm-username" ) )
         {
-            descriptor.setScmUsername( releaseProperties.getProperty( "username" ) );
+            descriptor.setScmUsername( releaseProperties.getProperty( "scm-username" ) );
         }
-        if ( releaseProperties.containsKey( "password" ) )
+        if ( releaseProperties.containsKey( "scm-password" ) )
         {
-            descriptor.setScmPassword( releaseProperties.getProperty( "password" ) );
+            descriptor.setScmPassword( releaseProperties.getProperty( "scm-password" ) );
         }
-        if ( releaseProperties.containsKey( "commentPrefix" ) )
+        if ( releaseProperties.containsKey( "scm-comment-prefix" ) )
         {
-            descriptor.setScmCommentPrefix( releaseProperties.getProperty( "commentPrefix"
) );
+            descriptor.setScmCommentPrefix( releaseProperties.getProperty( "scm-comment-prefix"
) );
         }
-        if ( releaseProperties.containsKey( "useReleaseProfile" ) )
+        if ( releaseProperties.containsKey( "use-release-profile" ) )
         {
-            descriptor.setUseReleaseProfile( Boolean.valueOf( releaseProperties.getProperty(
"useReleaseProfile" ) ) );
+            descriptor.setUseReleaseProfile( Boolean.valueOf( releaseProperties.getProperty(
"use-release-profile" ) ) );
         }
 
         //forced properties
@@ -325,7 +325,7 @@ public class DefaultContinuumReleaseMana
         descriptor.setExecutable( executable );
 
         //release by
-        descriptor.setReleaseBy( releaseProperties.getProperty( "releaseBy" ) );
+        descriptor.setReleaseBy( releaseProperties.getProperty( "release-by" ) );
 
         return descriptor;
     }
@@ -467,6 +467,25 @@ public class DefaultContinuumReleaseMana
                         {
                             params.put( "add-schema", Boolean.valueOf( configuration.getValue()
) );
                         }
+
+                        configuration = dom.getChild( "useReleaseProfile" );
+                        if ( configuration != null )
+                        {
+                            params.put( "use-release-profile", Boolean.valueOf( configuration.getValue()
) );
+                        }
+
+                        configuration = dom.getChild( "goals" );
+                        if ( configuration != null )
+                        {
+                            String goals = configuration.getValue();
+                            if ( model.getDistributionManagement() != null &&
+                                model.getDistributionManagement().getSite() != null )
+                            {
+                                goals += " site-deploy";
+                            }
+
+                            params.put( "perform-goals", goals );
+                        }
                     }
                 }
             }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
Tue Aug 24 12:34:44 2010
@@ -175,47 +175,21 @@ public class ReleasePerformAction
     private void getReleasePluginParameters( String workingDirectory, String pomFilename
)
         throws Exception
     {
-        //TODO: Use the model reader so we'll can get the plugin configuration from parent
too
-        MavenXpp3Reader pomReader = new MavenXpp3Reader();
-        Model model = pomReader.read( ReaderFactory.newXmlReader( new File( workingDirectory,
pomFilename ) ) );
+        Map<String, Object> params = getContinuum().getReleaseManager().getReleasePluginParameters(
workingDirectory, pomFilename );
 
-        if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
+        if ( params.get( "use-release-profile" ) != null )
         {
-            for ( Plugin plugin : (List<Plugin>) model.getBuild().getPlugins() )
-            {
-                if ( plugin.getGroupId() != null && plugin.getGroupId().equals( "org.apache.maven.plugins"
) &&
-                    plugin.getArtifactId() != null && plugin.getArtifactId().equals(
"maven-release-plugin" ) )
-                {
-                    Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();
-
-                    if ( dom != null )
-                    {
-                        Xpp3Dom configuration = dom.getChild( "useReleaseProfile" );
-                        if ( configuration != null )
-                        {
-                            useReleaseProfile = Boolean.valueOf( configuration.getValue()
);
-                        }
-
-                        configuration = dom.getChild( "goals" );
-                        if ( configuration != null )
-                        {
-                            goals = configuration.getValue();
-                            if ( model.getDistributionManagement() != null &&
-                                model.getDistributionManagement().getSite() != null )
-                            {
-                                goals += " site-deploy";
-                            }
-                        }
-
-                        configuration = dom.getChild( "arguments" );
-                        if ( configuration != null )
-                        {
-                            arguments = configuration.getValue();
-                        }
+            useReleaseProfile = (Boolean) params.get( "use-release-profile" );
+        }
 
-                    }
-                }
-            }
+        if ( params.get( "perform-goals" ) != null )
+        {
+            goals = (String) params.get( "perform-goals" );
+        }
+
+        if ( params.get( "arguments" ) != null )
+        {
+            arguments = (String) params.get( "arguments" );
         }
     }
 
@@ -367,7 +341,7 @@ public class ReleasePerformAction
     {
         useReleaseProfile = DistributedReleaseUtil.getUseReleaseProfile( context, useReleaseProfile
);
 
-        goals = DistributedReleaseUtil.getGoals( context, goals );
+        goals = DistributedReleaseUtil.getPerformGoals( context, goals );
 
         arguments = DistributedReleaseUtil.getArguments( context, "" );
     }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
Tue Aug 24 12:34:44 2010
@@ -553,30 +553,30 @@ public class ReleasePrepareAction
 
         if ( StringUtils.isNotEmpty( scmUsername ) )
         {
-            p.setProperty( "username", scmUsername );
+            p.setProperty( "scm-username", scmUsername );
         }
 
         if ( StringUtils.isNotEmpty( scmPassword ) )
         {
-            p.setProperty( "password", scmPassword );
+            p.setProperty( "scm-password", scmPassword );
         }
 
         if ( StringUtils.isNotEmpty( scmTagBase ) )
         {
-            p.setProperty( "tagBase", scmTagBase );
+            p.setProperty( "scm-tagbase", scmTagBase );
         }
 
         if ( StringUtils.isNotEmpty( scmCommentPrefix ) )
         {
-            p.setProperty( "commentPrefix", scmCommentPrefix );
+            p.setProperty( "scm-comment-prefix", scmCommentPrefix );
         }
 
-        p.setProperty( "tag", scmTag );
-        p.setProperty( "prepareGoals", prepareGoals );
+        p.setProperty( "scm-tag", scmTag );
+        p.setProperty( "preparation-goals", prepareGoals );
         p.setProperty( "arguments", arguments );
-        p.setProperty( "useEditMode", Boolean.toString( scmUseEditMode ) );
-        p.setProperty( "addSchema", Boolean.toString( addSchema ) );
-        p.setProperty( "autoVersionSubmodules", Boolean.toString( autoVersionSubmodules )
);
+        p.setProperty( "use-edit-mode", Boolean.toString( scmUseEditMode ) );
+        p.setProperty( "add-schema", Boolean.toString( addSchema ) );
+        p.setProperty( "auto-version-submodules", Boolean.toString( autoVersionSubmodules
) );
 
         return p;
     }

Modified: continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java?rev=988510&r1=988509&r2=988510&view=diff
==============================================================================
--- continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
(original)
+++ continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
Tue Aug 24 12:34:44 2010
@@ -2793,7 +2793,7 @@ public class ContinuumServiceImpl
                     }
                 }
 
-                releaseProperties.setProperty( "releaseBy", username );
+                releaseProperties.setProperty( "release-by", username );
                 return continuum.getReleaseManager().prepare( project, releaseProperties,
releaseVersions, developmentVersions, null, 
                                                               continuum.getWorkingDirectory(
projectId ).getPath(), environments, executable );
             }



Mime
View raw message