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)
  • Maven 1
  • MAVEN-1825

Multiple <versions> tags not allowed in RC-1 (Duplicated tag: 'project')

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.1-rc1
  • Fix Version/s: 1.1
  • Component/s: None
  • Labels:
    None

Description

We have combined multiple modules into components:

  • component 1
    root-module-generic – project-descriptor (project.xml,project.properties)
    • sub-module-1
    • sub-module-2
    • ...
  • component 2
    root-module-specific – project-descriptor (project.xml,project.properties)
    • generic-component-descriptor (project.xml,project.properties)
    • sub-module-1
    • sub-module-2
    • ...
  • component 3
    root-module-specific2-- project-descriptor (project.xml,project.properties)
    • generic-component-descriptor (project.xml,project.properties)
    • sub-module-1
    • sub-module-2
    • ...
  • ...

Every module is released seperately in one big 'component-release'.
This component-release checks if a module has changed since the last release and if so ups the version (and adds a <version>-entry to module's pom.)

Sub-modules <extend> root-module and the root-pom extends all dependent component-descriptors.

The root-pom is specifies the component-version.

Every module gets it's own version and cvs-tag (including root-pom for the component-version.)

After testing RC-1, seeing the 'Duplicated tag: 'project'' error and reading:

http://www.mail-archive.com/users@maven.apache.org/msg55210.html

I'm very surprised that tag duplication in parent/child modules isn't allowed anymore.

Doesn't the parent-pom specify the entire project and the sub-module-poms their own?

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
G.J. Sterenborg added a comment - 10/Jan/07 2:25 AM

(Since I can't edit the description)

  • component 2
    root-module-specific
    • project-descriptor (project.xml,project.properties)
    • generic-component-descriptor (project.xml,project.properties)
    • sub-module-1
    • sub-module-2
    • ..

Every component has it's own descriptor which is a dir containing a project.xml and project.properties.

The project.properties in the descriptor describes sub-module-versions.

Show
G.J. Sterenborg added a comment - 10/Jan/07 2:25 AM (Since I can't edit the description)
  • component 2 root-module-specific
    • project-descriptor (project.xml,project.properties)
    • generic-component-descriptor (project.xml,project.properties)
    • sub-module-1
    • sub-module-2
    • ..
Every component has it's own descriptor which is a dir containing a project.xml and project.properties. The project.properties in the descriptor describes sub-module-versions.
Hide
Permalink
Lukas Theussl added a comment - 10/Jan/07 4:15 AM

Just like I said in the mail thread quoted above, I don't understand what the problem is really. What's the point in having duplicate <version> tags in your pom? Was Maven ever able to distinguish them? Also, multiple version tags are simply not allowed by the current xsd http://maven.apache.org/maven-v3_0_0.xsd, (and never have been, AFAIK, only previous maven's have not enforced this).

Show
Lukas Theussl added a comment - 10/Jan/07 4:15 AM Just like I said in the mail thread quoted above, I don't understand what the problem is really. What's the point in having duplicate <version> tags in your pom? Was Maven ever able to distinguish them? Also, multiple version tags are simply not allowed by the current xsd http://maven.apache.org/maven-v3_0_0.xsd, (and never have been, AFAIK, only previous maven's have not enforced this).
Hide
Permalink
Lukas Theussl added a comment - 10/Jan/07 4:23 AM

I meant <versions> tags, of course...

Show
Lukas Theussl added a comment - 10/Jan/07 4:23 AM I meant <versions> tags, of course...
Hide
Permalink
G.J. Sterenborg added a comment - 10/Jan/07 5:22 AM

The versions-tags are not duplicates. (The pom's are not being treated as one entity.)

Parent pom specifies the entire project, child-pom specifies itself.

Our hierarchy:

sub-module/project.xml – extends – parent-pom/project.xml (i.e. '../project.xml')
parent-pom/project.xml – extends – descriptor/project.xml

This allows the entire set to have a version that will be added to parent-pom/project.xml.

Show
G.J. Sterenborg added a comment - 10/Jan/07 5:22 AM The versions-tags are not duplicates. (The pom's are not being treated as one entity.) Parent pom specifies the entire project, child-pom specifies itself. Our hierarchy: sub-module/project.xml – extends – parent-pom/project.xml (i.e. '../project.xml') parent-pom/project.xml – extends – descriptor/project.xml This allows the entire set to have a version that will be added to parent-pom/project.xml.
Hide
Permalink
Arnaud Heritier added a comment - 10/Jan/07 5:48 AM

In theory, It's always possible to have several times the same element in different poms (parent/child).
I'll try to add a testcase for this.
I'm working on the model actually.

Show
Arnaud Heritier added a comment - 10/Jan/07 5:48 AM In theory, It's always possible to have several times the same element in different poms (parent/child). I'll try to add a testcase for this. I'm working on the model actually.
Hide
Permalink
Lukas Theussl added a comment - 10/Jan/07 5:49 AM

Sorry, I still don't get it. Do you have several <versions> tags within one project.xml? Or are you saying that it's an inheritance problem? Can you attach a reproducible test case, that would be helpful. Note also that you should be able to validate each pom (parent or sub-project) with the pom:validate goal (http://maven.apache.org/maven-1.x/plugins/pom/validation.html).

Show
Lukas Theussl added a comment - 10/Jan/07 5:49 AM Sorry, I still don't get it. Do you have several <versions> tags within one project.xml? Or are you saying that it's an inheritance problem? Can you attach a reproducible test case, that would be helpful. Note also that you should be able to validate each pom (parent or sub-project) with the pom:validate goal (http://maven.apache.org/maven-1.x/plugins/pom/validation.html).
Hide
Permalink
G.J. Sterenborg added a comment - 10/Jan/07 5:59 AM

I'll try to create a testcase asap.

Show
G.J. Sterenborg added a comment - 10/Jan/07 5:59 AM I'll try to create a testcase asap.
Hide
Permalink
G.J. Sterenborg added a comment - 10/Jan/07 4:26 PM

Btw, it's an inheritance problem, like the post in the mail-thread.

Show
G.J. Sterenborg added a comment - 10/Jan/07 4:26 PM Btw, it's an inheritance problem, like the post in the mail-thread.
Hide
Permalink
G.J. Sterenborg added a comment - 28/Jun/07 5:46 AM

I've tested our projects against 1.1.

The problem seems to have gone

Show
G.J. Sterenborg added a comment - 28/Jun/07 5:46 AM I've tested our projects against 1.1. The problem seems to have gone
Hide
Permalink
Lukas Theussl added a comment - 28/Jun/07 6:03 AM

Thanks!

Show
Lukas Theussl added a comment - 28/Jun/07 6:03 AM Thanks!

People

  • Assignee:
    Unassigned
    Reporter:
    G.J. Sterenborg
Vote (0)
Watch (1)

Dates

  • Created:
    10/Jan/07 2:21 AM
    Updated:
    28/Jun/07 6:03 AM
    Resolved:
    28/Jun/07 5:46 AM
  • 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.