You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "nicolas de loof (JIRA)" <ji...@codehaus.org> on 2007/12/14 16:15:57 UTC

[jira] Commented: (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.

    [ http://jira.codehaus.org/browse/MECLIPSE-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116821 ] 

nicolas de loof commented on MECLIPSE-252:
------------------------------------------

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 !



> 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.
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MECLIPSE-252
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-252
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: Dependencies resolution and build path
>    Affects Versions: 2.3
>            Reporter: Daniel Alheiros
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira