Apache Tomcat Maven Plugin
  1. Apache Tomcat Maven Plugin
  2. MTOMCAT-215

Multiple manifests under META-INF, two Main-Class entries

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: tomcat7
    • Labels:
      None

      Description

      Relates to this post: http://www.mail-archive.com/users@tomcat.apache.org/msg104817.html

      When using the -standalone jar / war mojos and looked into the artifact that they produced, I noticed that the META-INF directory contained mulitple MANIFEST.MF entries. I know that the zip archive format supports this, but I'm worried that it may produce undesirable behaviour as two of the manifest entries define a Main-Class. I'm uncertain how a winner is determined when -jar is the only option provided via command line.

      Additionally, for users who unzip an archive to make modifications, they could potentially blow-away the desirable manifest when manifests are overwritten to the same location on disk, thus crippling the executable jar / war functionality.

        Activity

        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        applied.
        Thanks!

        Show
        Olivier Lamy (*$^¨%`£) added a comment - applied. Thanks!
        Hide
        Tim Astle added a comment -

        There are also multiple LICENSE and NOTICE files under the META-INF, but I was less concerned about those as I can't see those causing any potential technical issues. Worst case, on unzip, those files are overwritten or renamed.

        Show
        Tim Astle added a comment - There are also multiple LICENSE and NOTICE files under the META-INF, but I was less concerned about those as I can't see those causing any potential technical issues. Worst case, on unzip, those files are overwritten or renamed.
        Hide
        Tim Astle added a comment -

        This patch prevents MANIFEST.MF files from being included in the final package.

        Do you know of a better way to do this? I kinda peeked around the commons compression API and JAR API, but nothing stood out.

        Show
        Tim Astle added a comment - This patch prevents MANIFEST.MF files from being included in the final package. Do you know of a better way to do this? I kinda peeked around the commons compression API and JAR API, but nothing stood out.

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            Tim Astle
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development