Details

    • Type: Sub-task Sub-task
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: WTP integration
    • Labels:
      None
    • Environment:
      Windows Vista, Eclipse 3.4.x, WTP 3.0.2, m2eclipse 0.9.7, default workspace JDK 5.0
    • Number of attachments :
      0

      Description

      I've run into an issue when converting existing projects (created in Eclipse as Dynamic Web projects with a corresponding EAR projects) to using m2eclipse.

      Steps to reproduce issue:
      1. Create a Dynamic Web Project in Eclipse ("TestProject"). Click add project to add project to an EAR project ("TestProjectEAR"). Accept all defaults.
      2. Add a dummy class to the "src" source folder.
      2. Maven-->Enable Dependency Management

      Issues:
      1. All source folders are now removed from the project. You can manually go back to add these to the POM file and to the Eclipse project configuration, but it would be nice if m2eclipse could detect these.
      2. The "src" folder now gets /main/webapp/. Not a big deal.
      3. Error on TestProject: "Dynamic Web Project 2.5 requires Java 5.0 or newer." If you check in "Project Facets" Dynamic Web Module 2.4 is unchecked, but Java 5.0 is. However, the project configuration "Java Compiler" is set to application-specific with the settings configured for Java 1.4 (note that the JDK 5.0 is my default workspace JRE, so this was changed by "Enable Dependency Management"). I also get a warning that the MAVEN2_CLASSPATH_CONTAINER will not be exported/published (because the .classpath entry does not have the appropriate child elements).
      4. Error on TestProjectEAR: "Deployment descriptor of module "TestProject.war" cannot be loaded or found."

      Doing a Maven-->Update Project

      So, to try to get things working, I...

      1. change the pom.xml to use "src" as source and "build/classes" as output (the default for the project).
      2. Revert the project to using Java 5.0 and Dynamic Web Module 2.4 facet.
      3. Do a Maven-->Update Project Configuration.

      I am still seeing the same errors. After some .classpath hacking I can get the errors on "TestProject" to disappear, but not the error on "TestProjectEAR". The project will not run on Tomcat if I use the Eclipse Tomcat run configuration.

        Activity

        Hide
        Eugene Kuleshov added a comment -

        Brennan, please note that "enable dependency management" action does NOT perform full conversion of Eclipse project configuration back to pom.xml. Please vote on MNGECLIPSE-781

        Currently you have to manually edit pom.xml so it would work with Maven outside of Eclipse. Once it is done, you can enable dependency management od use Maven / Update project configuration to bring Eclipse settings in line with pom.xml

        As an alternative, instead of using WTP wizards to create web projects , you could use New Maven Project wizard and select corresponding Archetype, e.g. the webapp one, so your project will have initial pom.xml created and WTP config will be done for you automatically.

        Show
        Eugene Kuleshov added a comment - Brennan, please note that "enable dependency management" action does NOT perform full conversion of Eclipse project configuration back to pom.xml. Please vote on MNGECLIPSE-781 Currently you have to manually edit pom.xml so it would work with Maven outside of Eclipse. Once it is done, you can enable dependency management od use Maven / Update project configuration to bring Eclipse settings in line with pom.xml As an alternative, instead of using WTP wizards to create web projects , you could use New Maven Project wizard and select corresponding Archetype, e.g. the webapp one, so your project will have initial pom.xml created and WTP config will be done for you automatically.

          People

          • Assignee:
            Unassigned
            Reporter:
            Brennan Spies
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: