On 2/24/11 10:28, Alex Karasulu wrote:
Hi Richard,
On Thu, Feb 24, 2011 at 4:30 PM, Richard S. Hall<[email protected]> wrote:
I am not sure how the instance of the framework is being created, but if you
are creating it directly then it won't see configuration properties that are
set as system properties. However, if the launcher is used to start the
framework, then the launcher automatically copies any configuration
properties from the system properties.
I am manually passing in the configuration property for the extra
system packages before initializing Felix. Right now I just statically
pass in the comma delimited set of fixed packages and it works like a
champ.
The problem is when the host application uses exported interfaces in
the plugin bundles. In dynamic environments where users drop in plugin
bundles that I do not know of in advance I have to dynamically build
the set of system packages.
I was thinking of this possible solution:
(1) scan manifests of jars on the classpath
(2) if the jar is a bundle, add that bundle's Import-Package elements
to the system package extras configuration setting value
This works for at initialization time which is sufficient for my
needs. Wondering if there's an easier way to do this without writing
rot code like this.
I guess I don't totally understand. For starters, I don't understand how
the host application can use exported packages from the plugins, since
this isn't something so easy to accomplish. Then I don't really
understand how you cannot know which plugins are involved, since this is
a testing scenario it sounds. Perhaps we are using different terminology
or I am just not seeing the overall architecture of the situation.
Sorry.
-> richard
Best,
Alex
On 02/24/2011 01:14 AM, Alex Karasulu wrote:
Hi all,
I have a situation where I would like to set the
FelixConstants.FRAMEWORK_SYSTEMPACKAGES_EXTRA property in my pom for
use with surefire. I would like to supply all the packages that would
be on the Import-Packages attribute if the manifest is generated for
everything on the "test" classpath.
I have a class that embeds Felix for plugins in one module. Then
another integration test module tests that Felix embedding class. The
problem is I get CCE exceptions if I access plugin interfaces to test
the plugin so I would like to have the build construct the list of
extra system packages so I don't have to manually update these values
in the code.
Is there a hack anyone uses for this?
Thanks in advance,
Alex