maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Elliot (JIRA)" <>
Subject [jira] Updated: (MNGECLIPSE-107) Dependency Resolver and Eclipse Web Tools Platform (WTP)
Date Wed, 30 Aug 2006 21:32:49 GMT
     [ ]

Robert Elliot updated MNGECLIPSE-107:

    Attachment: m2eclipse-patch.txt

This patch causes M2Eclipse to add a classpath attribute org.eclipse.jst.j2ee.deployableArtifact=true
to all items it adds to a project's classpath that ought to be packaged up with it if the
project should be packaged as a war or ear.

At present this will do nothing useful, but it is possible that future releases of the WTP
will recognise this attribute and act accordingly when deploying to a server.  See

> Dependency Resolver and Eclipse Web Tools Platform (WTP)
> --------------------------------------------------------
>                 Key: MNGECLIPSE-107
>                 URL:
>             Project: Maven 2.x Extension for Eclipse
>          Issue Type: Improvement
>          Components: Dependency Resolver
>         Environment: Eclipse WTP
>            Reporter: Dimitry Voytenko
>         Attachments: m2eclipse-patch.txt,
> All tests have been done using the solution provided in the
This solution works very well, but there're specifics when using it with WebTools.
> Attached are sample projects that demonstrate the issue (tested under Eclipse 3.1.2).
Unpack and import projects in the workspace. Patch from MNGECLIPSE-59 should
be applied. Rebuild both projects. Build of "web-main" should fail with an error:
>    "Build path contains duplicate entry: 'web-component' for project web-main"
> The problem occures b/c of conflict b/w Java classpath (in the Java Build Path > Projects)
and Maven2 classpath container. They both contain "web-component" project. If go to Properties
> Java Build Path > Projects and remove "web-component" project manually everything
will compile fine, but WTP will not include "web-component" in the runtime classpath when
running the "web-main" project in the servlet container (e.g. Tomcat). To fix that, you have
to include "web-component" in the J2EE Module Dependencies for "web-main" (see Properties
> J2EE Module Dependencies). When you try to save J2EE Module Dependencies changes, you
get the same "duplicate classpath entry" error.
> J2EE Module Dependencies use regular Java classpath for a project and thus Maven's container
should work just fine (theoretically). The problem occures exactly when WTP tries to save
J2EE Module Dependencies and synchronize them with Java classpath. It most probably tries
to add a project marked in the "module dependencies" to the list of dependent java projects
and fails.
> One solution here could be to source "J2EE Module Dependencies" from the Maven's configuration
for a project. J2EE Module Dependencies are stored within the project in the ".settings/.component"
and looks something like the following:
>         <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/web-component/web-component">
>             <dependency-type>uses</dependency-type>
>         </dependent-module>
> This information is present in the POM with dependency scope other than "provided" and
> If it's not possible to extend WTP to read module dependencies from Maven's POM this
issue can be redirected to WTP itself, as there's nothing illegal with the way Maven2 extends
classpath (as specified in MNGECLIPSE-59). It's only the synchronization procedure of WTP
configuration that fails in this case.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message