maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Bourgeois (JIRA)" <j...@codehaus.org>
Subject [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.
Date Tue, 09 Oct 2007 15:57:53 GMT

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

Daniel Bourgeois commented on MECLIPSE-252:
-------------------------------------------

I ran into this issue as well..

On a hunch I took a look at the order of my modules in my parent pom.xml, and noticed the
ear was listed before one of my war projects. Normally maven figures out the correct order
when doing a build, but for the eclipse plugin, looks like it doesn't resolve the order correctly
based on the dependencies.

At any rate, I made sure my ear project was the last one in the module order, and that seems
to have done the trick.

> 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: dependency resolution
>    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

        

Mime
View raw message