continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r740906 - in /continuum/trunk: continuum-release/src/main/java/org/apache/maven/continuum/release/DefaultContinuumReleaseManager.java continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
Date Wed, 04 Feb 2009 21:54:34 GMT
Author: evenisse
Date: Wed Feb  4 21:54:34 2009
New Revision: 740906

URL: http://svn.apache.org/viewvc?rev=740906&view=rev
Log:
[CONTINUUM-2028] Load scmCommentPrefix from the POM

Modified:
    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/ReleasePrepareAction.java

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=740906&r1=740905&r2=740906&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
Wed Feb  4 21:54:34 2009
@@ -84,7 +84,7 @@
      * @plexus.requirement
      */
     private InstallationService installationService;
-    
+
     private Map listeners;
 
     /**
@@ -114,7 +114,8 @@
     {
         String releaseId = project.getGroupId() + ":" + project.getArtifactId();
 
-        ReleaseDescriptor descriptor = getReleaseDescriptor( project, releaseProperties,
relVersions, devVersions, profile );
+        ReleaseDescriptor descriptor =
+            getReleaseDescriptor( project, releaseProperties, relVersions, devVersions, profile
);
 
         getListeners().put( releaseId, listener );
 
@@ -138,7 +139,7 @@
     {
         perform( releaseId, buildDirectory, goals, useReleaseProfile, listener, null );
     }
-    
+
     public void perform( String releaseId, File buildDirectory, String goals, boolean useReleaseProfile,
                          ContinuumReleaseManagerListener listener, LocalRepository repository
)
         throws ContinuumReleaseException
@@ -160,7 +161,8 @@
     }
 
     private void perform( String releaseId, ReleaseDescriptor descriptor, File buildDirectory,
String goals,
-                          boolean useReleaseProfile, ContinuumReleaseManagerListener listener,
LocalRepository repository )
+                          boolean useReleaseProfile, ContinuumReleaseManagerListener listener,
+                          LocalRepository repository )
         throws ContinuumReleaseException
     {
         try
@@ -169,8 +171,7 @@
 
             performReleaseQueue.put( new PerformReleaseProjectTask( releaseId, descriptor,
buildDirectory, goals,
                                                                     useReleaseProfile,
-                                                                    (ReleaseManagerListener)
listener,
-                                                                    repository ) );
+                                                                    (ReleaseManagerListener)
listener, repository ) );
         }
         catch ( TaskQueueException e )
         {
@@ -258,7 +259,7 @@
                                                     Map devVersions, Profile profile )
     {
         ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
-        String workingDirectory = workingDirectoryService.getWorkingDirectory( project ).getPath();

+        String workingDirectory = workingDirectoryService.getWorkingDirectory( project ).getPath();
 
         //release properties from the project
         descriptor.setWorkingDirectory( workingDirectory );
@@ -270,20 +271,20 @@
         descriptor.setReleaseVersions( relVersions );
         descriptor.setDevelopmentVersions( devVersions );
         descriptor.setPreparationGoals( releaseProperties.getProperty( "prepareGoals" ) );
-        
+
         String useEditMode = releaseProperties.getProperty( "useEditMode" );
         if ( BooleanUtils.toBoolean( useEditMode ) )
         {
             descriptor.setScmUseEditMode( Boolean.valueOf( useEditMode ) );
-        } 
-        
+        }
+
         LocalRepository repository = project.getProjectGroup().getLocalRepository();
-        
+
         if ( repository != null )
         {
             descriptor.setAdditionalArguments( "\"-Dmaven.repo.local=" + repository.getLocation()
+ "\"" );
         }
-        
+
         //other properties
         if ( releaseProperties.containsKey( "username" ) )
         {
@@ -300,10 +301,10 @@
 
         //forced properties
         descriptor.setInteractive( false );
-        
+
         //set environments
         descriptor.setEnvironments( getEnvironments( profile ) );
-        
+
         return descriptor;
     }
 

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=740906&r1=740905&r2=740906&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
Wed Feb  4 21:54:34 2009
@@ -54,7 +54,7 @@
     extends ContinuumActionSupport
 {
     private static final String SCM_SVN_PROTOCOL_PREFIX = "scm:svn";
-    
+
     private static final String SNAPSHOT_VERSION_SUFFIX = "-SNAPSHOT";
 
     private int projectId;
@@ -74,7 +74,7 @@
     private String scmCommentPrefix;
 
     private boolean scmUseEditMode = false;
-    
+
     private List projects = new ArrayList();
 
     private List projectKeys;
@@ -111,12 +111,12 @@
         scmUsername = project.getScmUsername();
         scmPassword = project.getScmPassword();
         scmTag = project.getScmTag();
-        
+
         if ( scmTag == null )
         {
             String version = project.getVersion();
             int idx = version.indexOf( SNAPSHOT_VERSION_SUFFIX );
-            
+
             if ( idx >= 0 )
             {
                 // strip the snapshot version suffix
@@ -127,7 +127,7 @@
                 scmTag = project.getArtifactId() + "-" + version;
             }
         }
-        
+
         String workingDirectory = getContinuum().getWorkingDirectory( project.getId() ).getPath();
 
         String scmUrl = project.getScmUrl();
@@ -195,6 +195,12 @@
                         {
                             prepareGoals = configuration.getValue();
                         }
+
+                        configuration = dom.getChild( "scmCommentPrefix" );
+                        if ( configuration != null )
+                        {
+                            scmCommentPrefix = configuration.getValue();
+                        }
                     }
                 }
             }
@@ -222,9 +228,9 @@
         {
             name = project.getArtifactId();
         }
-        
+
         Profile profile = null;
-        
+
         if ( profileId != -1 )
         {
             profile = getContinuum().getProfileService().getProfile( profileId );
@@ -232,8 +238,8 @@
 
         ContinuumReleaseManager releaseManager = getContinuum().getReleaseManager();
 
-        releaseId =
-            releaseManager.prepare( project, getReleaseProperties(), getRelVersionMap(),
getDevVersionMap(), listener, profile );
+        releaseId = releaseManager.prepare( project, getReleaseProperties(), getRelVersionMap(),
getDevVersionMap(),
+                                            listener, profile );
 
         return SUCCESS;
     }
@@ -385,7 +391,7 @@
             p.setProperty( "tagBase", scmTagBase );
         }
 
-        if ( StringUtils.isNotEmpty( scmCommentPrefix ))
+        if ( StringUtils.isNotEmpty( scmCommentPrefix ) )
         {
             p.setProperty( "commentPrefix", scmCommentPrefix );
         }
@@ -572,20 +578,20 @@
         this.profileId = profileId;
     }
 
-	public boolean isScmUseEditMode() 
-	{
-		return scmUseEditMode;
-	}
-
-	public void setScmUseEditMode(boolean scmUseEditMode) 
-	{
-		this.scmUseEditMode = scmUseEditMode;
-	}
+    public boolean isScmUseEditMode()
+    {
+        return scmUseEditMode;
+    }
+
+    public void setScmUseEditMode( boolean scmUseEditMode )
+    {
+        this.scmUseEditMode = scmUseEditMode;
+    }
 
     public void setScmCommentPrefix( String scmCommentPrefix )
     {
         this.scmCommentPrefix = scmCommentPrefix;
     }
-    
-    
+
+
 }



Mime
View raw message