manifest goal of maven-bundle-plugin ignores _include instruction

View: New views
1 Messages — Rating Filter:   Alert me  

manifest goal of maven-bundle-plugin ignores _include instruction

by Sahoo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It appears to me that if I just invoke *manifest* goal of
maven-bundle-plugin, it ignores *_include* instruction, where as if I
use *bundle* goal, it is used by the plugin. There are various ways to
test it. The easiest seems to be using a non-existent file name.
Attached are two sets of pom files, pom.xml uses bundle goal, where as
pom.xml.notworking uses manifest goal. While using the first one, bnd
complains about missing osgi.bundle3 file, where as it does not report
any such error while using the first one. That makes me think that the
manifest Mojo is not sending the file name to bnd.

Is <_include> not supposed to be used with manifest goal?

Thanks,
Sahoo



<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>sahoo</groupId>
  <artifactId>maven-bundle-plugin-test2</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <url>http://maven.apache.org</url>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <_include>osgi.bundle3</_include>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <id>bundle-bundle</id>
            <phase>package</phase>
            <goals>
              <goal>bundle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi_R4_core</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>sahoo</groupId>
  <artifactId>maven-bundle-plugin-test2</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <url>http://maven.apache.org</url>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <_include>osgi.bundle3</_include>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi_R4_core</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
LightInTheBox - Buy quality products at wholesale price