continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r699173 - /continuum/branches/continuum-1.2.x/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
Date Fri, 26 Sep 2008 04:30:22 GMT
Author: evenisse
Date: Thu Sep 25 21:30:21 2008
New Revision: 699173

URL: http://svn.apache.org/viewvc?rev=699173&view=rev
Log:
[CONTINUUM-1874] Fix add-maven-too-project plugin by adding a pomFilename at the end of the
url

Modified:
    continuum/branches/continuum-1.2.x/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java

Modified: continuum/branches/continuum-1.2.x/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java?rev=699173&r1=699172&r2=699173&view=diff
==============================================================================
--- continuum/branches/continuum-1.2.x/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
(original)
+++ continuum/branches/continuum-1.2.x/maven-continuum-plugin/src/main/java/org/apache/maven/continuum/plugin/AddMavenTwoProject.java
Thu Sep 25 21:30:21 2008
@@ -34,6 +34,14 @@
     extends AbstractContinuumMojo
 {
     /**
+     * POM file name.
+     *
+     * @parameter expression="${pomFilename}" default-value="pom.xml"
+     * @required
+     */
+    private String pomFilename;
+
+    /**
      * POM Url.
      *
      * @parameter expression="${projectUrl}" default-value="${project.scm.url}"
@@ -54,7 +62,16 @@
         AddingResult addingResult = null;
         try
         {
+            if ( !projectUrl.endsWith( pomFilename ) )
+            {
+                if ( !projectUrl.endsWith( "/" ) )
+                {
+                    projectUrl += "/";
+                }
+                projectUrl += pomFilename;
+            }
 
+            getLog().info( "Adding M2 project from " + projectUrl );
             if ( projectGroupId != null && projectGroupId.length() > 0 )
             {
                 addingResult = getClient().addMavenTwoProject( projectUrl, Integer.parseInt(
projectGroupId ) );
@@ -68,6 +85,8 @@
                 getLog().error( "fail to add mavenTwo project " + addingResult.getErrorsAsString()
);
                 throw new MojoExecutionException( "fail to add mavenTwo project " + addingResult.getErrorsAsString()
);
             }
+            //TODO: print projects/project groups added
+            //addingResult.getProjects();
         }
         catch ( MojoExecutionException e )
         {



Mime
View raw message