FELIX-4537 use bnd.bnd file, set versions in it, update versions, build passes
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1602649 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/bnd.bnd b/scr/bnd.bnd
new file mode 100644
index 0000000..a1b6682
--- /dev/null
+++ b/scr/bnd.bnd
@@ -0,0 +1,43 @@
+Bundle-Category: osgi
+Bundle-SymbolicName: ${project.artifactId}
+Bundle-Vendor: The Apache Software Foundation
+Bundle-DocURL: http://felix.apache.org/site/apache-felix-service-component-runtime.html
+Bundle-Activator: org.apache.felix.scr.impl.Activator
+Bundle-Version: 2.0.0
+
+
+Export-Package: org.apache.felix.scr;version=2.0, \
+ org.apache.felix.scr.component;version=1.1.0;mandatory:="status"; status="provisional", \
+ org.osgi.service.component, \
+ org.osgi.service.component.runtime.*;version=1.8, \
+ org.osgi.dto;version=1.8, \
+ org.osgi.framework.dto;version=1.8
+
+Private-Package: org.apache.felix.scr.impl.*, \
+ org.osgi.util.tracker, \
+ org.apache.felix.utils.extender
+
+# Configuration Admin is optional and dynamic, but allow eager wiring by importing it
+# Metatype import is optional and dynamic, but allow eager wiring by importing it
+# optional import for Gogo annotations
+# The Felix Shell support is optional
+# Framework version 1.4 (from R4.1) is required because we depend on ServiceReference being
+# Comparable and Bundle.getBundleContext method being available.
+# LogService is optional but if present the R4.0 version 1.3 is sufficient.
+# PackageAdmin is used to find reference types if the component's bundle does not import it.
+# See BindMethod.getParameterClass(Class) for details. R4.0 version 1.2 is sufficient.
+Import-Package: \
+ org.osgi.service.cm;version="[1.2,2)";resolution:=optional, \
+ org.osgi.service.metatype;version="[1.1,2)";resolution:=optional, \
+ org.apache.felix.service.command;resolution:=optional, \
+ org.apache.felix.shell;provide:=true;resolution:=optional, \
+ org.osgi.framework;version="[1.4,2)", \
+ org.osgi.service.log;version="[1.3,2)";resolution:=optional, \
+ org.osgi.service.packageadmin;version="[1.2,2)";resolution:=optional, \
+ org.osgi.service.component;provide:=true, \
+
+DynamicImport-Package: \
+ org.osgi.service.cm;version="[1.2,2)", \
+ org.osgi.service.metatype;version="[1.1,2)"
+
+Embed-Dependency: kxml2;inline=org/kxml2/io/KXmlParser.class|org/xmlpull/v1/XmlPull**
diff --git a/scr/pom.xml b/scr/pom.xml
index cb86891..7ceb875 100644
--- a/scr/pom.xml
+++ b/scr/pom.xml
@@ -233,11 +233,12 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>2.3.7</version>
+ <version>2.4.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
- <Bundle-Category>osgi</Bundle-Category>
+ <_include>-bnd.bnd</_include>
+<!-- <Bundle-Category>osgi</Bundle-Category>
<Bundle-SymbolicName>
${project.artifactId}
</Bundle-SymbolicName>
@@ -263,84 +264,84 @@
org.apache.felix.utils.extender
</Private-Package>
<Import-Package>
- <!--
+
Configuration Admin is optional and dynamic, but allow eager
wiring by importing it
- -->
+
org.osgi.service.cm;version="[1.2,2)";resolution:=optional,
- <!--
+
Metatype import is optional and dynamic, but allow eager
wiring by importing it
- -->
+
org.osgi.service.metatype;version="[1.1,2)";resolution:=optional,
- <!--
+
optional import for Gogo annotations
- -->
+
org.apache.felix.service.command;resolution:=optional,
- <!--
+
The Felix Shell support is optional
- -->
+
org.apache.felix.shell;provide:=true;resolution:=optional,
- <!--
+
Framework version 1.4 (from R4.1) is required
because we depend on ServiceReference being
Comparable and Bundle.getBundleContext method
being available.
- -->
+
org.osgi.framework;version="[1.4,2)",
- <!--
+
LogService is optional but if present the
R4.0 version 1.3 is sufficient.
- -->
+
org.osgi.service.log;version="[1.3,2)";resolution:=optional,
- <!--
+
PackageAdmin is used to find reference types if
the component's bundle does not import it.
See BindMethod.getParameterClass(Class) for details.
R4.0 version 1.2 is sufficient.
- -->
+
org.osgi.service.packageadmin;version="[1.2,2)";resolution:=optional,
- <!--
+
SCR API is required (we also export it) and must
be of the same minor version as we export, because
we implement that exact version. This import is
only used if the framework decides to wire the
bundle to another API provider.
(version is automatically deduced from export)
- -->
+
org.osgi.service.component;provide:=true,
- <!--
+
SCR Admin API is required (we also export it) and
must be of the same minor version as we export,
because we implement that exact version. This
import is only used if the framework decides to
wire the bundle to another API provider.
- -->
+
org.apache.felix.scr;provide:=true
</Import-Package>
<DynamicImport-Package>
- <!--
+
Configuration Admin version 1.2 (from R4.0) is enough
- -->
+
org.osgi.service.cm;version="[1.2,2)",
- <!--
+
Metatype is optional and if it is
present, version 1.1 (from R4.1) is enough
- -->
+
org.osgi.service.metatype;version="[1.1,2)"
</DynamicImport-Package>
<Embed-Dependency>
kxml2;inline=org/kxml2/io/KXmlParser.class|org/xmlpull/v1/XmlPull**,
</Embed-Dependency>
- </instructions>
+ --> </instructions>
</configuration>
</plugin>
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
index a824f1c..4ec37fb 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
@@ -770,7 +770,7 @@
if ( !getTracker().isEmpty() )
{
AtomicInteger trackingCount2 = new AtomicInteger();
- SortedMap<ServiceReference<T>, RefPair<T>> tracked = getTracker().getTracked( true,
+ SortedMap<ServiceReference<T>, RefPair<T>> tracked = getTracker().getTracked( true, //TODO true here looks odd.
trackingCount2 );
nextRefPair = tracked.values().iterator().next();
}
diff --git a/scr/src/main/java/org/osgi/dto/packageinfo b/scr/src/main/java/org/osgi/dto/packageinfo
deleted file mode 100644
index 7c8de03..0000000
--- a/scr/src/main/java/org/osgi/dto/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.0
diff --git a/scr/src/main/java/org/osgi/framework/dto/packageinfo b/scr/src/main/java/org/osgi/framework/dto/packageinfo
deleted file mode 100644
index ed9885d..0000000
--- a/scr/src/main/java/org/osgi/framework/dto/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.8
diff --git a/scr/src/main/java/org/osgi/service/component/runtime/dto/packageinfo b/scr/src/main/java/org/osgi/service/component/runtime/dto/packageinfo
deleted file mode 100644
index 0117a56..0000000
--- a/scr/src/main/java/org/osgi/service/component/runtime/dto/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.3
diff --git a/scr/src/main/java/org/osgi/service/component/runtime/packageinfo b/scr/src/main/java/org/osgi/service/component/runtime/packageinfo
deleted file mode 100644
index 0117a56..0000000
--- a/scr/src/main/java/org/osgi/service/component/runtime/packageinfo
+++ /dev/null
@@ -1 +0,0 @@
-version 1.3