maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r351635 - in /maven/plugins/trunk/maven-release-plugin: pom.xml src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java src/main/java/org/apache/maven/plugins/release/helpers/ScmHelper.java
Date Fri, 02 Dec 2005 08:25:44 GMT
Author: evenisse
Date: Fri Dec  2 00:25:38 2005
New Revision: 351635

URL: http://svn.apache.org/viewcvs?rev=351635&view=rev
Log:
PR: SCM-88

Submitted by Mike Perham

o Add Perforce support
o Add transparent support for locking providers

Modified:
    maven/plugins/trunk/maven-release-plugin/pom.xml
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/helpers/ScmHelper.java

Modified: maven/plugins/trunk/maven-release-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/pom.xml?rev=351635&r1=351634&r2=351635&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-release-plugin/pom.xml Fri Dec  2 00:25:38 2005
@@ -79,6 +79,11 @@
       <artifactId>maven-scm-provider-clearcase</artifactId>
       <version>1.0-beta-2-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-perforce</artifactId>
+      <version>1.0-beta-2-SNAPSHOT</version>
+    </dependency>
     
   </dependencies>
 </project>

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java?rev=351635&r1=351634&r2=351635&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
Fri Dec  2 00:25:38 2005
@@ -1470,16 +1470,16 @@
 
         ScmHelper scm = getScm( basedir.getAbsolutePath() );
 
-        if ( useEditMode )
+        try
         {
-            try
+            if ( useEditMode || scm.requiresEditMode() )
             {
                 scm.edit( pomFile );
             }
-            catch ( ScmException e )
-            {
-                throw new MojoExecutionException( "An error is occurred in the edit process.",
e );
-            }
+        }
+        catch ( ScmException e )
+        {
+            throw new MojoExecutionException( "An error occurred in the edit process.", e
);
         }
         
         Writer writer = null;

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/helpers/ScmHelper.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/helpers/ScmHelper.java?rev=351635&r1=351634&r2=351635&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/helpers/ScmHelper.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/helpers/ScmHelper.java
Fri Dec  2 00:25:38 2005
@@ -344,4 +344,11 @@
     {
         this.password = password;
     }
+
+    public boolean requiresEditMode() 
+        throws ScmException
+    {
+        ScmRepository repository = getScmRepository();
+        return getScmManager().getProviderByRepository( repository ).requiresEditMode();
+    }
 }



Mime
View raw message