Uploaded image for project: 'Maven Archetype Bundles'
  1. Maven Archetype Bundles
  2. MARCHETYPES-35

Cleaner handling of javaee-endorsed-api dependency

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Maven Webapp Archetype
    • None
    • Tested on Ubuntu w/ JDK 6 & Maven 2.2.1; XP, JDK 6, 3.0-beta-2.
    • Patch

    Description

      The current archetypes for Java EE 6 WAR or EJB projects use the technique of prepending to the bootclasspath in order to use newer EE APIs in place of older SE APIs. There are two problems with this hack:

      1. It relies on sun.boot.class.path and so must be activated only in a profile for Sun JDKs.

      2. The artifacts listed as dependencies (currently just one) must be written twice (in order to force a download), risking inconsistency.

      I have a patch that uses -endorseddirs in conjunction with maven-dependency-plugin, which seems to be the preferred idiom judging by internet search hits I have found for people struggling with endorsed libraries in Maven, although MNG-4752 would be the preferred long-term solution. Please consider applying for the 1.2 versions of the archetypes.

      https://netbeans.org/bugzilla/show_bug.cgi?id=185139#c16 explains why adjusting the Surefire execution environment accordingly is not possible.

      Attachments

        Activity

          People

            mkleint Milos Kleint
            jglick Jesse N. Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: