maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r398777 - in /maven/plugins/trunk/maven-release-plugin/src/main: java/org/apache/maven/plugins/release/phase/ resources/META-INF/plexus/
Date Tue, 02 May 2006 02:13:17 GMT
Author: brett
Date: Mon May  1 19:13:13 2006
New Revision: 398777

URL: http://svn.apache.org/viewcvs?rev=398777&view=rev
Log:
[MRELEASE-98] config suffix instead

Modified:
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
    maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java?rev=398777&r1=398776&r2=398777&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/AbstractRewritePomsPhase.java
Mon May  1 19:13:13 2006
@@ -59,7 +59,7 @@
 import java.util.Map;
 
 /**
- * XXX: this base class could instead be a single instance, and the variations described
through composition instead
+ * Base class for rewriting phases.
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  */
@@ -77,6 +77,11 @@
      */
     private static final String LS = System.getProperty( "line.separator" );
 
+    /**
+     * Configuration item for the suffix to add to rewritten POMs when simulating.
+     */
+    private String pomSuffix;
+
     public void execute( ReleaseConfiguration releaseConfiguration )
         throws ReleaseExecutionException
     {
@@ -156,7 +161,7 @@
         if ( simulate )
         {
             File outputFile =
-                new File( project.getFile().getParentFile(), project.getFile().getName()
+ "." + getPomSuffix() );
+                new File( project.getFile().getParentFile(), project.getFile().getName()
+ "." + pomSuffix );
             writePom( outputFile, document, releaseConfiguration, project.getModelVersion(),
intro, outtro );
         }
         else
@@ -165,8 +170,6 @@
                       scmRepository, provider );
         }
     }
-
-    protected abstract String getPomSuffix();
 
     private void transformDocument( MavenProject project, Element rootElement,
                                     ReleaseConfiguration releaseConfiguration, ScmRepository
scmRepository )

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhase.java?rev=398777&r1=398776&r2=398777&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForDevelopmentPhase.java
Mon May  1 19:13:13 2006
@@ -34,11 +34,6 @@
 public class RewritePomsForDevelopmentPhase
     extends AbstractRewritePomsPhase
 {
-    protected String getPomSuffix()
-    {
-        return "next";
-    }
-
     protected void transformScm( MavenProject project, Element rootElement, Namespace namespace,
                                  ReleaseConfiguration releaseConfiguration, String projectId,
                                  ScmRepository scmRepository )

Modified: maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java?rev=398777&r1=398776&r2=398777&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/phase/RewritePomsForReleasePhase.java
Mon May  1 19:13:13 2006
@@ -39,11 +39,6 @@
      */
     private Map scmTranslators;
 
-    protected String getPomSuffix()
-    {
-        return "tag";
-    }
-
     protected void transformScm( MavenProject project, Element rootElement, Namespace namespace,
                                  ReleaseConfiguration releaseConfiguration, String projectId,
                                  ScmRepository scmRepository )

Modified: maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml?rev=398777&r1=398776&r2=398777&view=diff
==============================================================================
--- maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/plugins/trunk/maven-release-plugin/src/main/resources/META-INF/plexus/components.xml
Mon May  1 19:13:13 2006
@@ -111,6 +111,9 @@
       <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>
       <role-hint>rewrite-poms-for-release</role-hint>
       <implementation>org.apache.maven.plugins.release.phase.RewritePomsForReleasePhase</implementation>
+      <configuration>
+        <pomSuffix>tag</pomSuffix>
+      </configuration>
       <requirements>
         <requirement>
           <role>org.apache.maven.plugins.release.scm.ScmRepositoryConfigurator</role>
@@ -155,6 +158,9 @@
       <role>org.apache.maven.plugins.release.phase.ReleasePhase</role>
       <role-hint>rewrite-poms-for-development</role-hint>
       <implementation>org.apache.maven.plugins.release.phase.RewritePomsForDevelopmentPhase</implementation>
+      <configuration>
+        <pomSuffix>next</pomSuffix>
+      </configuration>
       <requirements>
         <requirement>
           <role>org.apache.maven.plugins.release.scm.ScmRepositoryConfigurator</role>



Mime
View raw message