You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Kristian Köhler <kr...@googlemail.com> on 2009/04/28 10:09:27 UTC

Building Bundle Jar for test jar with maven-bundle-plugin

Hi

is there a way to build two bundle artifacts for a project? One for
the "normal" classes and one for the "test" classes.

Currently maven builds to jars for me (normal-1.0.jar,
normal-1.0-tests.jar) and both should be enhanced with OSGi metadata.
Is there a good way to do this?

Thanks
Kristian

-- 
http://www.kkoehler.com

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


Re: Building Bundle Jar for test jar with maven-bundle-plugin

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/4/28 Kristian Köhler <kr...@googlemail.com>

> Thanks! Looks interesting... ;-)
>

FYI, another option is to use something like Pax-Exam to run your OSGi
tests:

   http://wiki.ops4j.org/display/paxexam/Pax+Exam

it also lets you run the same tests on a mixture of different OSGi
frameworks

Kristian
>
> 2009/4/28  <Cl...@raibau.at>:
> >> Is there a good way to do this?
> > It depends on what you understand by "good". I had to write a plugin that
> > extends the maven-bundle-plugin only to include the test classes and
> > dependencies (the maven-bundle-plugin clearly states that "test scoped
> > dependencies are not included in the classpath seen by BND"), and since
> > this extension worked, for me the solution was "good". If you need to do
> > the same (I hope not) you can find the methods you need to overwrite
> here:
> >
> http://code.google.com/p/maven-yapp-plugin/source/browse/trunk/src/main/java/at/raibau/pdebuilder/PdeTestBundleMojo.java
> >
> > ______________________________________
> > Diese E-Mail kann vertrauliche und geschuetzte Informationen enthalten.
> Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns
> unverzueglich zu informieren und sie zu loeschen.
> >
> > This e-mail message may contain information, which is confidential and
> protected. If you are not the intended recipient of this message, we ask you
> to inform us immediately and delete the message afterwards.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>
>
>
> --
> http://www.kkoehler.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart

Re: Building Bundle Jar for test jar with maven-bundle-plugin

Posted by Kristian Köhler <kr...@googlemail.com>.
Thanks! Looks interesting... ;-)

Kristian

2009/4/28  <Cl...@raibau.at>:
>> Is there a good way to do this?
> It depends on what you understand by "good". I had to write a plugin that
> extends the maven-bundle-plugin only to include the test classes and
> dependencies (the maven-bundle-plugin clearly states that "test scoped
> dependencies are not included in the classpath seen by BND"), and since
> this extension worked, for me the solution was "good". If you need to do
> the same (I hope not) you can find the methods you need to overwrite here:
> http://code.google.com/p/maven-yapp-plugin/source/browse/trunk/src/main/java/at/raibau/pdebuilder/PdeTestBundleMojo.java
>
> ______________________________________
> Diese E-Mail kann vertrauliche und geschuetzte Informationen enthalten. Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns unverzueglich zu informieren und sie zu loeschen.
>
> This e-mail message may contain information, which is confidential and protected. If you are not the intended recipient of this message, we ask you to inform us immediately and delete the message afterwards.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
http://www.kkoehler.com

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


Antwort: Building Bundle Jar for test jar with maven-bundle-plugin

Posted by Cl...@raibau.at.
> Is there a good way to do this?
It depends on what you understand by "good". I had to write a plugin that 
extends the maven-bundle-plugin only to include the test classes and 
dependencies (the maven-bundle-plugin clearly states that "test scoped 
dependencies are not included in the classpath seen by BND"), and since 
this extension worked, for me the solution was "good". If you need to do 
the same (I hope not) you can find the methods you need to overwrite here:
http://code.google.com/p/maven-yapp-plugin/source/browse/trunk/src/main/java/at/raibau/pdebuilder/PdeTestBundleMojo.java

______________________________________
Diese E-Mail kann vertrauliche und geschuetzte Informationen enthalten. Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns unverzueglich zu informieren und sie zu loeschen. 

This e-mail message may contain information, which is confidential and protected. If you are not the intended recipient of this message, we ask you to inform us immediately and delete the message afterwards.

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