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 2.x Eclipse Plugin
  • MECLIPSE-252

Error trying to create an EAR project that contains one web module. It doesn't point to the local project, but only tries to find it in the local and remote repositories.

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.3
  • Fix Version/s: None
  • Component/s: Core : Dependencies resolution and build path (.classpath)
  • Labels:
    None

Description

I have one structure that defines 3 projects:

project1-jar
project2-war
project3-ear

project2-war is just a WAR that contains the project1-jar as a library (WEB-INF/lib)
project3-ear is an EAR that contains project2-war as its only web module.

When I run mvn package it works perfectly and creates the EAR containing the proper WAR file and the application.xml, so it works fine, but when I run mvn eclipse:eclipse to generate the projects, the ear project is not generated properly as it tries to find the war in the local and remote repository as the piece of logging show bellow:

[INFO] Building project3-ear
[INFO] task-segment: [eclipse:eclipse]
[INFO] ----------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
Downloading: http://mycompany.central-repository/repo/com/mycompany/project2-war/1.0-SNAPSHOT/project2-war-1.0-SNAPSHOT.war
[WARNING] Unable to get resource 'mycompanygroupid:project2-war:war:1.0-SNAPSHOT' from repository mycompany.central-repository (http://mycompany.central-repository/repo)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) mycompanygroupid:project2-war:war:1.0-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=mycompanygroupid -DartifactId=project2-war \
-Dversion=1.0-SNAPSHOT -Dpackaging=war -Dfile=/path/to/file

Path to dependency:
1) mycompanygroupid:project3-ear:ear:1.0-SNAPSHOT
2) mycompanygroupid:project2-war:war:1.0-SNAPSHOT

----------
1 required artifact is missing.

for artifact:
mycompanygroupid:project3-ear:ear:1.0-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
mycompany.central-repository (http://mycompany.central-repository/repo)

If I follow this instructions and install my WAR file to my local repository, it then works and makes my EAR project, but I believe it shouldn't be necessary.

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MECLIPSE-37 eclipse:eclipse should execute in a later phase than "generate-sources"

  • Major - Major loss of function.
  • Reopened - This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.
relates to

Bug - A problem which impairs or prevents the functions of the product. MEAR-107 Cannot generate Eclipse file with eclipse:eclipse when dependent projects are not installed in repository

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Bjorn Beskow added a comment - 16/Aug/07 4:11 AM

The problem seems to be caused by the eclipse plugin executing the generate-resources lifecycle phase, which in turn cause the ear plugin to perform dependency resolution.

Show
Bjorn Beskow added a comment - 16/Aug/07 4:11 AM The problem seems to be caused by the eclipse plugin executing the generate-resources lifecycle phase, which in turn cause the ear plugin to perform dependency resolution.
Hide
Permalink
Daniel Bourgeois added a comment - 09/Oct/07 10:56 AM - edited

Only workaround I can find is installing the artifacts locally. That shouldn't be necessary.

Show
Daniel Bourgeois added a comment - 09/Oct/07 10:56 AM - edited Only workaround I can find is installing the artifacts locally. That shouldn't be necessary.
Hide
Permalink
nicolas de loof added a comment - 14/Dec/07 9:15 AM

In an ideal world, we could run mvn eclipse:eclipse on a fresh checkout without having to build the project.

The requirement for @execute generate-resources to get all source-code generator declare generated folders makes this impossible. An ear project is an example, but any other project that requires dependency resolution on the generate-resources phase will also.

Based on this, it is not possible (not simple) to fix a broken project in eclipse, as maven can't generate the required configuration !

Show
nicolas de loof added a comment - 14/Dec/07 9:15 AM In an ideal world, we could run mvn eclipse:eclipse on a fresh checkout without having to build the project. The requirement for @execute generate-resources to get all source-code generator declare generated folders makes this impossible. An ear project is an example, but any other project that requires dependency resolution on the generate-resources phase will also. Based on this, it is not possible (not simple) to fix a broken project in eclipse, as maven can't generate the required configuration !
Hide
Permalink
nicolas de loof added a comment - 14/Dec/07 9:18 AM

MECLIPSE-37 requests the oposite change : some plugins generate resources in the process-classes phase, that will break even generating the eclipse configuration from an never-built project.

Show
nicolas de loof added a comment - 14/Dec/07 9:18 AM MECLIPSE-37 requests the oposite change : some plugins generate resources in the process-classes phase, that will break even generating the eclipse configuration from an never-built project.
Hide
Permalink
Michael Johns added a comment - 05/Dec/08 6:26 PM

I'll put in an enthusiastic vote for this one. We have some pretty large enterprise projects, and this causes great developer pain whenever a version number changes after we tag the codebase, which we do quite often (and no, tagging less is not a solution).

Show
Michael Johns added a comment - 05/Dec/08 6:26 PM I'll put in an enthusiastic vote for this one. We have some pretty large enterprise projects, and this causes great developer pain whenever a version number changes after we tag the codebase, which we do quite often (and no, tagging less is not a solution).
Hide
Permalink
Will Hoover added a comment - 19/Jan/09 12:45 PM - edited

This is a fairly old issue... Is there any plans on fixing this? one thing that I noticed is that using the maven-archetype-jee-simple properly resolves the module dependencies.

Show
Will Hoover added a comment - 19/Jan/09 12:45 PM - edited This is a fairly old issue... Is there any plans on fixing this? one thing that I noticed is that using the maven-archetype-jee-simple properly resolves the module dependencies.
Hide
Permalink
Joost den Boer added a comment - 08/Jul/09 2:40 AM

Any progress on this issue? We're in the process of changing our project into a Maven structure. Not being able to generate the eclipse files without running 'mvn install' first is a BIG issue.

ps. A project generated with maven-archetype-j2ee-simple archetype does not resolve the ear dependencies for me.

Show
Joost den Boer added a comment - 08/Jul/09 2:40 AM Any progress on this issue? We're in the process of changing our project into a Maven structure. Not being able to generate the eclipse files without running 'mvn install' first is a BIG issue. ps. A project generated with maven-archetype-j2ee-simple archetype does not resolve the ear dependencies for me.
Hide
Permalink
Joost den Boer added a comment - 16/Jul/09 2:16 PM

I create an issue for this at the maven-ear-plugin and supplied a patch to fix it.
With this patch you can generate Eclipse files with eclipse:eclipse without having to install the project modules in your local repository. Just add '<useProjectReferences>true</useProjectReferences>' to your Ear plugin configuration. Without this the ear plugin will as it does without the patch.

Show
Joost den Boer added a comment - 16/Jul/09 2:16 PM I create an issue for this at the maven-ear-plugin and supplied a patch to fix it. With this patch you can generate Eclipse files with eclipse:eclipse without having to install the project modules in your local repository. Just add '<useProjectReferences>true</useProjectReferences>' to your Ear plugin configuration. Without this the ear plugin will as it does without the patch.

People

  • Assignee:
    Unassigned
    Reporter:
    Daniel Alheiros
Vote (9)
Watch (10)

Dates

  • Created:
    10/Apr/07 9:22 AM
    Updated:
    16/Jul/09 2:16 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.