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 m...@schor.com


 +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



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-03 Thread Tommaso Teofili
2010/3/25 Marshall Schor m...@schor.com

 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 configuration 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 configuration inside the parent POM.

Parent POM:
properties
import-packageorg.apache.uima,*/import-package
embed-dependency*;scope=compile;inline=true/embed-dependency
singletonsingleton:=true/singleton
jreJ2SE-1.5/jre
ext-apitrue/ext-api
buddy-policyregistered/buddy-policy
nousestrue/nouses
manifest-locationMETA-INF/manifest-location
  /properties

Inside the child POM only Export-package and Bundle-SymbolicName are
defined:
...
configuration
  manifestLocation${manifest-location}/manifestLocation
  instructions
_nouses${nouses}/_nouses
Export-Packageorg.apache.uima.lucas.*/Export-Package
Import-Package${import-package}/Import-Package
Embed-Dependency${embed-dependency}/Embed-Dependency

 Bundle-SymbolicNameorg.apache.uima.lucas;${singleton}/Bundle-SymbolicName

 
Bundle-RequiredExecutionEnvironment${jre}/Bundle-RequiredExecutionEnvironment
Eclipse-ExtensibleAPI${ext-api}/Eclipse-ExtensibleAPI
Eclipse-BuddyPolicy${buddy-policy}/Eclipse-BuddyPolicy
  /instructions
/configuration
..

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 m...@schor.com

   
 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 configuration 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
pluginManagement element:

build
pluginManagement
  plugins
plugin
  groupIdorg.apache.felix/groupId
  artifactIdmaven-bundle-plugin/artifactId
  !-- version 1.4.0 to support _nouses instruction --
  version1.4.0/version
  extensionstrue/extensions
  configuration
manifestLocationMETA-INF/manifestLocation
instructions
  _nousestrue/_nouses
  Import-Packageorg.apache.uima,*/Import-Package
 
Embed-Dependency*;scope=compile;inline=true/Embed-Dependency
 
Bundle-SymbolicNameorg.apache.uima.bsf;singleton:=true/Bundle-SymbolicName
 
Bundle-RequiredExecutionEnvironmentJ2SE-1.5/Bundle-RequiredExecutionEnvironment
  Eclipse-ExtensibleAPItrue/Eclipse-ExtensibleAPI
  Eclipse-BuddyPolicyregistered/Eclipse-BuddyPolicy
/instructions
  /configuration
 
/plugin
  /plugins
/pluginManagement
  /build

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

  build

   
finalNameorg.apache.uima.bsf_${uimaj-release-eclipse-version}/finalName

plugins
  plugin
groupIdorg.apache.felix/groupId
artifactIdmaven-bundle-plugin/artifactId
   
configuration

  instructions
   
Export-Packageorg.apache.uima.annotator.bsf.*/Export-Package
  
   
Bundle-SymbolicNameorg.apache.uima.bsf;${singleton}/Bundle-SymbolicName
   
  /instructions
/configuration
  /plugin
/plugins
  /build


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

 plugin
   groupIdorg.apache.felix/groupId
   artifactIdmaven-bundle-plugin/artifactId
   version1.4.0/version
   extensionstrue/extensions
   configuration
 instructions
   Export-Packageorg.apache.uima.annotator.bsf.*/Export-Package
  
Bundle-SymbolicNameorg.apache.uima.bsf;${singleton}/Bundle-SymbolicName
   _nousestrue/_nouses
   Import-Packageorg.apache.uima,*/Import-Package
   Embed-Dependency*;scope=compile;inline=true/Embed-Dependency
  
Bundle-RequiredExecutionEnvironmentJ2SE-1.5/Bundle-RequiredExecutionEnvironment
   Eclipse-ExtensibleAPItrue/Eclipse-ExtensibleAPI
   Eclipse-BuddyPolicyregistered/Eclipse-BuddyPolicy
 /instructions
 manifestLocationMETA-INF/manifestLocation
   /configuration
 /plugin


  so I thought using Maven properties could be a solution in order to
 define some fixed values for configuration inside the parent POM.

 Parent POM:
 properties
 import-packageorg.apache.uima,*/import-package
 embed-dependency*;scope=compile;inline=true/embed-dependency
 singletonsingleton:=true/singleton
 jreJ2SE-1.5/jre
 ext-apitrue/ext-api
 buddy-policyregistered/buddy-policy
 nousestrue/nouses
 manifest-locationMETA-INF/manifest-location
   /properties

 Inside the child POM only Export-package and Bundle-SymbolicName are
 defined:
 ...
 configuration
   manifestLocation${manifest-location}/manifestLocation
   instructions
 _nouses${nouses}/_nouses
 Export-Packageorg.apache.uima.lucas.*/Export-Package
 Import-Package${import-package}/Import-Package
 Embed-Dependency${embed-dependency}/Embed-Dependency

  Bundle-SymbolicNameorg.apache.uima.lucas;${singleton}/Bundle-SymbolicName

  
 Bundle-RequiredExecutionEnvironment${jre}/Bundle-RequiredExecutionEnvironment
 Eclipse-ExtensibleAPI${ext-api}/Eclipse-ExtensibleAPI
 Eclipse-BuddyPolicy${buddy-policy}/Eclipse-BuddyPolicy
   /instructions
 /configuration
 ..

 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-03-25 Thread Tommaso Teofili
Back again,

2010/3/10 Tommaso Teofili tommaso.teof...@gmail.com

  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 tommaso.teof...@gmail.com
   
  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-10 Thread Tommaso Teofili
2010/3/6 Marshall Schor m...@schor.com



 On 3/4/2010 3:00 AM, Tommaso Teofili wrote:
  Hi Marshall
 
  2010/3/3 Marshall Schor m...@schor.com
 
 
  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-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/b917db631001280112v1a9b2d27if068b0c1ba5f7...@mail.gmail.com

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 m...@schor.com

   
 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-04 Thread Tommaso Teofili
Hi Marshall

2010/3/3 Marshall Schor m...@schor.com

 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


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