[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Specify required execution environment

Title: Specify required execution environment
I have created a feature including a few equinox bundles for an eventual server container driven by equinox. I have exported this feature and others into a p2 repository. That works fine.

I can see some requirements in the metadata for the org.eclipse.equinox.security IU. Namely:

<requires size='18'>        <required namespace='java.package' name='javax.crypto' range='0.0.0'/>        <required namespace='java.package' name='javax.crypto.spec' range='0.0.0'/>        <required namespace='java.package' name='javax.security.auth' range='0.0.0'/>        <required namespace='java.package' name='javax.security.auth.callback' range='0.0.0'/>        <required namespace='java.package' name='javax.security.auth.login' range='0.0.0'/>        <required namespace='java.package' name='javax.security.auth.spi' range='0.0.0'/>        <required namespace='java.package' name='org.eclipse.core.internal.runtime' range='0.0.0'/>        <required namespace='java.package' name='org.eclipse.core.runtime' range='0.0.0'/>        <required namespace='java.package' name='org.eclipse.core.runtime.jobs' range='0.0.0'/>        <required namespace='java.package' name='org.eclipse.core.runtime.preferences' range='0.0.0'/>        <required namespace='java.package' name='org.eclipse.osgi.framework.log' range='[1.0.0,2.0.0)'/>        <required namespace='java.package' name='org.eclipse.osgi.service.datalocation' range='[1.0.0,2.0.0)'/>        <required namespace='java.package' name='org.eclipse.osgi.service.debug' range='[1.0.0,2.0.0)'/>        <required namespace='java.package' name='org.eclipse.osgi.service.environment' range='[1.1.0,2.0.0)'/>        <required namespace='java.package' name='org.eclipse.osgi.util' range='[1.1.0,2.0.0)'/>        <required namespace='java.package' name='org.osgi.framework' range='[1.4.0,2.0.0)'/>        <required namespace='java.package' name='org.osgi.service.prefs' range='[1.1.0,2.0.0)'/>        <required namespace='java.package' name='org.osgi.util.tracker' range='[1.3.3,2.0.0)'/>      </requires>
This is the org.eclipse.equinox.security bundle version 1.2.0.I20090522-1010.

It looks like the metadata generator got those requirements not from the manifest, but by analyzing the classes in the bundle, because the bundle manifest has no package imports, only required bundles. But that is not my question :)

I am trying to install a feature with this bundle a few different ways (installer, agent and director) and none work. They all complain that there is no provider of the javax.security.auth.spi package. For example the agent output is:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Equinox OSGi Core and Runtime Bundles Feature 3.5.0.r001 (com.infor.container.equinox.core.feature.feature.group 3.5.0.r001)
  Missing requirement: Equinox Java Authentication and Authorization Service (JAAS) 1.0.100.v20090520-1800 (org.eclipse.equinox.security 1.0.100.v20090520-1800) requires 'package javax.security.auth.spi 0.0.0' but it could not be found
  Cannot satisfy dependency:
    From: Equinox OSGi Core and Runtime Bundles Feature 3.5.0.r001 (com.infor.container.equinox.core.feature.feature.group 3.5.0.r001)
    To: org.eclipse.core.net [1.2.0.I20090522-1010]
  Cannot satisfy dependency:
    From: Internet Connection Management 1.2.0.I20090522-1010 (org.eclipse.core.net 1.2.0.I20090522-1010)
    To: bundle org.eclipse.equinox.security [1.0.0,2.0.0)

We intend to run this with Java 1.6, and I expect the boot classloader to provide those packages. How do I tell the installer, agent, and directory that this will be the case?

Best Regards,

Don Laidlaw | Sr. Research Engineer |
Infor | office: +1 902-576-5185 | mobile: +1 902-401-6771 | don.laidlaw@xxxxxxxxx