There is code in EquinoxHost.start():
// Test if the configuration/config.ini or osgi.bundles has
been set
// If yes, try to avoid discovery of bundles
if (bundleLocations == null) {
if (props.getProperty("osgi.bundles") != null) {
bundleLocations = Collections.emptySet();
} else {
String config =
props.getProperty(LocationManager.PROP_CONFIG_AREA);
File ini = new File(config, "config.ini");
if (ini.isFile()) {
Properties iniProps = new Properties();
iniProps.load(new FileInputStream(ini));
if (iniProps.getProperty("osgi.bundles") !=
null) {
bundleLocations = Collections.emptySet();
}
}
}
}
If the bundleLocations is not null, then the findBundleLocations() will not
try to discover the bundles.
Can you debug to see if the test is expected?
Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Tuesday, June 09, 2009 3:20 AM
To: <[email protected]>
Subject: Re: ** WARNING ** node-impl2 can cause hard to diagnose errors with
OSGi
Digging in this some more I couldn't get it to work using the
config.ini created in the distribution, is that what you mean by ATM
it uses a list of files not the osgi.bundles format?
Debugging through what happens isn't the problem caused by line 431 in
EquinoxHost which calls
bundleLocations = runtimeClasspathEntries(true, false,
true);
where the last "true" means useModulesDirectory so simply changing
that to be false should fix this problem when running a maven build?
...ant
On Wed, Jun 3, 2009 at 4:46 PM, Raymond Feng<[email protected]> wrote:
We use the same syntax as Equinox:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
For -configuration, please see the
<distro>/all/target/features/configuration/config.ini.
java org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher
-configuration <configuration folder>
java org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher -bundles
<bundles> (ATM, we support a list of files. I'll fix it to use the
Equinox
osgi.bundles format)
Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Wednesday, June 03, 2009 2:22 AM
To: "Raymond Feng" <[email protected]>
Cc: <[email protected]>
Subject: Re: ** WARNING ** node-impl2 can cause hard to diagnose errors
with
OSGi
On Sat, May 23, 2009 at 6:09 PM, Raymond Feng <[email protected]>
wrote:
There are already two options to control the discovery:
1) -configuration (or osgi.configuration.area system property):
Pointing
to
an equinox configuration folder that contains a config.ini which lists
all
the bundles
2) -bundles: Pointing to a list of files (we can enhance it to support
URLs)
for OSGi bundles
Thanks,
Raymond
Do we have and doc on these or examples showing how to use them?
...ant