jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Continuum
  • CONTINUUM-1874

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

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed 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
  • Complexity:
    Intermediate

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

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Olivier Lamy added a comment - 10/Sep/08 11:53 AM

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 - 10/Sep/08 11:53 AM 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.
Hide
Permalink
Nap Ramirez added a comment - 11/Sep/08 1:03 AM

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 - 11/Sep/08 1:03 AM 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.
Hide
Permalink
Emmanuel Venisse added a comment - 25/Sep/08 11:32 PM

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 - 25/Sep/08 11:32 PM 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'

People

  • Assignee:
    Emmanuel Venisse
    Reporter:
    Nap Ramirez
Vote (0)
Watch (0)

Dates

  • Created:
    09/Sep/08 9:09 AM
    Updated:
    25/Sep/08 11:32 PM
    Resolved:
    25/Sep/08 11:32 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.