Sandbox OSGi runtime

2010-03-03 Thread Tommaso Teofili
Hi all,
what do you think of a uimaj module similar to uimaj-ep-runtime just for
sandbox components (something like sanxbox-osgi-runtime)?
This is useful when you want to use Sandbox components in an OSGi
environment.
Cheers.
Tommaso


Re: Sandbox OSGi runtime

2010-03-03 Thread Marshall Schor
would it make sense to have individual osgi packaging of sandbox annotators?

(I'm assuming you're thinking about annotators, not about other things,
right?)

-Marshall

On 3/3/2010 9:03 AM, Tommaso Teofili wrote:
> Hi all,
> what do you think of a uimaj module similar to uimaj-ep-runtime just for
> sandbox components (something like sanxbox-osgi-runtime)?
> This is useful when you want to use Sandbox components in an OSGi
> environment.
> Cheers.
> Tommaso
>
>   


Re: Sandbox OSGi runtime

2010-03-04 Thread Tommaso Teofili
Hi Marshall

2010/3/3 Marshall Schor 

> would it make sense to have individual osgi packaging of sandbox
> annotators?
>

Do you mean you prefer not to have a single module aggregating all
annotators in a single bundle and you'd prefer each annotator having its own
individual OSGi bundle?


>
> (I'm assuming you're thinking about annotators, not about other things,
> right?)
>

Yes, right.

Cheers.
Tommaso


Re: Sandbox OSGi runtime

2010-03-05 Thread Jörn Kottmann

Tommaso Teofili wrote:

Hi all,
what do you think of a uimaj module similar to uimaj-ep-runtime just for
sandbox components (something like sanxbox-osgi-runtime)?
This is useful when you want to use Sandbox components in an OSGi
environment.
  


Not sure how this can be done, since UIMA must be able to load
the AEs from an OSGi bundle, but then we have all the issues we
discussed a while back.

http://mail-archives.apache.org/mod_mbox/incubator-uima-dev/201001.mbox/

Jörn


Re: Sandbox OSGi runtime

2010-03-05 Thread Marshall Schor


On 3/4/2010 3:00 AM, Tommaso Teofili wrote:
> Hi Marshall
>
> 2010/3/3 Marshall Schor 
>
>   
>> would it make sense to have individual osgi packaging of sandbox
>> annotators?
>>
>> 
> Do you mean you prefer not to have a single module aggregating all
> annotators in a single bundle and you'd prefer each annotator having its own
> individual OSGi bundle?
>   

Yes.  Some of the annotators have very large (could be 100's of
megabytes, for instance) statistical models.

-Marshall
>
>   
>> (I'm assuming you're thinking about annotators, not about other things,
>> right?)
>>
>> 
> Yes, right.
>
> Cheers.
> Tommaso
>
>   


Re: Sandbox OSGi runtime

2010-03-10 Thread Tommaso Teofili
2010/3/6 Marshall Schor 

>
>
> On 3/4/2010 3:00 AM, Tommaso Teofili wrote:
> > Hi Marshall
> >
> > 2010/3/3 Marshall Schor 
> >
> >
> >> would it make sense to have individual osgi packaging of sandbox
> >> annotators?
> >>
> >>
> > Do you mean you prefer not to have a single module aggregating all
> > annotators in a single bundle and you'd prefer each annotator having its
> own
> > individual OSGi bundle?
> >
>
> Yes.  Some of the annotators have very large (could be 100's of
> megabytes, for instance) statistical models.
>

I just made myself a multi module Maven project containing one module for
each of the Sandbox annotators so that one can select which annotators to
install on an OSGi runtime but at the same time they are tied together
inside a unique project.
Each module contains only the POM which uses the Maven Felix plugin to
produce the annotator bundle (more or less like in uimaj-ep-runtime).
I am doing some tests with this approach using some of these bundled
annotators with Apache Clerezza.
Tommaso


Re: Sandbox OSGi runtime

2010-03-25 Thread Tommaso Teofili
Back again,

