You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by bokie <jm...@gmail.com> on 2013/10/13 15:38:48 UTC

Maven, BNDTools, Blueprint

Hi,

I'm currently trying to package a project using the maven-bundle-plugin, but
the Bundle-Blueprint header isn't making it into the final jar.

I'm using eclipse with a maven project and the project also has the
"BNDTools Project Nature" set. My parent pom looks like this:
============================================
<plugin>
   <groupId>org.apache.felix</groupId>
   <artifactId>maven-bundle-plugin</artifactId>
   <version>2.4.0</version>
   <configuration>
      <instructions>
        <_include>bnd.bnd</_include>
      </instructions>
   </configuration>
</plugin>
============================================

my project pom looks like this:
============================================
<plugin>
   <groupId>org.apache.felix</groupId>
   <artifactId>maven-bundle-plugin</artifactId>
   <extensions>true</extensions>
</plugin>
============================================

my project bnd.bnd looks like this:
============================================
Private-Package: j.p.j.consumer
Bundle-Version: 1.0.0
Export-Package:
Bundle-Blueprint: OSGI-INF/blueprint/*.xml
============================================

After issuing the "mvn clean package" command my final MANIFEST.MF looks
like this
============================================
Manifest-Version: 1.0
Bnd-LastModified: 1381668321898
Build-Jdk: 1.7.0_40
Built-By: bokie
Bundle-ManifestVersion: 2
Bundle-Name: j.p.j.consumer
Bundle-SymbolicName: j.p.j.consumer
Bundle-Version: 1.0.0
Created-By: Apache Maven Bundle Plugin
Import-Package: javax.jms;version="[2.0,3)",javax.naming,org.osgi.framew
 ork;version="[1.6,2)"
Tool: Bnd-2.1.0.20130426-122213
============================================

I expected the Bundle-Blueprint header to be copied to the final MANIFEST.MF
but it isn't.

Regards,
Jorge




--
View this message in context: http://apache-felix.18485.x6.nabble.com/Maven-BNDTools-Blueprint-tp5005534.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven, BNDTools, Blueprint

Posted by bokie <jm...@gmail.com>.
Hi Christian,

The thought had also crossed my mind, I've already tried changing: 
  Bundle-Blueprint: OSGI-INF/blueprint/*.xml to Bundle-Blueprint:
OSGI-INF/bp/*.xml but to no avail.

Jorge




--
View this message in context: http://apache-felix.18485.x6.nabble.com/Maven-BNDTools-Blueprint-tp5005534p5005539.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven, BNDTools, Blueprint

Posted by Christian Schneider <ch...@die-schneider.net>.
I never use a blueprint header in my projects and just copy the
blueprint contexts into the default location.
This seems to work fine.

So maybe the bundle plugin detects that you set the default value and so
simple leaves the header out. You could try to use another location to
see if it is set then.

Christian

Am 13.10.2013 15:38, schrieb bokie:
> Hi,
>
> I'm currently trying to package a project using the maven-bundle-plugin, but
> the Bundle-Blueprint header isn't making it into the final jar.
>
> I'm using eclipse with a maven project and the project also has the
> "BNDTools Project Nature" set. My parent pom looks like this:
> ============================================
> <plugin>
>    <groupId>org.apache.felix</groupId>
>    <artifactId>maven-bundle-plugin</artifactId>
>    <version>2.4.0</version>
>    <configuration>
>       <instructions>
>         <_include>bnd.bnd</_include>
>       </instructions>
>    </configuration>
> </plugin>
> ============================================
>
> my project pom looks like this:
> ============================================
> <plugin>
>    <groupId>org.apache.felix</groupId>
>    <artifactId>maven-bundle-plugin</artifactId>
>    <extensions>true</extensions>
> </plugin>
> ============================================
>
> my project bnd.bnd looks like this:
> ============================================
> Private-Package: j.p.j.consumer
> Bundle-Version: 1.0.0
> Export-Package:
> Bundle-Blueprint: OSGI-INF/blueprint/*.xml
> ============================================
>
> After issuing the "mvn clean package" command my final MANIFEST.MF looks
> like this
> ============================================
> Manifest-Version: 1.0
> Bnd-LastModified: 1381668321898
> Build-Jdk: 1.7.0_40
> Built-By: bokie
> Bundle-ManifestVersion: 2
> Bundle-Name: j.p.j.consumer
> Bundle-SymbolicName: j.p.j.consumer
> Bundle-Version: 1.0.0
> Created-By: Apache Maven Bundle Plugin
> Import-Package: javax.jms;version="[2.0,3)",javax.naming,org.osgi.framew
>  ork;version="[1.6,2)"
> Tool: Bnd-2.1.0.20130426-122213
> ============================================
>
> I expected the Bundle-Blueprint header to be copied to the final MANIFEST.MF
> but it isn't.
>
> Regards,
> Jorge
>
>
>
>
> --
> View this message in context: http://apache-felix.18485.x6.nabble.com/Maven-BNDTools-Blueprint-tp5005534.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


-- 
 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org