I have had issues using war plugin and bundle plugin together. If you search this forum, you shall find some discussion about the same and reference to a bug in bundle plugin. As a work around, I don't specify Bundle-ClassPath using maven-bundle-plugin, I specify it using war plugin's manifestEntries section. I know this is not an optimal solution, but I found it to be better than any other that I know of.

Sahoo
On Wednesday 10 November 2010 08:17 PM, Michael Prieß wrote:
After reading the OSGi Enterprise 4.2 part over Web Archive Bundles (WAB). I
started to change the pom.xml packaging from war into bundle. Added the
maven-bundle-plugin and the maven-war-plugin to get the manifest after
generation into the war.

Generating the import and exports with the packaging bundle works fine, but
i have a problem to add the Bundle-ClassPath to the manifest. If i uncomment
the Bundle-ClassPath i get the following error:

"Cannot find a file or directory for Bundle-Classpath entry:
WEB-INF/classes"

I comprehend why the bundle-plugin throw this error. But how did i get the
Bundle-Classpath into my manifest ? I tried something around with Peter
Kriens BND Tool which  provide some directives wab and wablib but nothing
happen and im not sure if i use this directives right.

If i use as packaging war manifest generation with Bundle-Classpath works
fine, but export and imports are not complete. Know anyone a solution how to
resolve this problem ?

Part of my pom.xml:

             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <version>2.1.0</version>
                 <extensions>true</extensions>
                 <configuration>

<manifestLocation>${project.build.directory}/MANIFEST/</manifestLocation>

<excludeDependencies>*;scope=provided</excludeDependencies>
                     <instructions>
                         <!--<Import-Package>*</Import-Package>  -->
                         <Export-Package>!*</Export-Package>
                         <!--
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>  -->
                         <Embed-Directory>WEB-INF/lib</Embed-Directory>
                         <_wab></_wab>

<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
                         <!--<Web-ContextPath>geoserver</Web-ContextPath>
<Webapp-Context>geoserver</Webapp-Context>  -->
                     </instructions>
                     <executions>
                         <execution>
                             <id>bundle-manifest</id>
                             <phase>process-classes</phase>
                             <goals>
                                 <goal>manifest</goal>
                             </goals>
                         </execution>
                     </executions>
                 </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <version>2.1.0</version>
                 <executions>
                     <execution>
                         <id>bundle-manifest</id>
                         <phase>process-classes</phase>
                         <goals>
                             <goal>manifest</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>

Cheers,

Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to