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 Integration for Eclipse
  • MNGECLIPSE-257

[mng] build fails with dependency on project with Maven 1.0 pom

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 0.0.10
  • Fix Version/s: None
  • Component/s: Maven Embedder
  • Labels:
    None
  • Environment:
    Eclipse 3.2.1, MaxOS X 10.4.8

Description

I switched from 0.0.9 to 0.0.10 and now face a serious problem: our project has transitive dependencies to modules with an old Maven 1.0 POM in the local repository (geronimo-spec-javamail/1.3.1-rc3 and geronimo-spec-jms/1.1-rc4). Upon building in Eclipse the m2eclipse plugin now stops the build when it comes to those POMs and throws those errors:

<snip>

26.01.07 13:18:22 CET: Parsing error /Users/alex/.m2/repository/geronimo-spec/geronimo-spec-javamail/1.3.1-rc3/geronimo-spec-javamail-1.3.1-rc3.pom; org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'pomVersion' (position: START_TAG seen .../3.0.0 http://maven.apache.org/maven-v3_0_0.xsd">\n <pomVersion>... @30:17)
26.01.07 13:18:22 CET: Unable to read model from /mindquarry-teamspace/pom.xml; org.eclipse.core.runtime.CoreException: Parsing error /Users/alex/.m2/repository/geronimo-spec/geronimo-spec-javamail/1.3.1-rc3/geronimo-spec-javamail-1.3.1-rc3.pom; org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'pomVersion' (position: START_TAG seen .../3.0.0 http://maven.apache.org/maven-v3_0_0.xsd">\n <pomVersion>... @30:17)

</snip>

Then it marks the pom.xml in the project inside Eclipse as erroneous and stops resolving the other dependencies, which leads to lots of build errors due to missing imports.

This has worked with the previous version 0.0.9 (the geronimo dependencies did not change) and it works with a normal mvn call on the command line, where it just prints out a warning:

<snip>

[WARNING] POM for 'geronimo-spec:geronimo-spec-javamail:pom:1.3.1-rc3:compile' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM.
[WARNING] POM for 'geronimo-spec:geronimo-spec-jms:pom:1.1-rc4:compile' is invalid. It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM.

</snip>

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    MNGECLIPSE-257.zip
    19/Oct/07 9:27 AM
    6 kB
    Jacob Robertson
    1. File
      MNGECLIPSE-257/.../.classpath 0.2 kB
    2. File
      MNGECLIPSE-257/maven-1-project/.project 0.4 kB
    3. XML File
      MNGECLIPSE-257/.../project.xml 0.3 kB
    4. Java Source File
      MNGECLIPSE-257/.../SomeParent.java 0.1 kB
    5. File
      MNGECLIPSE-257/.../.classpath 0.3 kB
    6. File
      MNGECLIPSE-257/maven-2-project/.project 0.6 kB
    7. XML File
      MNGECLIPSE-257/maven-2-project/pom.xml 0.6 kB
    8. Java Source File
      MNGECLIPSE-257/.../SomeChild.java 0.2 kB
    9. Text File
      MNGECLIPSE-257/Readme.txt 0.9 kB
    Download Zip
    Show
    Zip Archive
    MNGECLIPSE-257.zip
    19/Oct/07 9:27 AM
    6 kB
    Jacob Robertson

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Alexander Klimetschek added a comment - 26/Jan/07 10:58 AM

Sorry, i cannot provide a test project for reproducing the error. Simply add a reference to geronimo-spec:geronimo-spec-javamail:pom:1.3.1-rc3 or geronimo-spec:geronimo-spec-jms:pom:1.1-rc4 in your pom.

M2Eclipse or the MavenEmbedder should not stop at the Exception but ignore the problem/pom and continue the build.

Show
Alexander Klimetschek added a comment - 26/Jan/07 10:58 AM Sorry, i cannot provide a test project for reproducing the error. Simply add a reference to geronimo-spec:geronimo-spec-javamail:pom:1.3.1-rc3 or geronimo-spec:geronimo-spec-jms:pom:1.1-rc4 in your pom. M2Eclipse or the MavenEmbedder should not stop at the Exception but ignore the problem/pom and continue the build.
Hide
Permalink
Eugene Kuleshov added a comment - 26/Jan/07 11:24 AM

Fail on first error is a known issue, but why on Earth would you put m1 poms into the local m2 repository?

Show
Eugene Kuleshov added a comment - 26/Jan/07 11:24 AM Fail on first error is a known issue, but why on Earth would you put m1 poms into the local m2 repository?
Hide
Permalink
Alexander Klimetschek added a comment - 26/Jan/07 11:36 AM

Its a dependency of a dependency of a dependency.... Maven put this into my local m2 repository. Ask the developers of geronimo why they don't like maven 2... Well, command line maven is able to ignore this wrong pom, so why not let m2eclipse behave the same way?

Show
Alexander Klimetschek added a comment - 26/Jan/07 11:36 AM Its a dependency of a dependency of a dependency.... Maven put this into my local m2 repository. Ask the developers of geronimo why they don't like maven 2... Well, command line maven is able to ignore this wrong pom, so why not let m2eclipse behave the same way?
Hide
Permalink
Eugene Kuleshov added a comment - 26/Jan/07 5:32 PM

Alexander, plugin supposed to use the same Maven component as the command line. It sounds like some Embedder issue.

Jason, can you please take a look at this.

Show
Eugene Kuleshov added a comment - 26/Jan/07 5:32 PM Alexander, plugin supposed to use the same Maven component as the command line. It sounds like some Embedder issue. Jason, can you please take a look at this.
Hide
Permalink
Chris Frohoff added a comment - 05/Sep/07 1:49 PM

This would really help organizations using eclipse with a lot of proprietary maven 1.x artifacts/libraries migrate to maven 2.x piecemeal.

Show
Chris Frohoff added a comment - 05/Sep/07 1:49 PM This would really help organizations using eclipse with a lot of proprietary maven 1.x artifacts/libraries migrate to maven 2.x piecemeal.
Hide
Permalink
Jacob Robertson added a comment - 03/Oct/07 3:00 PM

+1 from my company. Some of us have been working on projects that are all maven2. Now that we've started working on some other projects that use maven1 artifacts, we are all rolling back m2eclipse to use 0.0.9 which is very sad because 0.0.11 fixed some other headaches we were having.

Show
Jacob Robertson added a comment - 03/Oct/07 3:00 PM +1 from my company. Some of us have been working on projects that are all maven2. Now that we've started working on some other projects that use maven1 artifacts, we are all rolling back m2eclipse to use 0.0.9 which is very sad because 0.0.11 fixed some other headaches we were having.
Hide
Permalink
Eugene Kuleshov added a comment - 03/Oct/07 3:12 PM

Jacob, are you willing to provide test project that would allow to reproduce and further debug this issue?

Show
Eugene Kuleshov added a comment - 03/Oct/07 3:12 PM Jacob, are you willing to provide test project that would allow to reproduce and further debug this issue?
Hide
Permalink
Chris Frohoff added a comment - 03/Oct/07 11:24 PM

I've had success using a local apache proxy configured to just block the download of 1.x POMs as workaround until this gets fixed.

Show
Chris Frohoff added a comment - 03/Oct/07 11:24 PM I've had success using a local apache proxy configured to just block the download of 1.x POMs as workaround until this gets fixed.
Hide
Permalink
Jacob Robertson added a comment - 19/Oct/07 9:27 AM

I would have sent this when requested, but failed to watch this topic so I didn't see your request until today...

I have attached a zip with two eclipse projects in it. One is a maven-1-project, and one is a maven-2- project. Just follow the instructions outlined in the Readme.txt (also pasted here) to see the behavior.

Preconditions:
have both maven1 and maven2 ("remote") repos setup with deploy permissions to the maven1 repo
your build.properties points correctly to that maven1 repo
your settings.xml points to both repos (using <layout>legacy</layout> and <layout>default</layout> respectively)

Step 1: run "maven jar:deploy" on maven-1-project
This will compile it and put it out in your maven1 repo

Step 2: run "mvn compile" on maven-2-project (from command line)
This is what should happen:
It will download the maven-1-project, and put it into your local maven2 repo
It will successfully compile, but with warnings.

Step 3: open up a new eclipse workspace and import the 2 projects.

Step 4: build maven-2-project in eclipse
Will "fail" for the reasons outlined in MNGECLIPSE-257
Oddly enough, in my workspace it's still compiling the class to the bin directory, but the SomeChild.java and pom.xml still
have quite a bit of red markup on them.

Show
Jacob Robertson added a comment - 19/Oct/07 9:27 AM I would have sent this when requested, but failed to watch this topic so I didn't see your request until today... I have attached a zip with two eclipse projects in it. One is a maven-1-project, and one is a maven-2- project. Just follow the instructions outlined in the Readme.txt (also pasted here) to see the behavior. Preconditions: have both maven1 and maven2 ("remote") repos setup with deploy permissions to the maven1 repo your build.properties points correctly to that maven1 repo your settings.xml points to both repos (using <layout>legacy</layout> and <layout>default</layout> respectively) Step 1: run "maven jar:deploy" on maven-1-project This will compile it and put it out in your maven1 repo Step 2: run "mvn compile" on maven-2-project (from command line) This is what should happen: It will download the maven-1-project, and put it into your local maven2 repo It will successfully compile, but with warnings. Step 3: open up a new eclipse workspace and import the 2 projects. Step 4: build maven-2-project in eclipse Will "fail" for the reasons outlined in MNGECLIPSE-257 Oddly enough, in my workspace it's still compiling the class to the bin directory, but the SomeChild.java and pom.xml still have quite a bit of red markup on them.

People

  • Assignee:
    Unassigned
    Reporter:
    Alexander Klimetschek
Vote (4)
Watch (5)

Dates

  • Created:
    26/Jan/07 10:55 AM
    Updated:
    28/May/08 12:26 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.