Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: WTP support
    • Labels:
      None
    • Flags:
      Patch

      Description

      As far as I can see this plugin only supports WTP version 1.0 and 1.5. while WTP 2.0 is already released in milestone 6

      1. maven-264.patch
        8 kB
        cristina
      2. MECLIPSE-264-NEW.patch
        11 kB
        Tionan Lim

        Issue Links

          Activity

          Geir Pettersen created issue -
          Arnaud HERITIER made changes -
          Field Original Value New Value
          Component/s WTP support [ 12261 ]
          Hide
          Antonio Petrelli added a comment -

          Now WTP 2.0 is final, so I think that it deserves some supporting...

          Show
          Antonio Petrelli added a comment - Now WTP 2.0 is final, so I think that it deserves some supporting...
          Hide
          Dan Tran added a comment -

          what kind of problem do you see ? it seems wtpversion=1.5 is compatible with WTP 2.0

          Show
          Dan Tran added a comment - what kind of problem do you see ? it seems wtpversion=1.5 is compatible with WTP 2.0
          Hide
          Matthijs Wensveen added a comment -

          I've just solved all the issues with WTP 2.0 for a project in my workspace. It involved a lot of clicking around in J2EE module dependencies and something with jaxb-2.0.api. Next time I encounter this, I'll try to document all the issues in detail.

          Show
          Matthijs Wensveen added a comment - I've just solved all the issues with WTP 2.0 for a project in my workspace. It involved a lot of clicking around in J2EE module dependencies and something with jaxb-2.0.api. Next time I encounter this, I'll try to document all the issues in detail.
          Hide
          Justin Becker added a comment -

          wtpversion=1.5 does not support servlet spec 2.5 which is a requirement for JSF 1.2 and JSP 2.1.

          Show
          Justin Becker added a comment - wtpversion=1.5 does not support servlet spec 2.5 which is a requirement for JSF 1.2 and JSP 2.1.
          Hide
          Sergei added a comment - - edited

          What changed with WTP 2.0 IMHO is the way J2EE module dependencies are declared. They no longer are declared inside .settings/org.eclipse.wst.common.component, but as a classpath entry attribute in .classpath instead.

          So, currently (for WTP 1.5) there is an entry in .settings/org.eclipse.wst.common.component created, like

          <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-core/2.0.5/spring-core-2.0.5.jar">
          <dependency-type>uses</dependency-type>
          </dependent-module>

          For WST 2.0 the following entry must be created in .classpath instead:

          <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/2.0.5/spring-core-2.0.5.jar">
          <attributes>
          <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
          </attributes>
          </classpathentry>

          The issue of supporting classpath entry attributes is also relevant for MECLIPSE-270

          Currently after an "mvn eclipse:eclipse" when using WTP 2.0 I have to manually:

          1. Drop the dependency entries from .settings/org.eclipse.wst.common.component (either by unchecking them via Eclipse "J2EE Moduie" GUI, or by editing the file directly).

          2. Add the "org.eclipse.jst.component.dependency" attribute to the classpath entries in .classpath (again by checking them via Eclipse "J2EE Moduie" GUI, or by editing the file directly).

          3. (MECLIPSE-270 related) Add my spring-aspects.jar to the AspectJ Path (via GUI or editing .classpath)

          Show
          Sergei added a comment - - edited What changed with WTP 2.0 IMHO is the way J2EE module dependencies are declared. They no longer are declared inside .settings/org.eclipse.wst.common.component, but as a classpath entry attribute in .classpath instead. So, currently (for WTP 1.5) there is an entry in .settings/org.eclipse.wst.common.component created, like <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/org/springframework/spring-core/2.0.5/spring-core-2.0.5.jar"> <dependency-type>uses</dependency-type> </dependent-module> For WST 2.0 the following entry must be created in .classpath instead: <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/2.0.5/spring-core-2.0.5.jar"> <attributes> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes> </classpathentry> The issue of supporting classpath entry attributes is also relevant for MECLIPSE-270 Currently after an "mvn eclipse:eclipse" when using WTP 2.0 I have to manually: 1. Drop the dependency entries from .settings/org.eclipse.wst.common.component (either by unchecking them via Eclipse "J2EE Moduie" GUI, or by editing the file directly). 2. Add the "org.eclipse.jst.component.dependency" attribute to the classpath entries in .classpath (again by checking them via Eclipse "J2EE Moduie" GUI, or by editing the file directly). 3. ( MECLIPSE-270 related) Add my spring-aspects.jar to the AspectJ Path (via GUI or editing .classpath)
          Hide
          cristina added a comment -

          Can this get a bump up? WTP 2.0 has been out for quite a while, rendering this plugin basically useless for those of us using Europa. Considering WTP 1.5 wasn't the most stable WTP ever, that needless to say accounts for more than a few of us

          Show
          cristina added a comment - Can this get a bump up? WTP 2.0 has been out for quite a while, rendering this plugin basically useless for those of us using Europa. Considering WTP 1.5 wasn't the most stable WTP ever, that needless to say accounts for more than a few of us
          Hide
          cristina added a comment -

          Attached, please find a patch for this issue. This introduces a new includeJ2eeDeps config entry that is automatically set based on the WTP version. I decided against making it a config option, as I can see no cases where it would be set outside of the WTP version at this time.

          Also note that I introcuced a new flag to check whether or not the attributes entry has been opened. If more attributes are added (see MECLIPSE-270) then it may be more practical to have a method as such. I didn't want to change too much, though.

          The new EclipseWtpComponent20Writer suppresses the output of all non-project dependencies in the component file. I think this is the correct behavior for any use cases, though it does work for the several I tested with.

          Show
          cristina added a comment - Attached, please find a patch for this issue. This introduces a new includeJ2eeDeps config entry that is automatically set based on the WTP version. I decided against making it a config option, as I can see no cases where it would be set outside of the WTP version at this time. Also note that I introcuced a new flag to check whether or not the attributes entry has been opened. If more attributes are added (see MECLIPSE-270 ) then it may be more practical to have a method as such. I didn't want to change too much, though. The new EclipseWtpComponent20Writer suppresses the output of all non-project dependencies in the component file. I think this is the correct behavior for any use cases, though it does work for the several I tested with.
          cristina made changes -
          Attachment maven-264.patch [ 29330 ]
          Hide
          dyn added a comment -

          I just checked using 2.5-SNAPSHOT of the plugin and this patch does not seem to be applied. Are there any plans to merge this anytime soon?

          Show
          dyn added a comment - I just checked using 2.5-SNAPSHOT of the plugin and this patch does not seem to be applied. Are there any plans to merge this anytime soon?
          Hide
          cristina added a comment -

          This patch was actually broken in 2.5-SNAPSHOT by the application of another patch (which I can't remember off the top of my head). I'd be happy to recreate the patch but have been waiting to because none of the committers seem to be available for this issue, despite it being the most popular open issue in Jira. I will check for a mailing list or something for this plugin to see if I can't get an idea of what is going on.

          Show
          cristina added a comment - This patch was actually broken in 2.5-SNAPSHOT by the application of another patch (which I can't remember off the top of my head). I'd be happy to recreate the patch but have been waiting to because none of the committers seem to be available for this issue, despite it being the most popular open issue in Jira. I will check for a mailing list or something for this plugin to see if I can't get an idea of what is going on.
          Hide
          Michael Schnake added a comment -

          Sorry that I did not spend any attention to this bug for some time now (been busy in another project).

          Cris, thank you for that patch. I checked out and applied against the exact revision (572678) mentioned in the patch file, compiled, installed and updated my project to using the just locally installed maven-eclipse-plugin "2.5-SNAPSHOT" and setting WTP-Version to "2.0". Then a "mvn eclipse:clean" and "eclipse:eclipse" from the modules root, and ... drumroll ...

          The generated eclipse projects work "out of the box" now (with the patch, and after adjusting AspectJ Path (see MECLIPSE-270)). The generated files look correct, and a quick cross-check via cleaning and rebuilding everything inside eclipse (code, tomcat modules, tomcat workdir, tomcat everything produces a working application.

          So, thumbs up from me to merge patch 264. And if general attributes could be addressed, too (like you already denoted in MECLIPSE-270) my current WTP 2.0 issues were solved completely.

          GOOD WORK!

          Show
          Michael Schnake added a comment - Sorry that I did not spend any attention to this bug for some time now (been busy in another project). Cris, thank you for that patch. I checked out and applied against the exact revision (572678) mentioned in the patch file, compiled, installed and updated my project to using the just locally installed maven-eclipse-plugin "2.5-SNAPSHOT" and setting WTP-Version to "2.0". Then a "mvn eclipse:clean" and "eclipse:eclipse" from the modules root, and ... drumroll ... The generated eclipse projects work "out of the box" now (with the patch, and after adjusting AspectJ Path (see MECLIPSE-270 )). The generated files look correct, and a quick cross-check via cleaning and rebuilding everything inside eclipse (code, tomcat modules, tomcat workdir, tomcat everything produces a working application. So, thumbs up from me to merge patch 264. And if general attributes could be addressed, too (like you already denoted in MECLIPSE-270 ) my current WTP 2.0 issues were solved completely. GOOD WORK!
          Hide
          cristina added a comment -

          Thanks for taking a look at it! Do you need me to rebuild the patch to work with the latest revision? One of the recently applied patches broke it a bit.

          Show
          cristina added a comment - Thanks for taking a look at it! Do you need me to rebuild the patch to work with the latest revision? One of the recently applied patches broke it a bit.
          Hide
          Michael Schnake added a comment -

          Cris, sorry, but I am not a dev with commit rights here, so I can not merge that patch myself ;-(

          The subversion report (see http://jira.codehaus.org/browse/MECLIPSE?report=com.atlassian.jira.plugin.ext.subversion:subversion-project-tab) indicates that there were not that much commits recently, but one "big bang" regarding MECLIPSE-213 on 2007-09-02. I think the easiest way to get some progress here was to contact Brian Fox (http://jira.codehaus.org/secure/ViewProfile.jspa?name=brianfox) directly via the eMail adress given in his profile. And as I am not involved in maven-eclipse-plugin development at all I won't be of great help here, so IMHO it would be best if you do that.

          I do monitor the two bugs now (just saw I have to explictily request notification here even for bugs I commented on, so if I can help I will do so.

          But I would really like to see this merged into the official sources, as managing patched "unofficial" plugin versions internally is a pain, and completely defeats Mavens "build everywhere" approach. Currently there seem to be quite a few Unassigned/UNRESOLVED issues and very little progress, so perhaps a 2.5 release is still far away. Does anybody know whether this is simply due to lack of resources, or is the eclipse plugin being phased-out in favour of http://m2eclipse.codehaus.org by the devs?

          Show
          Michael Schnake added a comment - Cris, sorry, but I am not a dev with commit rights here, so I can not merge that patch myself ;-( The subversion report (see http://jira.codehaus.org/browse/MECLIPSE?report=com.atlassian.jira.plugin.ext.subversion:subversion-project-tab ) indicates that there were not that much commits recently, but one "big bang" regarding MECLIPSE-213 on 2007-09-02. I think the easiest way to get some progress here was to contact Brian Fox ( http://jira.codehaus.org/secure/ViewProfile.jspa?name=brianfox ) directly via the eMail adress given in his profile. And as I am not involved in maven-eclipse-plugin development at all I won't be of great help here, so IMHO it would be best if you do that. I do monitor the two bugs now (just saw I have to explictily request notification here even for bugs I commented on , so if I can help I will do so. But I would really like to see this merged into the official sources, as managing patched "unofficial" plugin versions internally is a pain, and completely defeats Mavens "build everywhere" approach. Currently there seem to be quite a few Unassigned/UNRESOLVED issues and very little progress, so perhaps a 2.5 release is still far away. Does anybody know whether this is simply due to lack of resources, or is the eclipse plugin being phased-out in favour of http://m2eclipse.codehaus.org by the devs?
          Hide
          dyn added a comment -

          I'm really happy to see something to get moving with this issue! It'd be great to see this patch getting into 2.5-SNAPSHOT at least before the patch gets obsolete again..

          Michael, I believe m2eclipse doesn't have much momentum either, but there is 'Q for Eclipse' rolling out (but these two acting as eclipse's maven support don't really compete with maven's eclipse support, if you know what I mean..

          Show
          dyn added a comment - I'm really happy to see something to get moving with this issue! It'd be great to see this patch getting into 2.5-SNAPSHOT at least before the patch gets obsolete again.. Michael, I believe m2eclipse doesn't have much momentum either, but there is 'Q for Eclipse' rolling out (but these two acting as eclipse's maven support don't really compete with maven's eclipse support, if you know what I mean..
          Hide
          Arnaud HERITIER added a comment -

          I can try to apply it before the end of the next week (I also need it). But in the patch attached it seems that there's no update of the doc and more important no test....
          Any volunteer ???

          Show
          Arnaud HERITIER added a comment - I can try to apply it before the end of the next week (I also need it). But in the patch attached it seems that there's no update of the doc and more important no test.... Any volunteer ???
          Hide
          cristina added a comment -

          I can put together some tests. I wasn't really interested in going the extra mile if it wasn't going to be applied

          As far as doc... where should some be added? I didn't really see any anywhere to update, but would be happy to.

          Show
          cristina added a comment - I can put together some tests. I wasn't really interested in going the extra mile if it wasn't going to be applied As far as doc... where should some be added? I didn't really see any anywhere to update, but would be happy to.
          Hide
          Arnaud HERITIER added a comment -

          In fact this the problem of the chicken and the egg. Committers don't spent time to look at patches without docs/tests and users don't want to loose the time to create tests and update doc if they aren't sure that the patch will be applied
          I'm not sure that this is the only page to update but this one should be to add the suport of wtp 2.0 : http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html

          Show
          Arnaud HERITIER added a comment - In fact this the problem of the chicken and the egg. Committers don't spent time to look at patches without docs/tests and users don't want to loose the time to create tests and update doc if they aren't sure that the patch will be applied I'm not sure that this is the only page to update but this one should be to add the suport of wtp 2.0 : http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html
          Hide
          cristina added a comment -

          Would this be the correct SVN target:

          http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/wtp.apt

          It looks like that is the correct site module for this one.

          By the way, I hope this project isn't going away because of m2eclipse. I personally far prefer this plugin.

          Show
          cristina added a comment - Would this be the correct SVN target: http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/wtp.apt It looks like that is the correct site module for this one. By the way, I hope this project isn't going away because of m2eclipse. I personally far prefer this plugin.
          Hide
          Arnaud HERITIER added a comment -

          yes, this is this one.

          No never !!! this is the only one supporting WTP

          Show
          Arnaud HERITIER added a comment - yes, this is this one. No never !!! this is the only one supporting WTP
          Hide
          cristina added a comment -

          Great. I'll probably get to redoing the patch for the latest revision later on in the week. I'll include some tests in that patch and a separate patch for docs. That page actually could use some more info on configuring the plugin via the POM, etc as well. I will open a separate issue to improve that page and include docs for this in that.

          Show
          cristina added a comment - Great. I'll probably get to redoing the patch for the latest revision later on in the week. I'll include some tests in that patch and a separate patch for docs. That page actually could use some more info on configuring the plugin via the POM, etc as well. I will open a separate issue to improve that page and include docs for this in that.
          Arnaud HERITIER made changes -
          Assignee Arnaud Heritier [ aheritier ]
          Arnaud HERITIER made changes -
          Fix Version/s 2.5 [ 13593 ]
          Affects Version/s 2.4 [ 13001 ]
          Arnaud HERITIER made changes -
          Patch Submitted [Yes]
          Hide
          Arnaud HERITIER added a comment -

          ok, thanks a lot. I'll review and apply them ASAP.

          Show
          Arnaud HERITIER added a comment - ok, thanks a lot. I'll review and apply them ASAP.
          Hide
          peter courcoux added a comment -

          I think that there is a bit more to supporting wtp 2.0 than is dealt with in the maven-264.patch file referenced above, including updating the org.eclipse.wst.common.project.facet.core.xml file within referenced projects in a multi-project build.

          I am just finalizing a patch for wtp 2.0 support including this. I have a basic test case which passes, but have yet to write the test for the multi-project part, although it works for the multi-project build for the project I am currently working with. If I don't get the time to look at the test in the next few days I'll post the patch 'as is' for review.

          Show
          peter courcoux added a comment - I think that there is a bit more to supporting wtp 2.0 than is dealt with in the maven-264.patch file referenced above, including updating the org.eclipse.wst.common.project.facet.core.xml file within referenced projects in a multi-project build. I am just finalizing a patch for wtp 2.0 support including this. I have a basic test case which passes, but have yet to write the test for the multi-project part, although it works for the multi-project build for the project I am currently working with. If I don't get the time to look at the test in the next few days I'll post the patch 'as is' for review.
          Hide
          Tionan Lim added a comment - - edited

          MECLIPSE-264-NEW patch is based on the maven-264 patch.

          Sample configuration:

          <plugin> <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
          <wtpapplicationxml>true</wtpapplicationxml>
          <wtpversion>2.0</wtpversion>
          </configuration>
          </plugin>

          Show
          Tionan Lim added a comment - - edited MECLIPSE-264 -NEW patch is based on the maven-264 patch. Sample configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <wtpapplicationxml>true</wtpapplicationxml> <wtpversion>2.0</wtpversion> </configuration> </plugin>
          Tionan Lim made changes -
          Attachment MECLIPSE-264-NEW.patch [ 29693 ]
          Hide
          Richard van Nieuwenhoven added a comment -

          new patch with tests, documentation, other bug-fixes and some extra functionality like context root detection is available here -> MECLIPSE-333

          Show
          Richard van Nieuwenhoven added a comment - new patch with tests, documentation, other bug-fixes and some extra functionality like context root detection is available here -> MECLIPSE-333
          Hide
          dyn added a comment -

          Richard, I've applied your patch locally against the current svn trunk and it seem to work great. I had to skip the tests run though as some of them fail.

          Show
          dyn added a comment - Richard, I've applied your patch locally against the current svn trunk and it seem to work great. I had to skip the tests run though as some of them fail.
          Hide
          Richard van Nieuwenhoven added a comment -

          the test will work when you add the (partly binary) data from the tar.

          Show
          Richard van Nieuwenhoven added a comment - the test will work when you add the (partly binary) data from the tar.
          Arnaud HERITIER made changes -
          Link This issue is related to MECLIPSE-333 [ MECLIPSE-333 ]
          Hide
          Arnaud HERITIER added a comment -

          We have to check how these 2 issues can be fixed. I will open a branch to add the support of WTP-2.0

          Show
          Arnaud HERITIER added a comment - We have to check how these 2 issues can be fixed. I will open a branch to add the support of WTP-2.0
          Arnaud HERITIER made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Arnaud HERITIER added a comment -

          Fixed in MECLIPSE-333

          Show
          Arnaud HERITIER added a comment - Fixed in MECLIPSE-333
          Arnaud HERITIER made changes -
          Resolution Duplicate [ 3 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 10:00:37 UTC 2015 [ 1428228037919 ]
          Mark Thomas made changes -
          Workflow jira [ 12720674 ] Default workflow, editable Closed status [ 12750940 ]
          Mark Thomas made changes -
          Flags Patch [ 10430 ]
          Patch Submitted Yes [ 10763 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 23:47:18 UTC 2015 [ 1428277638729 ]
          Mark Thomas made changes -
          Workflow jira [ 12958132 ] Default workflow, editable Closed status [ 12995012 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          198d 21h 52m 1 Arnaud HERITIER 14/Nov/07 16:37
          In Progress In Progress Closed Closed
          1d 10h 12m 1 Arnaud HERITIER 16/Nov/07 02:50

            People

            • Assignee:
              Arnaud HERITIER
              Reporter:
              Geir Pettersen
            • Votes:
              39 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development