Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-225

Manifest Entries in execution elements are completely ignored

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Auto Closed
    • Affects Version/s: maven-archiver-2.4
    • Fix Version/s: None
    • Component/s: maven-archiver
    • Labels:
      None
    • Environment:
      MS Win7

      Description

      When multiple executions are used, (for example when deploying a test-jar as well) execution specific Manifest entries are not used. Only "Global" configurations are used.

      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>2.4</version>
      <configuration>
      <archive>
      <manifest>
      <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
      </manifest>
      <manifestEntries>
      <!-- These entries are specific to deployable jar only. -->
      <!--
      <Premain-Class>com.demo.vm.plugins.Agent</Premain-Class>
      <Agent-Class>com.demo.vm.plugins.Agent</Agent-Class>
      <Boot-Class-Path>asm-4.0.jar</Boot-Class-Path>
      -->
      </manifestEntries>
      </archive>
      </configuration>
      <executions>
      <execution>
      <id>vm</id>
      <configuration>
      <!-- This set of entries are ignored -->
      <archive>
      <manifest>
      <addClasspath>true</addClasspath>
      <!-- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
      <classpathPrefix>Boot-</classpathPrefix> -->
      </manifest>
      <manifestEntries>
      <Premain-Class>com.demo.vm.plugins.Agent</Premain-Class>
      <Agent-Class>com.demo.vm.plugins.Agent</Agent-Class>
      <Boot-Class-Path>asm-4.0.jar</Boot-Class-Path>
      </manifestEntries>
      </archive>
      </configuration>
      <goals>
      <goal>jar</goal>
      </goals>
      </execution>
      <execution>
      <id>test</id>
      <goals>
      <goal>test-jar</goal>
      </goals>
      </execution>
      </executions>
      </plugin>
      NOTE: Versions after 2.4 do not seem to be available from the main repositories? 2.4 was the latest I was able to download.

        Activity

        Hide
        Michael Osipov added a comment -

        This issue has been auto closed because it has been inactive for a long period of time. If you think this issue still applies, retest your problem with the most recent version of Maven and the affected component, reopen and post your results.

        Show
        Michael Osipov added a comment - This issue has been auto closed because it has been inactive for a long period of time. If you think this issue still applies, retest your problem with the most recent version of Maven and the affected component, reopen and post your results.

          People

          • Assignee:
            Unassigned
            Reporter:
            Stephen Davidson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development