Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.0.11
-
Fix Version/s: 0.9.4
-
Component/s: WTP integration
-
Labels:None
-
Environment:Jdk 1.6.0_02, eclipse 3.3.1 (+WTP)
Description
I'm deploying a project with maven managed dependencies to a web container (tomcat 6). The dependencies contain several jars with scope provided (e.g. servlet-api, jsp-api).
Library 'Maven Dependencies' is marked as J2EE Module Dependency. After publishing to the server, WEB-INF/lib contains jars with scope provided and cause conflicts with server jars!
This makes it quite impossible using m2eclipse with eclipse WTP plugins. The only workaround is to remove the Maven Dependencies Library from the project classpath and use mvn war:inplace to update WEB-INF/lib jars manually.
-
Hide
- MNGECLIPSE-413.zip
- 29/Oct/07 3:25 AM
- 4 kB
- Martin Ahrer
-
- MNGECLIPSE-413/.classpath 0.7 kB
- MNGECLIPSE-413/.project 1 kB
- MNGECLIPSE-413/.../org.eclipse.jdt.core.prefs 0.3 kB
- MNGECLIPSE-413/.../org.eclipse.jst.common.project.facet.core.prefs 0.3 kB
- MNGECLIPSE-413/.../org.eclipse.wst.common.component 0.4 kB
- MNGECLIPSE-413/.../org.eclipse.wst.common.project.facet.core.xml 0.3 kB
- MNGECLIPSE-413/pom.xml 6 kB
- MNGECLIPSE-413/src/main/.../WEB-INF/web.xml 0.6 kB
-
- screenshot-1.jpg
- 170 kB
- 17/Jan/08 6:51 AM
Activity
Please provide complete test project and detailed instructions that can be used to reproduce this.
For some tips see http://docs.codehaus.org/display/M2ECLIPSE/How+To+Report+Issues
As requested a sample project to reproduce the problem.
Follow these steps to test:
eclipse 3.3.1 (eclipse europa with WTP plugins) with Tomcat 6.0.14
1) Import sample project (contains only a pom.xml with plenty of dependencies with jsp-api and servlet being scoped as provided)
2) create server
3) add project MNGECLIPSE-413
4) publish project
5) check the publish folder WEB-INF/lib for the MNGECLIPSE-413 project for jsp-api.jar and servlet.jar
The publish folder is something like
$[workspace}\.metadata\.plugins\org.eclipse.wst.server.core\tmpX\XXXwebapps\MNGECLIPSE-413\WEB-INF\lib
I get the follwing list of jars published to the server
15.10.2007 09:10 527.655 acegi-security-1.0.3.jar
15.10.2007 13:29 13.641 acegijsf-1.1.3.jar
15.10.2007 09:11 443.432 antlr-2.7.6.jar
15.10.2007 09:11 26.361 asm-1.5.3.jar
15.10.2007 09:11 16.757 asm-attrs-1.5.3.jar
15.10.2007 09:11 282.338 cglib-2.1_3.jar
15.10.2007 09:10 188.671 commons-beanutils-1.7.0.jar
15.10.2007 09:10 46.725 commons-codec-1.3.jar
15.10.2007 09:10 571.259 commons-collections-3.2.jar
15.10.2007 09:10 107.631 commons-dbcp-1.2.1.jar
15.10.2007 09:10 168.446 commons-digester-1.6.jar
15.10.2007 09:10 245.274 commons-lang-2.3.jar
15.10.2007 09:10 38.015 commons-logging-1.0.4.jar
15.10.2007 09:10 42.492 commons-pool-1.2.jar
15.10.2007 09:11 313.898 dom4j-1.6.1.jar
15.10.2007 09:11 208.048 ehcache-1.2.3.jar
15.10.2007 09:10 76.643 hamcrest-core-1.1.jar
15.10.2007 09:10 111.504 hamcrest-library-1.1.jar
15.10.2007 09:11 2.255.753 hibernate-3.2.5.ga.jar
15.10.2007 09:10 202.804 jmock-2.2.0.jar
15.10.2007 09:10 364.449 jsf-api-1.1_02.jar
15.10.2007 09:10 796.261 jsf-impl-1.1_02.jar
15.10.2007 09:10 48.457 jsp-api-2.0.jar
15.10.2007 09:10 16.923 jstl-1.1.jar
15.10.2007 09:11 8.812 jta-1.0.1B.jar
15.10.2007 09:06 121.070 junit-3.8.1.jar
15.10.2007 09:09 367.444 log4j-1.2.14.jar
15.10.2007 09:10 65.261 oro-2.0.8.jar
15.10.2007 09:10 97.693 servlet-api-2.4.jar
15.10.2007 09:09 104.500 shale-test-1.0.4.jar
15.10.2007 09:10 13.802 slf4j-log4j12-1.0.jar
15.10.2007 09:10 2.694.014 spring-2.0.6.jar
15.10.2007 09:11 104.178 spring-mock-2.0.6.jar
15.10.2007 09:10 393.259 standard-1.1.2.jar
15.10.2007 09:10 776.744 trinidad-api-1.0.1.jar
15.10.2007 09:10 3.486.580 trinidad-impl-1.0.1.jar
15.10.2007 09:10 1.212.965 xercesImpl-2.8.1.jar
Is there any progress on this issue? I have a simular issue.
When depedencies are added to the pom.xm with whatever scope, they are all added to the ear projects "J2EE Module Dependencies" list in Eclipse. It`s not possible to uncheck some of the dependencies.
Because they are checked the dependencies are also exported, including transitive dependencies (servlet-api etc).
I'm also seeing this issue. I work on a rather complex project that makes heavy use of provided/test scoping to prevent transitive dependencies from showing up in our Eclipse classpath. This bug makes the current version of the plugin (0.0.12) unusable for us - I've had to revert back to 0.0.9 to get things working again.
This issue currently hurts us again, as our WAR projects are getting more complex, and manually maintaining the J2EE Module Dependencies is error prone and redundant.
See also last comment in http://jira.codehaus.org/browse/MNGECLIPSE-347
This issue currently hurts us again, as our WAR projects are getting more complex, and manually maintaining the J2EE Module Dependencies is error prone and redundant.
See also last comment in http://jira.codehaus.org/browse/MNGECLIPSE-347
I have recently upgraded to the latest plugin version from http://m2eclipse.sonatype.org/update/ and have not encountered this bug again. To go sure I also retested this using the attached example project (using eclipse europa 3.3.1.1).
So it seems that this bug has gone. As this bug is still reported as open I'd assume some other changes have helped fixing this issue. Maybe one of the plugin developers can take a look and confirm/close.
Ok, I verified the behaviour on 2 of my projects with 0.9.3, and it seems that it works.
Ok, I verified the behaviour on 2 of my projects with 0.9.3, and it seems that it works.
fixed. dependencies with provided/system/test scope are excluded from WTP export and publishing (they're still present in Maven Dependencies classpath container).
I have this bug in Eclipse
Version: 3.4.1
Build id: M20080911-1700
I have repeated it with 0.9.4 and 0.96 versions of the plugin. Does anyone know a version that works with Ganymede?
We are using Eclipse 3.4.1 Ganymede and we still (or again?) have this problem.
Timo, I would recommend to open new issue, attach your eclipse configuration there and steps to reproduce. Thanks.
You might also watch
MNGECLIPSE-105.MNGECLIPSE-105.