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

I see import package statements in  org.eclipse.equinox.security_1.0.200.v20090520-1800.  The metadata generator doesn't do an analysis on the classes themselves.

For the javax.security.auth.spi package, you need an IU to represent the execution environment.  This is generally done automatically for products,  by default there is a "a.jre.javase" version="1.6.0" IU which provides the packages for that EE.  We have code that generates these IUs for any execution environment, but we don't currently have any command line tools or ant tasks to do it.  The simplest way to get the IU would be to mirror it out of another repo that already contains it, or to run a product build to get one generated.


From: Don Laidlaw <Don.Laidlaw@xxxxxxxxx>
To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
Date: 12/16/2009 03:02 PM
Subject: [p2-dev] Specify required execution environment
Sent by: p2-dev-bounces@xxxxxxxxxxx

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
p2-dev mailing list