Continuum
  1. Continuum
  2. CONTINUUM-1874

continuum:add-maven-two-project doesn't work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2.1
    • Component/s: Maven Plugin
    • Labels:
      None
    • Environment:
      JDK1.5, Maven 2.0.9, Continuum 1.2

      Description

      When doing a:

      $ mvn org.apache.continuum:continuum-maven-plugin:1.2:add-maven-two-project -Durl=http://localhost:9090/xmlrpc -Dusername=admin -Dpassword=******
      

      I get something like this:

      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building quickstart
      [INFO]    task-segment: [org.apache.continuum:continuum-maven-plugin:1.2:add-maven-two-project]
      [INFO] ------------------------------------------------------------------------
      [INFO] [continuum:add-maven-two-project]
      [ERROR] fail to add mavenTwo project add.project.project.building.error
      
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] fail to add mavenTwo project add.project.project.building.error
      
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5 seconds
      [INFO] Finished at: Tue Sep 09 20:55:57 PHT 2008
      [INFO] Final Memory: 10M/83M
      [INFO] ------------------------------------------------------------------------
      $
      

      In AddMavenTwoProject.java, it defines the pom url as only the containing directory of the pom.xml:

      /**
        * POM Url.
        *
        * @parameter expression="${projectUrl}" default-value="${project.scm.url}"
        * @required
        */
      private String projectUrl;
      

      I tried appending a /pom.xml in the default-value, and I was able to add the project then.

      /**
        * POM Url.
        *
        * @parameter expression="${projectUrl}" default-value="${project.scm.url}/pom.xml"
        * @required
        */
      private String projectUrl;
      
      $ mvn org.apache.continuum:continuum-maven-plugin:1.2:add-maven-two-project -Durl=http://localhost:9090/xmlrpc -Dusername=admin -Dpassword=******
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building quickstart
      [INFO]    task-segment: [org.apache.continuum:continuum-maven-plugin:1.2:add-maven-two-project]
      [INFO] ------------------------------------------------------------------------
      [INFO] [continuum:add-maven-two-project]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 8 seconds
      [INFO] Finished at: Tue Sep 09 21:31:43 PHT 2008
      [INFO] Final Memory: 10M/82M
      [INFO] ------------------------------------------------------------------------
      $
      

      At first, I thought it fixed the problem. But when I tried adding a multi-module project, e.g.:

      multimodule-parent/pom.xml
        | 
        +--submodule-one/pom.xml
        | 
        +--submodule-two/pom.xml
        | 
        +--submodule-three/pom.xml
      

      Continuum added the project defined by multimodule-parent/pom.xml four times.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        16d 14h 23m 1 Emmanuel Venisse 26/Sep/08 00:32
        Mark Thomas made changes -
        Workflow jira [ 12947690 ] Default workflow, editable Closed status [ 12985713 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:12:18 UTC 2015 [ 1428268338676 ]
        Mark Thomas made changes -
        Workflow jira [ 12710527 ] Default workflow, editable Closed status [ 12740202 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:36:01 UTC 2015 [ 1428222961749 ]
        Emmanuel Venisse made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Assignee Emmanuel Venisse [ evenisse ]
        Hide
        Emmanuel Venisse added a comment -

        Fixed.
        Committed in r.699173

        I fixed the plugin so you'll can run it like you already do it and I add a pomFilename parameter that is defaulted to 'pom.xml'

        Show
        Emmanuel Venisse added a comment - Fixed. Committed in r.699173 I fixed the plugin so you'll can run it like you already do it and I add a pomFilename parameter that is defaulted to 'pom.xml'
        Hide
        Nap Ramirez added a comment -

        How about using a default value if the project url doesn't end in .xml? For example, if the url is something like http://myhost.com/repos/myproject/trunk, the plugin should append the missing default pom.xml. But if it is something like http://myhost.com/repos/myproject/trunk/custom-pom.xml, then the plugin shouldn't override it.

        I tried:

        $ mvn org.apache.continuum:continuum-maven-plugin:1.2-SNAPSHOT:add-maven-two-project -o -Durl=http://localhost:9090/xmlrpc -Dusername=admin -Dpassword=****** -N
        [INFO] Scanning for projects...
        [INFO] ------------------------------------------------------------------------
        [INFO] Building multimodule-parent
        [INFO]    task-segment: [org.apache.continuum:continuum-maven-plugin:1.2-SNAPSHOT:add-maven-two-project]
        [INFO] ------------------------------------------------------------------------
        [INFO] [continuum:add-maven-two-project]
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD SUCCESSFUL
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 8 seconds
        [INFO] Finished at: Thu Sep 11 13:55:16 PHT 2008
        [INFO] Final Memory: 10M/82M
        [INFO] ------------------------------------------------------------------------
        $
        

        ..and continuum added just the parent.

        Show
        Nap Ramirez added a comment - How about using a default value if the project url doesn't end in .xml? For example, if the url is something like http://myhost.com/repos/myproject/trunk , the plugin should append the missing default pom.xml. But if it is something like http://myhost.com/repos/myproject/trunk/custom-pom.xml , then the plugin shouldn't override it. I tried: $ mvn org.apache.continuum:continuum-maven-plugin:1.2-SNAPSHOT:add-maven-two-project -o -Durl=http://localhost:9090/xmlrpc -Dusername=admin -Dpassword=****** -N [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building multimodule-parent [INFO] task-segment: [org.apache.continuum:continuum-maven-plugin:1.2-SNAPSHOT:add-maven-two-project] [INFO] ------------------------------------------------------------------------ [INFO] [continuum:add-maven-two-project] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8 seconds [INFO] Finished at: Thu Sep 11 13:55:16 PHT 2008 [INFO] Final Memory: 10M/82M [INFO] ------------------------------------------------------------------------ $ ..and continuum added just the parent.
        Olivier Lamy (*$^¨%`£) made changes -
        Fix Version/s 1.2.1 [ 14539 ]
        Fix Version/s 1.2 [ 13779 ]
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        Hi,
        I don't want to add pom.xml in the default-value : users can have the rigth one and it will fail.
        Concerning the multi modules, you can certainly try using -N when using the continuum plugin.

        Show
        Olivier Lamy (*$^¨%`£) added a comment - Hi, I don't want to add pom.xml in the default-value : users can have the rigth one and it will fail. Concerning the multi modules, you can certainly try using -N when using the continuum plugin.
        Olivier Lamy (*$^¨%`£) made changes -
        Field Original Value New Value
        Fix Version/s 1.2 [ 13779 ]
        Priority Major [ 3 ] Blocker [ 1 ]
        Nap Ramirez created issue -

          People

          • Assignee:
            Emmanuel Venisse
            Reporter:
            Nap Ramirez
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development