Note that if you're building a WAB, you don't need the WEB-INF/classes
and WEB-INF/lib, you can simply have them in the root and not export
them.   The location is significant in JEE, but not in OSGi.

On Wed, Nov 10, 2010 at 15:47, Michael Prieß
<[email protected]> 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
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

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

Reply via email to