2010/3/10 Tommaso Teofili 
>
>  I am doing some tests with this approach using some of these bundled
> annotators with Apache Clerezza.
>
>
Tests seem to go well using OpenCalaisAnnotator and AlchemyAPIAnnotator
bundles generated with Maven Felix plugin.
I've temporarily put the POMs on a GC SVN [1] so that you can view and
comment this approach.
What do you think?

Cheers,
Tommaso

[1] :
http://code.google.com/p/osgi-uima-sandbox/source/browse/#svn/trunk/osgi-uima-sandbox


Re: Sandbox OSGi runtime

2010-03-25 Thread Marshall Schor
Seems like a reasonable approach (caveat: I'm not really up-to-date with
the use-cases).

Is it possible to factor out any (i.e., most) of the felix bundle plugin
configuration into the parent pom? 

-Marshall

On 3/25/2010 4:17 AM, Tommaso Teofili wrote:
> Back again,
>
> 2010/3/10 Tommaso Teofili 
>   
>>  I am doing some tests with this approach using some of these bundled
>> annotators with Apache Clerezza.
>>
>>
>> 
> Tests seem to go well using OpenCalaisAnnotator and AlchemyAPIAnnotator
> bundles generated with Maven Felix plugin.
> I've temporarily put the POMs on a GC SVN [1] so that you can view and
> comment this approach.
> What do you think?
>   
> Cheers,
> Tommaso
>
> [1] :
> http://code.google.com/p/osgi-uima-sandbox/source/browse/#svn/trunk/osgi-uima-sandbox
>
>   


Re: Sandbox OSGi runtime

2010-04-03 Thread Tommaso Teofili
2010/3/25 Marshall Schor 

> Seems like a reasonable approach (caveat: I'm not really up-to-date with
> the use-cases).
>
> Is it possible to factor out any (i.e., most) of the felix bundle plugin
> configuration into the parent pom?


Good point Marshall.
I tried to do so but it seems the  tag cannot be defined
partially (something on the parent POM and something else inside the child
POM) so I thought using Maven properties could be a solution in order to
define some fixed values for  inside the parent POM.

Parent POM:

org.apache.uima,*
*;scope=compile;inline=true
singleton:=true
J2SE-1.5
true
registered
true
META-INF
  

Inside the child POM only Export-package and Bundle-SymbolicName are
defined:
...

  ${manifest-location}
  
<_nouses>${nouses}
org.apache.uima.lucas.*
${import-package}
${embed-dependency}

 org.apache.uima.lucas;${singleton}

 
${jre}
${ext-api}
${buddy-policy}
  

..

Waiting for your comments about it.
Tommaso

P.S.:
In Apache Clerezza the AlchemyAPI and OpenCalais annotators are used at this
moment to enable auto tagging of resources.


Re: Sandbox OSGi runtime

2010-04-03 Thread Marshall Schor


On 4/3/2010 5:14 AM, Tommaso Teofili wrote:
> 2010/3/25 Marshall Schor 
>
>   
>> Seems like a reasonable approach (caveat: I'm not really up-to-date with
>> the use-cases).
>>
>> Is it possible to factor out any (i.e., most) of the felix bundle plugin
>> configuration into the parent pom?
>> 
>
> Good point Marshall.
> I tried to do so but it seems the  tag cannot be defined
> partially (something on the parent POM and something else inside the child
> POM)

hmm, not sure why this didn't work for you. I was able to get something
like this to work:
I set up a trial set of poms - a parent and a child. 

In the parent I put the items that I wanted to be inherited in a
 element:



  

  org.apache.felix
  maven-bundle-plugin
  
  1.4.0
  true
  
META-INF

  <_nouses>true
  org.apache.uima,*
 
*;scope=compile;inline=true
 
org.apache.uima.bsf;singleton:=true
 
J2SE-1.5
  true
  registered

  
 

  

  

In the child I put the items that were specific to that one child:

  

   
org.apache.uima.bsf_${uimaj-release-eclipse-version}


  
org.apache.felix
maven-bundle-plugin
   


  
   
org.apache.uima.annotator.bsf.*
  
   
org.apache.uima.bsf;${singleton}
   
  

  

  


