maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r540603 - in /maven/release/trunk: maven-release-manager/ maven-release-plugin/ maven-release-plugin/src/main/java/org/apache/maven/plugins/release/
Date Tue, 22 May 2007 14:49:36 GMT
Author: evenisse
Date: Tue May 22 07:49:35 2007
New Revision: 540603

URL: http://svn.apache.org/viewvc?view=rev&rev=540603
Log:
Allow to configure the provider implementation to use in the plugin conf.

Modified:
    maven/release/trunk/maven-release-manager/pom.xml
    maven/release/trunk/maven-release-plugin/pom.xml
    maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
    maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java
    maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/CleanReleaseMojo.java
    maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java
    maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
    maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/RollbackReleaseMojo.java

Modified: maven/release/trunk/maven-release-manager/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/pom.xml?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-manager/pom.xml (original)
+++ maven/release/trunk/maven-release-manager/pom.xml Tue May 22 07:49:35 2007
@@ -78,57 +78,57 @@
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-api</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-manager-plexus</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-bazaar</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-clearcase</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-cvsexe</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-cvsjava</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-hg</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-perforce</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-starteam</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-svnexe</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-synergy</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>jdom</groupId>
@@ -168,7 +168,7 @@
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-test</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: maven/release/trunk/maven-release-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/pom.xml?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-plugin/pom.xml (original)
+++ maven/release/trunk/maven-release-plugin/pom.xml Tue May 22 07:49:35 2007
@@ -67,7 +67,7 @@
     <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-test</artifactId>
-      <version>1.0-rc1</version>
+      <version>1.0-SNAPSHOT</version>
       <scope>test</scope>
     </dependency>
     <dependency>

Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
(original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/AbstractReleaseMojo.java
Tue May 22 07:49:35 2007
@@ -21,7 +21,10 @@
 
 import org.apache.maven.model.Profile;
 import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.scm.manager.ScmManager;
 import org.apache.maven.settings.Settings;
 import org.apache.maven.shared.release.ReleaseManager;
 import org.apache.maven.shared.release.config.ReleaseDescriptor;
@@ -30,6 +33,7 @@
 import java.io.File;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Base class with shared configuration.
@@ -122,6 +126,36 @@
      * @readonly
      */
     protected List reactorProjects;
+
+    /**
+     * List of provider implementations.
+     *
+     * @parameter
+     */
+    private Map providerImplementations;
+
+    /**
+     * The SCM manager.
+     *
+     * @component
+     */
+    private ScmManager scmManager;
+
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        if ( providerImplementations != null )
+        {
+            for ( Iterator i = providerImplementations.keySet().iterator(); i.hasNext();
)
+            {
+                String providerType = (String) i.next();
+                String providerImplementation = (String) providerImplementations.get( providerType
);
+                getLog().info( "Change the default '" + providerType + "' provider implementation
to '" +
+                    providerImplementation + "'." );
+                scmManager.setScmProviderImplementation( providerType, providerImplementation
);
+            }
+        }
+    }
 
     protected ReleaseDescriptor createReleaseDescriptor()
     {

Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java
(original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/BranchReleaseMojo.java
Tue May 22 07:49:35 2007
@@ -107,6 +107,8 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        super.execute();
+
         if ( StringUtils.isEmpty( branchName ) )
         {
             throw new MojoExecutionException( "The branch name is required." );

Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/CleanReleaseMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/CleanReleaseMojo.java?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/CleanReleaseMojo.java
(original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/CleanReleaseMojo.java
Tue May 22 07:49:35 2007
@@ -37,6 +37,8 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        super.execute();
+
         ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
         releaseDescriptor.setWorkingDirectory( basedir.getAbsolutePath() );
         releaseManager.clean( releaseDescriptor, null, reactorProjects );

Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java
(original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PerformReleaseMojo.java
Tue May 22 07:49:35 2007
@@ -73,6 +73,8 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        super.execute();
+
         try
         {
             // Note that the working directory here is not the same as in the release configuration,
so don't reuse that

Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
(original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/PrepareReleaseMojo.java
Tue May 22 07:49:35 2007
@@ -112,6 +112,8 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        super.execute();
+
         ReleaseDescriptor config = createReleaseDescriptor();
         config.setAddSchema( addSchema );
         config.setGenerateReleasePoms( generateReleasePoms );

Modified: maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/RollbackReleaseMojo.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/RollbackReleaseMojo.java?view=diff&rev=540603&r1=540602&r2=540603
==============================================================================
--- maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/RollbackReleaseMojo.java
(original)
+++ maven/release/trunk/maven-release-plugin/src/main/java/org/apache/maven/plugins/release/RollbackReleaseMojo.java
Tue May 22 07:49:35 2007
@@ -40,6 +40,8 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
+        super.execute();
+
         ReleaseDescriptor config = createReleaseDescriptor();
 
         try



Mime
View raw message