Uploaded image for project: 'PUBLIC - Liferay Maven'
  1. PUBLIC - Liferay Maven
  2. MAVEN-145

Liferay portlet archetype references wrong Servlet and JSP API versions

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.2.0 GA1
    • Fix Version/s: None
    • Component/s: Archetypes
    • Labels:

      Description

      Summary
      -------------

      The Liferay Portlet archetype (version 6.2) references old Servlet and JSP API versions that differ from what is included in the actual Liferay bundles.

      Description
      ----------------

      Looking at a source bundle for Liferay 6.2 (https://github.com/liferay/liferay-portal/blob/6.2.2-ga3/lib/versions.xml), you can see that the following versions are in place for the JSP API and the servlet API:

      • lib/development/jsp-api.jar 2.1
      • lib/development/servlet-api.jar 3.0.1

      However, the dependencies specified in the archetype (https://github.com/liferay/liferay-maven-support/blob/6.2.10.11/archetypes/liferay-portlet-archetype/src/main/resources/archetype-resources/pom.xml) are:

      • jsp-api 2.0
      • servlet-api 2.4

      What is provided in the Maven archetype should correspond to what is provided by Liferay to prevent the usage of potentially incompatible APIs.

      Possible resolutions
      ----------------------------

      It may be possible that more recent APIs were not bundled in the archetype because some Java EE 6 artifacts (Servlet 3 is part of Java EE 6) are hard to find, if nonexistent, in "separated" forms.

      If this is the case, JBoss produced Java EE 6 artifacts for pretty much each part of the spec, including Servlet, JSP and JSTL. They may be JBoss-prefixed in their name, but they do contain standard Java EE 6 APIs.

      Discussion
      ---------------

      Forum thread where this was initially discussed : https://www.liferay.com/fr/community/forums/-/message_boards/message/50396052

      The thread also discusses API version choices and how they could be more consistent with what the application servers provide. Feedback would be very much appreciated on that thread.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                5 years, 19 weeks ago

                Packages

                Version Package