Update the framework launching API to support the latest version of the spec
and to support META-INF/services for the framework factory.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@749768 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/pom.xml b/framework/pom.xml
index cf4d3d1..492e450 100644
--- a/framework/pom.xml
+++ b/framework/pom.xml
@@ -65,7 +65,7 @@
<Export-Package>org.osgi.framework;-split-package:=merge-first,org.osgi.framework.launch,org.osgi.framework.hooks.service,org.osgi.service.packageadmin,org.osgi.service.url,org.osgi.service.startlevel,org.osgi.util.tracker</Export-Package>
<Private-Package>org.apache.felix.moduleloader.*,org.apache.felix.framework.*</Private-Package>
<Import-Package>!*</Import-Package>
- <Include-Resource>META-INF/LICENSE=LICENSE,META-INF/NOTICE=NOTICE,{src/main/resources/},org/osgi/framework/=target/classes/org/osgi/framework/</Include-Resource>
+ <Include-Resource>META-INF/services/org.osgi.framework.launch.FrameworkFactory=org.osgi.framework.launch.FrameworkFactory,META-INF/LICENSE=LICENSE,META-INF/NOTICE=NOTICE,{src/main/resources/},org/osgi/framework/=target/classes/org/osgi/framework/</Include-Resource>
</instructions>
</configuration>
</plugin>
diff --git a/framework/src/main/java/org/osgi/framework/launch/Framework.java b/framework/src/main/java/org/osgi/framework/launch/Framework.java
index a8d542c..4174e86 100644
--- a/framework/src/main/java/org/osgi/framework/launch/Framework.java
+++ b/framework/src/main/java/org/osgi/framework/launch/Framework.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,260 +24,236 @@
import org.osgi.framework.FrameworkEvent;
/**
- * The System Bundle for a Framework instance.
- *
- * The <i>main</i> class of a framework implementation must implement this
- * interface. The instantiator of the framework implementation class then has a
- * System Bundle object and can then use the methods of this interface to manage
- * and control the created framework instance.
+ * A Framework instance. A Framework is also known as a System Bundle.
*
* <p>
- * The <i>main</i> class of a framework implementation must provide a public
- * constructor that takes a single argument of type <code>Map</code>. This
- * configuration argument provides this System Bundle with framework properties
- * to configure the framework instance. The framework instance must also examine
- * the system properties for framework properties which are not set in the
- * configuration argument. A framework property in the configuration argument
- * with a <code>null</code> value indicates the framework property is
- * <i>unset</i> and the system properties must not be examined for a value of
- * the framework property. This allows the configuration argument to
- * <i>unset</i> framework properties in the system properties .
- * <p>
- * If framework properties are not provided by the configuration argument or the
- * system properties, this System Bundle must use some reasonable default
- * configuration appropriate for the current VM. For example, the system
- * packages for the current execution environment should be properly exported.
- * The configuration argument may be <code>null</code>. The framework instance
- * must copy any information needed from the configuration argument since the
- * configuration argument can be changed after the framework instance has been
- * created.
- *
- * <p>
- * A newly constructed System Bundle must be in the {@link #INSTALLED} state.
+ * Framework instances are created using a {@link FrameworkFactory}. The methods
+ * of this interface can be used to manage and control the created framework
+ * instance.
*
* @ThreadSafe
- * @version $Revision: 5686 $
+ * @version $Revision: 6361 $
*/
public interface Framework extends Bundle {
/**
- * Initialize this System Bundle. After calling this method, this System
- * Bundle must:
+ * Initialize this Framework. After calling this method, this Framework
+ * must:
* <ul>
* <li>Be in the {@link #STARTING} state.</li>
* <li>Have a valid Bundle Context.</li>
- * <li>Have its framework instance be at start level 0.</li>
- * <li>Have event handling enabled in its framework instance.</li>
- * <li>Have reified Bundle objects for all bundles installed in its
- * framework instance.</li>
- * <li>Register framework services. For example, <code>PackageAdmin</code>,
- * <code>ConditionalPermissionAdmin</code>, <code>StartLevel</code>.</li>
+ * <li>Be at start level 0.</li>
+ * <li>Have event handling enabled.</li>
+ * <li>Have reified Bundle objects for all installed bundles.</li>
+ * <li>Have registered any framework services. For example,
+ * <code>PackageAdmin</code>, <code>ConditionalPermissionAdmin</code>,
+ * <code>StartLevel</code>.</li>
* </ul>
*
* <p>
- * This System Bundle will not actually be started until {@link #start()
- * start} is called.
+ * This Framework will not actually be started until {@link #start() start}
+ * is called.
*
* <p>
- * This method does nothing if called when this System Bundle is in the
+ * This method does nothing if called when this Framework is in the
* {@link #STARTING}, {@link #ACTIVE} or {@link #STOPPING} states.
*
- * @throws BundleException If this System Bundle could not be initialized.
+ * @throws BundleException If this Framework could not be initialized.
+ * @throws SecurityException If the Java Runtime Environment supports
+ * permissions and the caller does not have the appropriate
+ * <code>AdminPermission[this,EXECUTE]</code> or if there is a
+ * security manager already installed and the
+ * {@link Constants#FRAMEWORK_SECURITY} configuration property is
+ * set.
+ *
*/
- public void init() throws BundleException;
+ void init() throws BundleException;
/**
- * Wait until this System Bundle has completely stopped. The
- * <code>stop</code> and <code>update</code> methods on a System Bundle
- * performs an asynchronous stop of the System Bundle. This method can be
- * used to wait until the asynchronous stop of this System Bundle has
- * completed. This method will only wait if called when this System Bundle
- * is in the {@link #STARTING}, {@link #ACTIVE}, or {@link #STOPPING}
- * states. Otherwise it will return immediately.
+ * Wait until this Framework has completely stopped. The <code>stop</code>
+ * and <code>update</code> methods on a Framework performs an asynchronous
+ * stop of the Framework. This method can be used to wait until the
+ * asynchronous stop of this Framework has completed. This method will only
+ * wait if called when this Framework is in the {@link #STARTING},
+ * {@link #ACTIVE}, or {@link #STOPPING} states. Otherwise it will return
+ * immediately.
* <p>
- * A Framework Event is returned to indicate why this System Bundle has
- * stopped.
+ * A Framework Event is returned to indicate why this Framework has stopped.
*
- * @param timeout Maximum number of milliseconds to wait until this System
- * Bundle has completely stopped. A value of zero will wait
+ * @param timeout Maximum number of milliseconds to wait until this
+ * Framework has completely stopped. A value of zero will wait
* indefinitely.
* @return A Framework Event indicating the reason this method returned. The
* following <code>FrameworkEvent</code> types may be returned by
* this method.
* <ul>
- * <li>{@link FrameworkEvent#STOPPED STOPPED} - This System Bundle
- * has been stopped which has shutdown its framework instance. </li>
+ * <li>{@link FrameworkEvent#STOPPED STOPPED} - This Framework has
+ * been stopped. </li>
+ *
* <li>{@link FrameworkEvent#STOPPED_UPDATE STOPPED_UPDATE} - This
- * System Bundle has been updated which has shutdown and will
- * restart its framework instance.</li> <li>
- * {@link FrameworkEvent#STOPPED_BOOTCLASSPATH_MODIFIED
- * STOPPED_BOOTCLASSPATH_MODIFIED} - This System Bundle has been
- * stopped which has shutdown its framework instance and a
- * bootclasspath extension bundle has been installed or updated. The
- * VM must be restarted in order for the changed boot class path to
- * take affect. </li> <li>{@link FrameworkEvent#ERROR ERROR} - The
- * Framework encountered an error while shutting down or an error
- * has occurred which forced the framework to shutdown. </li> <li>
- * {@link FrameworkEvent#INFO INFO} - This method has timed out and
- * returned before this System Bundle has stopped.</li>
+ * Framework has been updated which has shutdown and will now
+ * restart.</li>
+ *
+ * <li> {@link FrameworkEvent#STOPPED_BOOTCLASSPATH_MODIFIED
+ * STOPPED_BOOTCLASSPATH_MODIFIED} - This Framework has been stopped
+ * and a bootclasspath extension bundle has been installed or
+ * updated. The VM must be restarted in order for the changed boot
+ * class path to take affect. </li>
+ *
+ * <li>{@link FrameworkEvent#ERROR ERROR} - The Framework
+ * encountered an error while shutting down or an error has occurred
+ * which forced the framework to shutdown. </li>
+ *
+ * <li> {@link FrameworkEvent#INFO INFO} - This method has timed out
+ * and returned before this Framework has stopped.</li>
* </ul>
* @throws InterruptedException If another thread interrupted the current
* thread before or while the current thread was waiting for this
- * System Bundle to completely stop. The <i>interrupted status</i>
- * of the current thread is cleared when this exception is thrown.
+ * Framework to completely stop. The <i>interrupted status</i> of
+ * the current thread is cleared when this exception is thrown.
* @throws IllegalArgumentException If the value of timeout is negative.
*/
- public FrameworkEvent waitForStop(long timeout) throws InterruptedException;
+ FrameworkEvent waitForStop(long timeout) throws InterruptedException;
/**
- * Start this System Bundle.
+ * Start this Framework.
*
* <p>
- * The following steps are taken to start this System Bundle:
+ * The following steps are taken to start this Framework:
* <ol>
- * <li>If this System Bundle is not in the {@link #STARTING} state,
- * {@link #init() initialize} this System Bundle.</li>
+ * <li>If this Framework is not in the {@link #STARTING} state,
+ * {@link #init() initialize} this Framework.</li>
* <li>All installed bundles must be started in accordance with each
* bundle's persistent <i>autostart setting</i>. This means some bundles
* will not be started, some will be started with <i>eager activation</i>
- * and some will be started with their <i>declared activation</i> policy.
- * <ul>
- * <li>If this System Bundle implements the optional <i>Start Level Service
- * Specification</i>, then the start level of this System Bundle's framework
- * instance is moved to the start level specified by the
+ * and some will be started with their <i>declared activation</i> policy. If
+ * this Framework implements the optional <i>Start Level Service
+ * Specification</i>, then the start level of this Framework is moved to the
+ * start level specified by the
* {@link Constants#FRAMEWORK_BEGINNING_STARTLEVEL beginning start level}
* framework property, as described in the <i>Start Level Service
* Specification</i>. If this framework property is not specified, then the
- * start level of this System Bundle's framework instance is moved to start
- * level one (1).</li>
- * </ul>
- * Any exceptions that occur during bundle starting must be wrapped in a
+ * start level of this Framework is moved to start level one (1). Any
+ * exceptions that occur during bundle starting must be wrapped in a
* {@link BundleException} and then published as a framework event of type
* {@link FrameworkEvent#ERROR}</li>
- * </li>
- * <li>This System Bundle's state is set to {@link #ACTIVE}.</li>
+ * <li>This Framework's state is set to {@link #ACTIVE}.</li>
* <li>A framework event of type {@link FrameworkEvent#STARTED} is fired</li>
* </ol>
*
- * @throws BundleException If this System Bundle could not be started.
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @throws BundleException If this Framework could not be started.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,EXECUTE]</code>, and the Java Runtime
+ * Environment supports permissions.
* @see "Start Level Service Specification"
*/
- public void start() throws BundleException;
+ void start() throws BundleException;
/**
- * Start this System Bundle.
+ * Start this Framework.
*
* <p>
* Calling this method is the same as calling {@link #start()}. There are no
- * start options for the System Bundle.
+ * start options for the Framework.
*
- * @param options Ignored. There are no start options for the System Bundle.
- * @throws BundleException If this System Bundle could not be started.
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @param options Ignored. There are no start options for the Framework.
+ * @throws BundleException If this Framework could not be started.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,EXECUTE]</code>, and the Java Runtime
+ * Environment supports permissions.
* @see #start()
*/
- public void start(int options) throws BundleException;
+ void start(int options) throws BundleException;
/**
- * Stop this System Bundle.
+ * Stop this Framework.
*
* <p>
* The method returns immediately to the caller after initiating the
* following steps to be taken on another thread.
* <ol>
- * <li>This System Bundle's state is set to {@link #STOPPING}.</li>
+ * <li>This Framework's state is set to {@link #STOPPING}.</li>
* <li>All installed bundles must be stopped without changing each bundle's
- * persistent <i>autostart setting</i>.
- * <ul>
- * <li>If this System Bundle implements the optional <i>Start Level Service
- * Specification</i>, then the start level of this System Bundle's framework
- * instance is moved to start level zero (0), as described in the <i>Start
- * Level Service Specification</i>.</li>
- * </ul>
- * Any exceptions that occur during bundle stopping must be wrapped in a
- * {@link BundleException} and then published as a framework event of type
- * {@link FrameworkEvent#ERROR}</li>
- * </li>
- * <li>Unregister all services registered by this System Bundle.</li>
- * <li>Event handling is disabled in this System Bundle's framework
- * instance.</li>
- * <li>This System Bundle's state is set to {@link #RESOLVED}.</li>
- * <li>All resources held by this System Bundle's framework instance are
- * released. This includes threads, bundle class loaders, open files, etc.</li>
+ * persistent <i>autostart setting</i>. If this Framework implements the
+ * optional <i>Start Level Service Specification</i>, then the start level
+ * of this Framework is moved to start level zero (0), as described in the
+ * <i>Start Level Service Specification</i>. Any exceptions that occur
+ * during bundle stopping must be wrapped in a {@link BundleException} and
+ * then published as a framework event of type {@link FrameworkEvent#ERROR}</li>
+ * <li>Unregister all services registered by this Framework.</li>
+ * <li>Event handling is disabled.</li>
+ * <li>This Framework's state is set to {@link #RESOLVED}.</li>
+ * <li>All resources held by this Framework are released. This includes
+ * threads, bundle class loaders, open files, etc.</li>
* <li>Notify all threads that are waiting at {@link #waitForStop(long)
* waitForStop} that the stop operation has completed.</li>
* </ol>
* <p>
- * After being stopped, this System Bundle may be discarded, initialized or
+ * After being stopped, this Framework may be discarded, initialized or
* started.
*
- * @throws BundleException If stopping this System Bundle could not be
+ * @throws BundleException If stopping this Framework could not be
* initiated.
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,EXECUTE]</code>, and the Java Runtime
+ * Environment supports permissions.
* @see "Start Level Service Specification"
*/
- public void stop() throws BundleException;
+ void stop() throws BundleException;
/**
- * Stop this System Bundle.
+ * Stop this Framework.
*
* <p>
* Calling this method is the same as calling {@link #stop()}. There are no
- * stop options for the System Bundle.
+ * stop options for the Framework.
*
- * @param options Ignored. There are no stop options for the System Bundle.
- * @throws BundleException If stopping this System Bundle could not be
+ * @param options Ignored. There are no stop options for the Framework.
+ * @throws BundleException If stopping this Framework could not be
* initiated.
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,EXECUTE]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,EXECUTE]</code>, and the Java Runtime
+ * Environment supports permissions.
* @see #stop()
*/
- public void stop(int options) throws BundleException;
+ void stop(int options) throws BundleException;
/**
- * The System Bundle cannot be uninstalled.
+ * The Framework cannot be uninstalled.
*
* <p>
* This method always throws a BundleException.
*
- * @throws BundleException This System Bundle cannot be uninstalled.
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @throws BundleException This Framework cannot be uninstalled.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,LIFECYCLE]</code>, and the Java
+ * Runtime Environment supports permissions.
*/
- public void uninstall() throws BundleException;
+ void uninstall() throws BundleException;
/**
- * Stop and restart this System Bundle.
+ * Stop and restart this Framework.
*
* <p>
* The method returns immediately to the caller after initiating the
* following steps to be taken on another thread.
* <ol>
- * <li>Perform the steps in the {@link #stop()} method to stop this System
- * Bundle.</li>
- * <li>Perform the steps in the {@link #start()} method to start this System
- * Bundle.</li>
+ * <li>Perform the steps in the {@link #stop()} method to stop this
+ * Framework.</li>
+ * <li>Perform the steps in the {@link #start()} method to start this
+ * Framework.</li>
* </ol>
*
- * @throws BundleException If stopping and restarting this System Bundle
- * could not be initiated.
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @throws BundleException If stopping and restarting this Framework could
+ * not be initiated.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,LIFECYCLE]</code>, and the Java
+ * Runtime Environment supports permissions.
*/
- public void update() throws BundleException;
+ void update() throws BundleException;
/**
- * Stop and restart this System Bundle.
+ * Stop and restart this Framework.
*
* <p>
* Calling this method is the same as calling {@link #update()} except that
@@ -285,44 +261,47 @@
*
* @param in Any provided InputStream is immediately closed before returning
* from this method and otherwise ignored.
- * @throws BundleException If stopping and restarting this System Bundle
- * could not be initiated.
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,LIFECYCLE]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @throws BundleException If stopping and restarting this Framework could
+ * not be initiated.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,LIFECYCLE]</code>, and the Java
+ * Runtime Environment supports permissions.
*/
- public void update(InputStream in) throws BundleException;
+ void update(InputStream in) throws BundleException;
/**
- * Returns the System Bundle unique identifier. This System Bundle is
- * assigned the unique identifier zero (0).
+ * Returns the Framework unique identifier. This Framework is assigned the
+ * unique identifier zero (0) since this Framework is also a System Bundle.
*
* @return 0.
* @see Bundle#getBundleId()
*/
- public long getBundleId();
+ long getBundleId();
/**
- * Returns the System Bundle location identifier.
+ * Returns the Framework location identifier. This Framework is assigned the
+ * unique location "<code>System Bundle</code>" since this
+ * Framework is also a System Bundle.
*
* @return The string "<code>System Bundle</code>".
- * @throws java.lang.SecurityException If the caller does not have the
- * appropriate <code>AdminPermission[this,METADATA]</code>, and the
- * Java Runtime Environment supports permissions.
+ * @throws SecurityException If the caller does not have the appropriate
+ * <code>AdminPermission[this,METADATA]</code>, and the Java Runtime
+ * Environment supports permissions.
* @see Bundle#getLocation()
* @see Constants#SYSTEM_BUNDLE_LOCATION
*/
- public String getLocation();
+ String getLocation();
/**
- * Returns the symbolic name of this System Bundle. The symbolic name is
- * unique for the implementation of the framework. However, the symbolic
- * name "<code>system.bundle</code>" must be recognized as an
- * alias to the implementation-defined symbolic name.
+ * Returns the symbolic name of this Framework. The symbolic name is unique
+ * for the implementation of the framework. However, the symbolic name
+ * "<code>system.bundle</code>" must be recognized as an alias to
+ * the implementation-defined symbolic name since this Framework is also a
+ * System Bundle.
*
- * @return The symbolic name of this System Bundle.
+ * @return The symbolic name of this Framework.
* @see Bundle#getSymbolicName()
* @see Constants#SYSTEM_BUNDLE_SYMBOLICNAME
*/
- public String getSymbolicName();
+ String getSymbolicName();
}
diff --git a/framework/src/main/java/org/osgi/framework/launch/FrameworkFactory.java b/framework/src/main/java/org/osgi/framework/launch/FrameworkFactory.java
new file mode 100644
index 0000000..6a3dc7b
--- /dev/null
+++ b/framework/src/main/java/org/osgi/framework/launch/FrameworkFactory.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.osgi.framework.launch;
+
+import java.util.Map;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * A factory for creating {@link Framework} instances.
+ *
+ * <p>
+ * A framework implementation jar must contain the following resource:
+ *
+ * <pre>
+ * /META-INF/services/org.osgi.framework.launch.FrameworkFactory
+ * </pre>
+ *
+ * This UTF-8 encoded resource must contain the name of the framework
+ * implementation's FrameworkFactory implementation class. Space and tab
+ * characters, including blank lines, in the resource must be ignored. The
+ * number sign ('#' \u0023) and all characters following it on each line are a
+ * comment and must be ignored.
+ *
+ * <p>
+ * Launchers can find the name of the FrameworkFactory implementation class in
+ * the resource and then load and construct a FrameworkFactory object for the
+ * framework implementation. The FrameworkFactory implementation class must have
+ * a public, no-argument constructor. Java™ SE 6 introduced the
+ * <code>ServiceLoader</code> class which can create a FrameworkFactory instance
+ * from the resource.
+ *
+ * @ThreadSafe
+ * @version $Revision: 6397 $
+ */
+public interface FrameworkFactory {
+
+ /**
+ * Create a new {@link Framework} instance.
+ *
+ * @param configuration The framework properties to configure the new
+ * framework instance. If framework properties are not provided by
+ * the configuration argument, the created framework instance must
+ * use some reasonable default configuration appropriate for the
+ * current VM. For example, the system packages for the current
+ * execution environment should be properly exported. The specified
+ * configuration argument may be <code>null</code>. The created
+ * framework instance must copy any information needed from the
+ * specified configuration argument since the configuration argument
+ * can be changed after the framework instance has been created.
+ * @return A new, configured {@link Framework} instance. The framework
+ * instance must be in the {@link Bundle#INSTALLED} state.
+ * @throws SecurityException If the caller does not have
+ * <code>AllPermission</code>, and the Java Runtime Environment
+ * supports permissions.
+ */
+ Framework newFramework(Map configuration) throws Exception;
+}
diff --git a/framework/src/main/java/org/osgi/framework/launch/package.html b/framework/src/main/java/org/osgi/framework/launch/package.html
new file mode 100644
index 0000000..6b0407b
--- /dev/null
+++ b/framework/src/main/java/org/osgi/framework/launch/package.html
@@ -0,0 +1,11 @@
+<!-- $Revision: 6204 $ -->
+<BODY>
+<p>Framework Launch Package Version 1.0.
+<p>Bundles wishing to use this package must list the package
+in the Import-Package header of the bundle's manifest.
+For example:
+<pre>
+Import-Package: org.osgi.framework.launch;version="[1.0,2.0)"
+</pre>
+</BODY>
+
diff --git a/framework/src/main/java/org/osgi/framework/launch/packageinfo b/framework/src/main/java/org/osgi/framework/launch/packageinfo
new file mode 100644
index 0000000..7c8de03
--- /dev/null
+++ b/framework/src/main/java/org/osgi/framework/launch/packageinfo
@@ -0,0 +1 @@
+version 1.0