Then, when I did mvn help:effective-pom on the child it showed that the
parent configuration was successfully merged with the child result:

 
   org.apache.felix
   maven-bundle-plugin
   1.4.0
   true
   
 
   org.apache.uima.annotator.bsf.*
  
org.apache.uima.bsf;${singleton}
   <_nouses>true
   org.apache.uima,*
   *;scope=compile;inline=true
  
J2SE-1.5
   true
   registered
 
 META-INF
   
 


>  so I thought using Maven properties could be a solution in order to
> define some fixed values for  inside the parent POM.
>
> Parent POM:
> 
> org.apache.uima,*
> *;scope=compile;inline=true
> singleton:=true
> J2SE-1.5
> true
> registered
> true
> META-INF
>   
>
> Inside the child POM only Export-package and Bundle-SymbolicName are
> defined:
> ...
> 
>   ${manifest-location}
>   
> <_nouses>${nouses}
> org.apache.uima.lucas.*
> ${import-package}
> ${embed-dependency}
>
>  org.apache.uima.lucas;${singleton}
>
>  
> ${jre}
> ${ext-api}
> ${buddy-policy}
>   
> 
> ..
>
> Waiting for your comments about it.
> Tommaso
>
> P.S.:
> In Apache Clerezza the AlchemyAPI and OpenCalais annotators are used at this
> moment to enable auto tagging of resources.
>   
Great! :-)

-Marshall


Re: Sandbox OSGi runtime

2010-04-04 Thread Tommaso Teofili
It seems I missed something with the previous configuration.
Modifying POMs using your approach everything is still working and better
looking.
Thanks very much Marshall.
What do you think of creating the sandbox-osgi-runtime (multi-module)
project on the Sandbox so that everyone can use such generated bundles?
Happy Easter to everyone.
Tommaso


Re: Sandbox OSGi runtime

2010-04-04 Thread Marshall Schor


On 4/4/2010 5:32 AM, Tommaso Teofili wrote:
> It seems I missed something with the previous configuration.
> Modifying POMs using your approach everything is still working and better
> looking.
> Thanks very much Marshall.
> What do you think of creating the sandbox-osgi-runtime (multi-module)
> project on the Sandbox so that everyone can use such generated bundles?
>   

+1.  I think there is a (slowly?) growing interest in OSGi - see, for
instance, the latest info in the apache felix project [1] and in
particular, the newer, possibly unreleased subprojects [2].  There are
efforts there in the Apache Felix Commons subproject  [3] to do more or
less what you are trying to do here - it would be good to confirm these
approaches are aligned :-).

-Marshall
> Happy Easter to everyone.
> Tommaso
>
>   
[1] http://felix.apache.org/site/index.html
[2] http://felix.apache.org/site/subprojects.html
[3] http://felix.apache.org/site/apache-felix-commons.html


Re: Sandbox OSGi runtime

2010-04-06 Thread Tommaso Teofili
Nice one!
It seems a nice effort from the Felix community and it looks like it's
perfectly aligned with what we are trying to do (a POM with a dependency on
the library to bundle and the  Maven Felix plugin for the configuration of
the bundle), so we may choose one of two ways: contribute such POMs to Felix
Commons (but we'd need to change the group-id to org.apache.felix.commons) or
have them deployed inside our SVN and "linked" (having UIMA listed as one of
the supporting libraries) to the Felix Commons project.
Since we already have OSGi versions of core framework inside our SVN to
support Eclipse plugins we may go for the second option.
So if we agree I could start a thread on Felix ML to let them know about
this effort.
What do you think?
Have a nice day.
Tommaso

2010/4/4 Marshall Schor 
>
>
> +1.  I think there is a (slowly?) growing interest in OSGi - see, for
> instance, the latest info in the apache felix project [1] and in
> particular, the newer, possibly unreleased subprojects [2].  There are
> efforts there in the Apache Felix Commons subproject  [3] to do more or
> less what you are trying to do here - it would be good to confirm these
> approaches are aligned :-).
>
> -Marshall
>
> [1] http://felix.apache.org/site/index.html
> [2] http://felix.apache.org/site/subprojects.html
> [3] http://felix.apache.org/site/apache-felix-commons.html
>