Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-266

Manifest container for WebArchive should be WEB-INF/classes/META-INF

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0-beta-3
    • 1.0.0-alpha-12
    • impl-base
    • None

      This issue is a regression of SHRINKWRAP-186. The location of the ManifestContainer for a WebArchive should be /WEB-INF/classes/META-INF, not /META-INF. This location is backed up by our target locations per archive type page.

      http://community.jboss.org/wiki/Containerrootsperspecarchive

      A sample use case is bundling a persistence.xml in a web archive:

      WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war")
         .addAsManifestResource("test-persistence.xml", "persistence.xml");
      System.out.println(war.toString(true));
      

      Current output:

      test.war
      /META-INF/
      /META-INF/persistence.xml
      

      Expected output:

      test.war
      /WEB-INF/
      /WEB-INF/classes/
      /WEB-INF/classes/persistence.xml
      

      This also breaks the ServiceLoader registrations, as they appear in /META-INF/services/ rather than in /WEB-INF/classes/META-INF/services/

              tommysdk Tommy Tynjä (Inactive)
              dan.j.allen Dan Allen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: