aldana wrote:
> 
> that would be another nice thing, but the more important one is that i 
> can work with maven-generated bundles inside eclipse an hook in 
> eclipse's OSGi runtime environment. these days is not able to work with 
> it: when generating bundle with embedded dependencies these are put 
> inside target/classes but this layout is not accepted by OSGi eclipse. 
> it always wants to have the dependencies under <rootFolderOfProject>.
> because of this i always need to copy the embedded dependencies from 
> target/classes to <rootFolderOfProject> and do a refresh inside eclipse.
> 

FYI, the approach used in Pax-Construct is to unpack the embedded
dependencies
under the target folder, and then refactor the bundle manifest when it's
copied to
the project root, so the Bundle-ClassPath points to the right jarfiles in
Eclipse/PDE

For example:

   Bundle-ClassPath: .,kxml2-2.2.2.jar

is transformed (in the Eclipse/PDE generated manifest) to:

   Bundle-ClassPath: .,target/pax-eclipse,target/pax-eclipse/kxml2-2.2.2.jar

You can try this out by downloading the scripts from the link on this
website:

   http://www.ops4j.org/projects/pax/construct

adding them to your path, and running the following instructions:

   pax-create-bundle -p my.example.pkg
   cd my.example.pkg
   pax-embed-jar -g net.sf.kxml -a kxml2 -v 2.2.2
   mvn pax:clean install pax:eclipse

you should end up with an example bundle with kXML embedded inside.

FYI, you can also use pax-create-project to create a multi-module project,
for example:

   pax-create-project -g foo -a bar
   cd bar
   pax-create-bundle -p my.example.pkg
   pax-create-bundle -p another.pkg
   ...etc...

anyway, all the sources are available via the website (all ASLv2) and it
uses the maven
eclipse plugin v2.4 underneath (with a runtime patch to do the various
refactorings).

hope this of some interest - ping me if you want more details :)


aldana wrote:
> it would be much more convenient if m2eclipse could do following behind 
> the scenes when starting or debugging an application:
> 1) generate a bundle
> 2) embedding dependencies so eclipse OSGi environment can find them.
> 
> Eugene Kuleshov schrieb:
>>
>>  I see. So, you basically need a wizard or maybe a Maven archetype to 
>> generate preconfigured project for such configuration? Or there is 
>> something else I missed?
>>
>>  regards,
>>  Eugene
>>
>>
>> [EMAIL PROTECTED] wrote:
>>> > Manuel, can you please elaborate what OSGi integration you are 
>>> looking for? We are planning few things, but it would be great to 
>>> hear first-hand requirements
>>> > before we'll go wild.
>>>
>>> oh yes, no problem. for that i do cite a post i did on a felix 
>>> mailinglist, which should show what i would like to have featured in 
>>> m2eclipse. in case it is unclear just tell, i then will go into more 
>>> details.
>>>
>>> ----POST-CITATION-START-----
>>> i managed to generate a bundle which lets itself install and start on 
>>> commandline osgi-container. for the developing phase of course i 
>>> would like to use OSGi runtime inside eclipse IDE, so debugging is 
>>> possible and implement/run cycle is short.
>>>
>>> i am building my bundle with maven bundle-plugin and following settings:
>>>
>>> <instructions>
>>> ...
>>> <Embed-Transitive>true</Embed-Transitive>
>>>
>>> <Embed-Dependency>*;groupId=!org.eclipse.equinox;inline=false</Embed-Dependency>
>>>  
>>>
>>> ...
>>> </instructions>
>>>
>>> basically running my osgi bundle inside eclipse works if i add 
>>> generated manifest to <rootFolderOfProject>/META-INF and if i layout 
>>> embedded dependencies (see settings above) in <rootFolderOfProject> 
>>> too (as stated in generated MANIFEST.MF). of course this manual 
>>> actions are too much and hence not doable when developing.
>>>
>>> has anybody experience/suggestions in getting the bundle for release 
>>> right and working inside eclipse IDE with same maven-bundle-plugin 
>>> settings (dependencies are referenced correctly and correct path of 
>>> MANIFEST.MF is set when doing RunAs...->OSGiStartup)?
>>> ----POST-CITATION-END---
>>>
>>> it would be great if m2eclipse would tell my osgi bundle settings to 
>>> eclipse's OSGi platform, so no manual interactions or workarounds are 
>>> neccessary.
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
> 
> 
> -- 
>  manuel aldana
>  [EMAIL PROTECTED]
>  homepage: www.aldana-online.de
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 

-- 
View this message in context: 
http://www.nabble.com/osgi-embed-feature-m2eclipse-plugin-tp13666172s177p14577294.html
Sent from the Maven Eclipse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to