Uploaded image for project: 'Maven Eclipse Plugin (RETIRED)'
  1. Maven Eclipse Plugin (RETIRED)
  2. MECLIPSE-595

jst.web facet is inconsistently determined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.7
    • None
    • WTP support
    • None

    Description

      The first problem is the plugin chooses the wrong facet when it sees certain dependencies.
      The second is that even explicit facet choices won't override this, and merely create a duplicate entry in the generated .settings file. At the very least there should be some sort of warning text.

      ______________

      If you have the dependency:

      <dependency>
      	<groupId>javax.servlet</groupId>
      	<artifactId>servlet-api</artifactId>
      	<version>2.5</version>
      	<scope>provided</scope>
      </dependency>
      

      The plugin will correctly create a jst.web facet of 2.5. However, this feature breaks down when it encounters:

      <dependency>
      	<groupId>org.apache.tomcat</groupId>
      	<artifactId>servlet-api</artifactId>
      	<version>6.0.18</version>
      	<scope>provided</scope>
      </dependency>
      

      And the plugin will chose a jst.web version of 6.0, which thoroughly confuses Eclipse. In fact, you can't fix the problem without manually editing the org.eclipse.wst.common.project.facet.core.xml file because Eclipse's GUI is paralyzed by it.

      This may be the wrong dependency to have, but the behavior is undocumented ( ? ) and caused me to waste a lot of time trying to figure out what was going on. There should at least be some sort of warning.

      ____________________

      Lastly, if you try to use additionalProjectnatures to fix the problem...

      <additionalProjectFacets>
      	<jst.web>2.5</jst.web>
      </additionalProjectFacets>
      

      You get an even more broken org.eclipse.wst.common.project.facet.core.xml that repeats the facet twice.

      faceted-project>
        <fixed facet="jst.java"/>
        <fixed facet="jst.web"/>
        <installed facet="jst.web" version="6.0"/>
        <installed facet="jst.java" version="5.0"/>
        <installed facet="jst.web" version="2.5"/>
      </faceted-project>
      

      __________________

      Requested fix:
      1. When the jst.web version is "autodetected", have an INFO or DEBUG line about it.
      2. If the jst.web faced is explicit in the plugin configuration, it should override and replace the autodetected version.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dhager Darien Hager
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: