Announcement Announcement Module
Collapse
No announcement yet.
Generate MANIFEST file using maven-bundle-plugin ?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Generate MANIFEST file using maven-bundle-plugin ??

    Hi,

    I'm confronted to the following problem(s).

    I create a maven project that I use to package my WAR project for Spring DM server. When I launch the command 'mvn package', my war is well created but
    a) the MANIFEST file (generated by bnd = maven-bundle-plugin) is created inside the folder WEB-INF and not at the root of the project

    - META-INF
    MANIFEST.MF (does not contain OSGI commands)
    - WEB-INF
    CLASSES
    META-INF
    MANIFEST.MF (generated by bnd)

    Is there a way to instruct the plugin that the MANIFEST must be created for the WAR project and not the java classes ?
    b) <import-bundle> or <import-library> are not added to the manifest. <import-bundle> and <import-libary> tags have been added in the <instructions> tag of the maven-bundle-plugin.

    How can the plugin process <import-bundle> or <import-library> instructions ?

    KR,

    Charles Moulliard

  • #2
    configuring the MANIFEST.MF location

    In case anyone finds this post via Google, the answer is to configure the maven-war-plugin to explicitly set the manifest location:

    Code:
    <plugin>
      <groupId>org.apache.felix</groupId>
      <artifactId>maven-bundle-plugin</artifactId>
      <configuration>
        <supportedProjectTypes>
          <supportedProjectType>bundle</supportedProjectType>
          <supportedProjectType>war</supportedProjectType>
        </supportedProjectTypes>
      </configuration>
      <executions>
        <execution>
          <id>bundle-manifest</id>
          <phase>process-classes</phase>
          <goals>
            <goal>manifest</goal>
          </goals>
          <configuration>
            <!-- config and instructions here -->
          </configuration>
        </execution>
      </executions>
    </plugin>
    
    <plugin>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
        <archive>
          <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
        </archive>
      </configuration>
    </plugin>

    Comment

    Working...
    X