felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart McCulloch" <stuart.mccull...@jayway.net>
Subject Re: Include resource in maven-bundle-plugin
Date Wed, 14 May 2008 04:05:03 GMT
2008/5/14 Saminda Abeyruwan <samindaa@gmail.com>:

> Hi Devs,
>
> In my pom.xml I have a dependency to a zip file
>
> <dependency>
>            <groupId>foo</groupId>
>            <artifactId>bar</artifactId>
>            <version>SNAPSHOT</version>
>            <type>zip</type>
>        </dependency>
>
> This zip file contains resource inside META-INF/rr directory,
>
> Following line is present in maven-bundle-pluing
>
> <Include-Resource>
>                            @bar-SNAPSHOT.zip!/META-INF/rr/*
>                        </Include-Resource>
>
> But the build fails saying
>
> Can not find JAR file bar-SNAPSHOT.zip
> [ERROR] Error(s) found in bundle configuration
>

yes, I tried this just now and it looks like Maven doesn't add the 'zip'
artifact to the compilation classpath, which is why Bnd can't find it.

according to this issue, zipfile support is in Maven 2.1 but not 2.0.x:

   http://jira.codehaus.org/browse/MNG-1683

however, you could try inlining this artifact using Embed-Dependency:

   <Embed-Dependency>bar;inline=true</Embed-Dependency>

unfortunately at the moment this will inline the complete zip - it won't
allow you to select a subset of the zip, although this feature could be
added - feel free to raise an feature request for this at:

   http://issues.apache.org/jira/browse/FELIX/component/12311143

you can find more details about Embed-Dependency here:

   http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

HTH

Is there a way provide a zip file to this location.
>
>
> Thank you!
>
> Saminda
>
> --
> Saminda Abeyruwan
>
> Senior Software Engineer
> WSO2 Inc. - www.wso2.org
>



-- 
Cheers, Stuart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message