Jetty
  1. Jetty
  2. JETTY-504

"mvn eclipse:eclipse" do not give JSP-support in jetty project

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 6.1.7
    • Fix Version/s: None
    • Component/s: Maven
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When generating Eclipse projects with "mvn eclipse:eclipse" the resulting Jetty project does not have jsp-2.1 as a project in the build path, so when invoking Main JSP compilation is not supported. Workaround: Add jsp-2.1 project manually to the jetty project build path.

        Activity

        Hide
        Jan Bartel added a comment -

        Thorbjørn,

        AFAIK, the eclipse plugin should generate eclipse build path entries for all of your dependencies. So, if you have a dependency for the jsp-api-2.1 with <scope>provided</scope>, then that should show up in the eclipse build path.

        That won't allow you to compile jsps when running Jetty via a Main class, so you'd need to also have a dependency for the jsp-2.1 jar with <scope>runtime</scope>. If you've already got those dependencies on your project, but the eclipse plugin isn't generating build-path entries for them, then I think you need to raise a bug over on the Maven issue tracker.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Thorbjørn, AFAIK, the eclipse plugin should generate eclipse build path entries for all of your dependencies. So, if you have a dependency for the jsp-api-2.1 with <scope>provided</scope>, then that should show up in the eclipse build path. That won't allow you to compile jsps when running Jetty via a Main class, so you'd need to also have a dependency for the jsp-2.1 jar with <scope>runtime</scope>. If you've already got those dependencies on your project, but the eclipse plugin isn't generating build-path entries for them, then I think you need to raise a bug over on the Maven issue tracker. cheers Jan
        Hide
        Thorbjørn Ravn Andersen added a comment -

        I may not have been clear enough. I have run "mvn eclipse:eclipse in the unpacked jetty source tree, not my own code, to get Eclipse up and running on the distribution quickly.

        It is the resulting projects from this, that I have noticed that the "jsp-2.1" project is not in the "jetty" project build path (to get JSP compilation at runtime, not the API).

        Show
        Thorbjørn Ravn Andersen added a comment - I may not have been clear enough. I have run "mvn eclipse:eclipse in the unpacked jetty source tree, not my own code, to get Eclipse up and running on the distribution quickly. It is the resulting projects from this, that I have noticed that the "jsp-2.1" project is not in the "jetty" project build path (to get JSP compilation at runtime, not the API).
        Hide
        Jan Bartel added a comment -

        Thorbjørn,

        If you do "mvn eclipse:eclipse" at the top level of the jetty project, then the individual submodules will generate eclipse project files. You can then import each module you want into eclipse. The jsp-2.1 and jsp-api-2.1 subprojects are definintely importable into eclipse. I'm not sure what "jetty" project build path you're referring to - if you mean the eclipse project generated from modules/jetty, then it is correct that no jsp jars are on it's build path, as jsp is not required to build that submodule.

        If you've got an eclipse project that you'd like to use with jetty, and you've already got jetty in eclipse, then you can select whichever jetty sub-projects you need on your classpath. A minimum is jetty, jetty-util and servlet-api-2.5. If you want to do jsp compilation at runtime, then you'll either need jsp-2.0 or jsp-2.1 and their respective api modules as well.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Thorbjørn, If you do "mvn eclipse:eclipse" at the top level of the jetty project, then the individual submodules will generate eclipse project files. You can then import each module you want into eclipse. The jsp-2.1 and jsp-api-2.1 subprojects are definintely importable into eclipse. I'm not sure what "jetty" project build path you're referring to - if you mean the eclipse project generated from modules/jetty, then it is correct that no jsp jars are on it's build path, as jsp is not required to build that submodule. If you've got an eclipse project that you'd like to use with jetty, and you've already got jetty in eclipse, then you can select whichever jetty sub-projects you need on your classpath. A minimum is jetty, jetty-util and servlet-api-2.5. If you want to do jsp compilation at runtime, then you'll either need jsp-2.0 or jsp-2.1 and their respective api modules as well. cheers Jan
        Hide
        Jan Bartel added a comment -

        Please reopen if you have further comments to make.
        cheers
        Jan

        Show
        Jan Bartel added a comment - Please reopen if you have further comments to make. cheers Jan

          People

          • Assignee:
            Unassigned
            Reporter:
            Thorbjørn Ravn Andersen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: