Oha, forgot to add ops4j to receivers :)

---------- Forwarded message ----------
From: Andreas Pieber <anpie...@gmail.com>
Date: Tue, Apr 5, 2011 at 5:07 AM
Subject: Re: mvn pax:provision - How to provision from only
provision/pom.xml file only and not from other pom dependencies
To: Matt Madhavan <mattmadha...@gmail.com>


The problem is that pax-construct currently has no option to ignore
all projects in a workspace. So you have two options:

a) provide a patch for pax-construct adding an additional option to do so

- you have to patch pax-construct
+ you can do a mvn clean install pax:provision in "one step"

b) create a new maven profile excluding all modules except for the
provision pom.xml

- you have to do clean install and pax:provision in two different
steps because e.g. pax:provision have to be called with -Pprovision
+ you don't have to change pax-construct ;)

An additional (complete workaround; actually that what I did during
using pax-construct + felix instead of karaf) option is to split your
entire workspace into profiles. Basically, if you create modules in a
project you want to have them included in the runtime at some point at
least --> create a maven profile including only those modules and a
pax-construct config. Then you can do

mvn clean install pax:provision -PenvOne
mvn clean install pax:provision -PotherEnv

Hope this helps
Kind regards,
Andreas

On Mon, Apr 4, 2011 at 11:10 PM, Matt Madhavan <mattmadha...@gmail.com> wrote:
> Hi Andreas,
> I'm not quite clear of what you are trying to explain. Could you please
> elaborate a bit more?
>
> What I'm trying to do is controll what bundles get provisioned into the
> runner/bundles folder. So I want to provision ONLY the bundles which are
> defined as dependencies inside provisioin/pom.xml.
>
> Any ideas on this will be greately appreciated. I'm very close to implement
> OSGi development process/best practices for my client based on PAX!
>
> Thanks in advance!
> Matt
>
> On Apr 4, 2011 11:07 AM, "Andreas Pieber" <anpie...@gmail.com> wrote:
>> Not really. We controlled the environment by using maven profiles.
>> Maybe this is also applicable for your situation?
>>
>> Kind regards,
>> Andreas
>>
>> On Fri, Apr 1, 2011 at 6:46 PM, Matt Madhavan <mattmadha...@gmail.com>
>> wrote:
>>> Hello,
>>> I'm in the process of setting up development guidelines for my client.
>>> I create osgi project by :mvn org.ops4j:maven-pax-plugin:create-project
>>> I import the necessary bundles by : mvn pax:import-bundle   and it
>>> updates
>>> the provision/pom.xml file as expected.
>>> I create additional custom bundles by mvn pax:create-bundle and update
>>> their
>>> pom's with necessary dependencies as required.
>>> When I run mvn  pax:provision -Drunner=1.6.1 -Dplatform=felix  it
>>> provisions
>>> all my bundles (Created by the command above) and it goes thro' all the
>>> custom (my bundles) pom.xml file and provisions all the dependencies from
>>> there.
>>> This results in some unwatnted behaviour. If I'm testing against both
>>> equinox and felix then some times both their container bundles are loaded
>>> by
>>> pax-runner.
>>> I want to control this. I do not want this behaviour some times. Is there
>>> any way I can provision only from provision/pom.xml file ONLY?
>>> Any help will be appreciated!
>>> Thanks in advance!
>>> Matt
>>>
>>> _______________________________________________
>>> general mailing list
>>> general@lists.ops4j.org
>>> http://lists.ops4j.org/mailman/listinfo/general
>>>
>>>
>

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to