5

Simple. Here is the felix plugin in the maven pom.xml:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>

        <!-- allows the route to be ran via 'mvn camel:run' -->
        <!-- <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-maven-plugin</artifactId> 
            <version>2.10.1</version> </plugin> -->

        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Bundle-SymbolicName>xyz</Bundle-SymbolicName>
                     <Export-Package>tutorial.simplerouter</Export-Package>
                </instructions>
            </configuration>
        </plugin>
    </plugins>
</build>`

and it doesn't generate the MANIFEST.MF file properly:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: rb
Build-Jdk: 1.6.0_35

Above the generated manifest.mf which is not correct.

Please tell me why.

f_puras
  • 2,521
  • 4
  • 33
  • 38
rb8680
  • 279
  • 2
  • 3
  • 11

2 Answers2

6

Maybe a bit late, but I had a similar problem once. I solved by adding <packaging>bundle</packaging> to the POM.

Will
  • 24,082
  • 14
  • 97
  • 108
DevJimbo
  • 98
  • 1
  • 9
  • This was exactly my problem, I still had `jar` specified, which means the bundle plugin is simply ignored without warnings. – Adrian Baker Aug 13 '16 at 04:45
0

Maven-bundle-plugin needs to be configured with "supportedProjectTypes" i.e

            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <version>5.1.4</version>
            <extensions>true</extensions>
            <configuration>
              <supportedProjectTypes>
                <supportedProjectType>bundle</supportedProjectType>
                <supportedProjectType>war</supportedProjectType>
                <supportedProjectType>jar</supportedProjectType>
              </supportedProjectTypes>          
              <instructions>
    ...
jherkel
  • 71
  • 1
  • 6