You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by da...@apache.org on 2015/11/30 17:59:22 UTC

svn commit: r1717295 - in /aries/trunk/spi-fly/spi-fly-examples: ./ spi-fly-example-provider3-bundle/ spi-fly-example-provider3-bundle/src/ spi-fly-example-provider3-bundle/src/main/ spi-fly-example-provider3-bundle/src/main/java/ spi-fly-example-provi...

Author: davidb
Date: Mon Nov 30 16:59:21 2015
New Revision: 1717295

URL: http://svn.apache.org/viewvc?rev=1717295&view=rev
Log:
ARIES-1461 Support consumer and providers headers for fragment bundles

Added:
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/pom.xml
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/mysvc/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/mysvc/impl3/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/mysvc/impl3/SPIProviderImpl.java
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/META-INF/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/META-INF/services/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/META-INF/services/org.apache.aries.spifly.mysvc.SPIProvider
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-fragment/
    aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-fragment/pom.xml
Modified:
    aries/trunk/spi-fly/spi-fly-examples/pom.xml

Modified: aries/trunk/spi-fly/spi-fly-examples/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-examples/pom.xml?rev=1717295&r1=1717294&r2=1717295&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-examples/pom.xml (original)
+++ aries/trunk/spi-fly/spi-fly-examples/pom.xml Mon Nov 30 16:59:21 2015
@@ -48,9 +48,13 @@
         <module>spi-fly-example-provider1-jar</module>
         <module>spi-fly-example-provider1-bundle</module>
         <module>spi-fly-example-provider2-bundle</module>
+        <module>spi-fly-example-provider3-bundle</module>
+        <module>spi-fly-example-provider3-fragment</module>
         <module>spi-fly-example-client1-jar</module>
         <module>spi-fly-example-client1-bundle</module>
         <module>spi-fly-example-client2-bundle</module>
+        <module>spi-fly-example-client3-bundle</module>
+        <module>spi-fly-example-client3-fragment</module>
         <module>spi-fly-example-provider-consumer-bundle</module>
         <module>spi-fly-example-resource-provider-bundle</module>
         <module>spi-fly-example-resource-client-bundle</module>

Added: aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/pom.xml?rev=1717295&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/pom.xml (added)
+++ aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/pom.xml Mon Nov 30 16:59:21 2015
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+    -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.aries.spifly.examples</groupId>
+        <artifactId>spi-fly-examples</artifactId>
+        <version>1.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.aries.spifly.examples.provider3.bundle</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Aries Example SPI Provider Bundle 3</name>
+    <description>
+        A Bundle providing a service
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.aries.spifly.examples</groupId>
+            <artifactId>org.apache.aries.spifly.examples.spi.bundle</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>        
+    </dependencies>
+
+    <properties>
+        <aries.osgi.export.pkg />
+        <lastReleaseVersion>1.0.1-SNAPSHOT</lastReleaseVersion>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>
+                            *
+                        </Import-Package>
+                        <Export-Package>
+                        </Export-Package>
+                        <Private-Package>
+                            org.apache.aries.spifly.mysvc.impl3
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/mysvc/impl3/SPIProviderImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/mysvc/impl3/SPIProviderImpl.java?rev=1717295&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/mysvc/impl3/SPIProviderImpl.java (added)
+++ aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/java/org/apache/aries/spifly/mysvc/impl3/SPIProviderImpl.java Mon Nov 30 16:59:21 2015
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.aries.spifly.mysvc.impl3;
+
+import org.apache.aries.spifly.mysvc.SPIProvider;
+
+public class SPIProviderImpl extends SPIProvider {
+	@Override
+	public String doit() {
+		return "Doing it as well!";
+	}
+}

Added: aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/META-INF/services/org.apache.aries.spifly.mysvc.SPIProvider
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/META-INF/services/org.apache.aries.spifly.mysvc.SPIProvider?rev=1717295&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/META-INF/services/org.apache.aries.spifly.mysvc.SPIProvider (added)
+++ aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-bundle/src/main/resources/META-INF/services/org.apache.aries.spifly.mysvc.SPIProvider Mon Nov 30 16:59:21 2015
@@ -0,0 +1 @@
+org.apache.aries.spifly.mysvc.impl3.SPIProviderImpl
\ No newline at end of file

Added: aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-fragment/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-fragment/pom.xml?rev=1717295&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-fragment/pom.xml (added)
+++ aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider3-fragment/pom.xml Mon Nov 30 16:59:21 2015
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+    -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.aries.spifly.examples</groupId>
+        <artifactId>spi-fly-examples</artifactId>
+        <version>1.0.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.aries.spifly.examples.provider3.fragment</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Aries Example SPI Provider Bundle 3 Fragment</name>
+    <description>
+        A fragment that adds the SPI Fly headers to an untreated bundle providing a Serviceloader service
+    </description>
+
+    <properties>
+        <aries.osgi.export.pkg />
+        <lastReleaseVersion>1.0.1-SNAPSHOT</lastReleaseVersion>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Fragment-Host>org.apache.aries.spifly.examples.provider3.bundle</Fragment-Host>
+                        <Import-Package />
+                        <Export-Package />
+                        <Private-Package />
+                        <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
+                        <Provide-Capability>osgi.serviceloader; osgi.serviceloader=org.apache.aries.spifly.mysvc.SPIProvider</Provide-Capability>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>