Return-Path: X-Original-To: apmail-aries-commits-archive@www.apache.org Delivered-To: apmail-aries-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46AC81886E for ; Thu, 26 Nov 2015 08:55:23 +0000 (UTC) Received: (qmail 22210 invoked by uid 500); 26 Nov 2015 08:55:23 -0000 Delivered-To: apmail-aries-commits-archive@aries.apache.org Received: (qmail 22142 invoked by uid 500); 26 Nov 2015 08:55:23 -0000 Mailing-List: contact commits-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list commits@aries.apache.org Received: (qmail 22128 invoked by uid 99); 26 Nov 2015 08:55:23 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Nov 2015 08:55:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8E767C06C9 for ; Thu, 26 Nov 2015 08:55:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.447 X-Spam-Level: X-Spam-Status: No, score=0.447 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dPatXbVHkYjK for ; Thu, 26 Nov 2015 08:55:13 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id D23E02059C for ; Thu, 26 Nov 2015 08:55:12 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 977EBE0280 for ; Thu, 26 Nov 2015 08:55:11 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 727F33A0176 for ; Thu, 26 Nov 2015 08:55:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1716585 - /aries/site/trunk/content/modules/spi-fly.mdtext Date: Thu, 26 Nov 2015 08:55:11 -0000 To: commits@aries.apache.org From: davidb@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151126085511.727F33A0176@svn01-us-west.apache.org> Author: davidb Date: Thu Nov 26 08:55:10 2015 New Revision: 1716585 URL: http://svn.apache.org/viewvc?rev=1716585&view=rev Log: Take out hard coded SPI Fly versions. Modified: aries/site/trunk/content/modules/spi-fly.mdtext Modified: aries/site/trunk/content/modules/spi-fly.mdtext URL: http://svn.apache.org/viewvc/aries/site/trunk/content/modules/spi-fly.mdtext?rev=1716585&r1=1716584&r2=1716585&view=diff ============================================================================== --- aries/site/trunk/content/modules/spi-fly.mdtext (original) +++ aries/site/trunk/content/modules/spi-fly.mdtext Thu Nov 26 08:55:10 2015 @@ -49,39 +49,39 @@ the *serviceloader.mediator* service reg ##Getting SPI Fly## ###Releases### -The latest release of the SPI-Fly components is 1.0.2. It can be obtained from Maven +The latest release of the SPI-Fly components [can be found on Maven Central][2]. It can be obtained from Maven Central using the links below. To use SPI Fly you need to decide whether to use the dynamic or static weaving version. -More information about this can be found in the [usage section][2]. +More information about this can be found in the [usage section][3]. **For use with dynamic weaving:** - - [SPI Fly Dynamic Weaving Bundle 1.0.2][3] + - [SPI Fly Dynamic Weaving Bundle][4] Dependencies: - - [Aries Util 1.1.1][4] - - [ASM 5.0.4][5] + - [Aries Util 1.1.1][5] + - [ASM 5.0.4][6] **For use with static weaving:** - - [SPI Fly Static Weaving command-line tool 1.0.2][6] - - [SPI Fly Static Weaving Bundle 1.0.2][7] + - [SPI Fly Static Weaving command-line tool][7] (take the executable jar with dependencies) + - [SPI Fly Static Weaving Bundle][8] Dependencies: - - [Aries Util 1.1.1][8] + - [Aries Util 1.1.1][9] ###Building the code### The code can be found in -[http://svn.apache.org/repos/asf/aries/trunk/spi-fly][9]. +[http://svn.apache.org/repos/asf/aries/trunk/spi-fly][10]. To build, use Maven 3.x and run mvn install #Configuration: OSGi Spec-compliant# All the details surrounding this type of configuration are covered in the -[OSGi Enterprise Specification][10] (from version 5) chapter 133. This section provides a short overview. +[OSGi Enterprise Specification][11] (from version 5) chapter 133. This section provides a short overview. ##Providers## SPI provider bundles opt in to being registered by specifying a requirement on the @@ -96,7 +96,7 @@ Additionally, they need to provide capab While this example omits it, it is advisable to specify uses constraints on the Provide-Capability header, to ensure consistent class spaces. -See the [spi-fly-example-provider2-bundle][11] for an example of a spec-compliant provider. +See the [spi-fly-example-provider2-bundle][12] for an example of a spec-compliant provider. ##Consumers## @@ -115,7 +115,7 @@ All requirements are combined into a sin   Require-Capability: osgi.serviceloader; filter:="(osgi.serviceloader=org.apache.aries.spifly.mysvc.MySPIProvider)";cardinality:=multiple,osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" -See the [spi-fly-example-client2-bundle][12] for an example of a spec-compliant consumer. +See the [spi-fly-example-client2-bundle][13] for an example of a spec-compliant consumer. #Configuration: SPI Fly-specific# This section describes how to use SPI Fly's proprietary configuration @@ -144,7 +144,7 @@ The SPI-Provider header can eit that holds the original unmodified jar containing the provider internally as a on the Bundle-ClassPath. -See the [spi-fly-example-provider1-bundle][13] for an example of a provider using this type of configuration. +See the [spi-fly-example-provider1-bundle][14] for an example of a provider using this type of configuration. ##Consumers## Service consumers also need to opt in to the process. @@ -164,7 +164,7 @@ call DocumentBuilderFactory.newInsta * **SPI-Consumer: org.foo.Foo#someMthd(),org.bar.Bar#myMethod()** weave calls to Foo.someMthd() and Bar.myMethod(). -See the [spi-fly-example-client1-bundle][14] for an example of a consumer using this type of configuration. +See the [spi-fly-example-client1-bundle][15] for an example of a consumer using this type of configuration. ###Special Cases### SPI Fly can be used for most SPI provider/lookup systems that use the TCCL pattern to obtain @@ -196,8 +196,8 @@ If you have an pre-4.3 OSGi framework or can use the static weaving approach. ##Use with Dynamic Weaving## -Install and start the [org.apache.aries.spifly.dynamic.bundle][15] into the system. This bundle -has a dependency on [org.objectweb.asm][16] version 4.0 or newer and on the Aries +Install and start the [org.apache.aries.spifly.dynamic.bundle][16] into the system. This bundle +has a dependency on [org.objectweb.asm][17] version 4.0 or newer and on the Aries Util bundle.
g! lb
@@ -207,7 +207,7 @@ START LEVEL 1
 ... bundles 1-4 are framework/console internal ones ...
     5|Active     |    1|ASM all classes (5.0.4)
     6|Active     |    1|Apache Aries Util (1.1.1)
-    7|Active     |    1|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.2)
+    7|Active     |    1|Apache Aries SPI Fly Dynamic Weaving Bundle
 
Note that, as with any OSGi Bundle that uses the OSGi 4.3 WeavingHooks, the weaver @@ -222,7 +222,7 @@ bundle and inserts calls to set the corr Provider bundles are still handled dynamically. ###To statically weave a bundle### -The easiest way to invoke the static weaver is to take the [org.apache.aries.spifly.static.tool][17] +The easiest way to invoke the static weaver is to take the [org.apache.aries.spifly.static.tool][18] jar with dependencies. Then run the static tool on any bundle that needs processing: @@ -233,7 +233,7 @@ java -jar org.apache.aries.spifly.static This will produce a second bundle with the same name with the _spifly suffix appended, so in this case the generated bundle will be called mybundle_spifly.jar. -At runtime, install the [org.apache.aries.spifly.static.bundle][18] into the system, like +At runtime, install the [org.apache.aries.spifly.static.bundle][19] into the system, like the dynamic weaving bundle it has a dependency on the Aries Util bundle:
g! lb
 START LEVEL 1
@@ -241,7 +241,7 @@ START LEVEL 1
     0|Active     |    0|System Bundle (5.0.1)
 ... bundles 1-4 are framework/console internal ones ...
     5|Active     |    1|Apache Aries Util (1.1.1)
-    6|Active     |    1|Apache Aries SPI Fly Static Weaving Bundle (1.0.2)
+ 6|Active | 1|Apache Aries SPI Fly Static Weaving Bundle Then install and start the statically woven bundle into the system. @@ -251,55 +251,56 @@ used for testing or experimenting. The following modules can be found in this directory: -* **spi-fly-example-spi-bundle** - a bundle providing an SPI interface used by the other example bundles. [osgi-bundle][19] [source][20] -* **spi-fly-example-provider1-jar** - a plain jar file providing an implementation of the SPI (via META-INF/services). [source][21] -* **spi-fly-example-provider1-bundle** - a bundle that wraps the jar file from the previous bullet and specifies it in its Bundle-ClassPath. This example represents the common case where an existing SPI provider is wrapped as-is in an OSGi bundle. This example uses the SPI Fly proprietary configuration. [osgi-bundle][22] [source][23] -* **spi-fly-example-provider2-bundle** - a bundle that directly provides an SPI service (via META-INF/services). This example uses OSGi specification compliant configuration. [osgi-bundle][24] [source][25] -* **spi-fly-example-client1-jar** - a plain jar using java.util.ServiceLoader.load() to obtain and invoke all services provided of a certain SPI. [source][26] -* **spi-fly-example-client1-bundle** - a bundle that wraps the jar file from the previous bullet and lists it in its Bundle-ClassPath. This example represents the common case where an existing SPI consumer is wrapped as-is in an OSGi bundle. This example uses SPI Fly proprietary configuration. [osgi-bundle][27] [source][28] -* **spi-fly-example-client2-bundle** - a bundle that has code that invokes java.util.ServiceLoader.load() directly. This example uses OSGi specification compliant configuration. [osgi-bundle][29] [source][30] -* **spi-fly-example-provider-consumer-bundle** - a bundle that is both a provider and a consumer at the same time. [source][31] -* **spi-fly-example-resource-provider-bundle** and **spi-fly-example-resource-client-bundle** - these bundles show that SPI Fly can be used to control the TCCL in OSGi for any situation, in this case applied to resource loading via the TCCL. The provider bundle provides a resource used by the Foo.doit() API. The client bundle contains Foo.doit() and in there calls Thread.getContextClassLoader().getResource() to obtain the resource. The TCCL has visibility of the provider bundle because both bundles have the appropriate values set in the SPI-Provider and SPI-Consumer headers. Source [here][32] and [here][33]. +* **spi-fly-example-spi-bundle** - a bundle providing an SPI interface used by the other example bundles. [osgi-bundle][20] [source][21] +* **spi-fly-example-provider1-jar** - a plain jar file providing an implementation of the SPI (via META-INF/services). [source][22] +* **spi-fly-example-provider1-bundle** - a bundle that wraps the jar file from the previous bullet and specifies it in its Bundle-ClassPath. This example represents the common case where an existing SPI provider is wrapped as-is in an OSGi bundle. This example uses the SPI Fly proprietary configuration. [osgi-bundle][23] [source][24] +* **spi-fly-example-provider2-bundle** - a bundle that directly provides an SPI service (via META-INF/services). This example uses OSGi specification compliant configuration. [osgi-bundle][25] [source][26] +* **spi-fly-example-client1-jar** - a plain jar using java.util.ServiceLoader.load() to obtain and invoke all services provided of a certain SPI. [source][27] +* **spi-fly-example-client1-bundle** - a bundle that wraps the jar file from the previous bullet and lists it in its Bundle-ClassPath. This example represents the common case where an existing SPI consumer is wrapped as-is in an OSGi bundle. This example uses SPI Fly proprietary configuration. [osgi-bundle][28] [source][29] +* **spi-fly-example-client2-bundle** - a bundle that has code that invokes java.util.ServiceLoader.load() directly. This example uses OSGi specification compliant configuration. [osgi-bundle][30] [source][31] +* **spi-fly-example-provider-consumer-bundle** - a bundle that is both a provider and a consumer at the same time. [source][32] +* **spi-fly-example-resource-provider-bundle** and **spi-fly-example-resource-client-bundle** - these bundles show that SPI Fly can be used to control the TCCL in OSGi for any situation, in this case applied to resource loading via the TCCL. The provider bundle provides a resource used by the Foo.doit() API. The client bundle contains Foo.doit() and in there calls Thread.getContextClassLoader().getResource() to obtain the resource. The TCCL has visibility of the provider bundle because both bundles have the appropriate values set in the SPI-Provider and SPI-Consumer headers. Source [here][33] and [here][34]. ##More Information## More information can be found at the following resources: - - OSGi Service Loader Mediator specification. [OSGi Enterprise specification][34], Chapter 133. - - OSGi Blog article: [http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html][35] + - OSGi Service Loader Mediator specification. [OSGi Enterprise specification][35], Chapter 133. + - OSGi Blog article: [http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html][36] [1]: http://www.osgi.org/Download/Release5 "OSGi Enterprise Specification" - [2]: #usage - [3]: http://repo1.maven.org/maven2/org/apache/aries/spifly/org.apache.aries.spifly.dynamic.bundle/1.0.2/org.apache.aries.spifly.dynamic.bundle-1.0.2.jar - [4]: http://repo1.maven.org/maven2/org/apache/aries/org.apache.aries.util/1.1.1/org.apache.aries.util-1.1.1.jar - [5]: http://repo1.maven.org/maven2/org/ow2/asm/asm-all/5.0.4/asm-all-5.0.4.jar - [6]: http://repo1.maven.org/maven2/org/apache/aries/spifly/org.apache.aries.spifly.static.tool/1.0.2/org.apache.aries.spifly.static.tool-1.0.2-jar-with-dependencies.jar - [7]: http://repo1.maven.org/maven2/org/apache/aries/spifly/org.apache.aries.spifly.static.bundle/1.0.2/org.apache.aries.spifly.static.bundle-1.0.2.jar - [8]: http://repo1.maven.org/maven2/org/apache/aries/org.apache.aries.util/1.1.1/org.apache.aries.util-1.1.1.jar - [9]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly - [10]: http://www.osgi.org/Download/Release5 "OSGi Enterprise Specification" - [11]: #examples + [2]: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.aries.spifly%22 + [3]: #usage + [4]: http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.aries.spifly.dynamic.bundle%22 + [5]: http://repo1.maven.org/maven2/org/apache/aries/org.apache.aries.util/1.1.1/org.apache.aries.util-1.1.1.jar + [6]: http://repo1.maven.org/maven2/org/ow2/asm/asm-all/5.0.4/asm-all-5.0.4.jar + [7]: http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.aries.spifly.static.tool%22 + [8]: http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.aries.spifly.static.bundle%22 + [9]: http://repo1.maven.org/maven2/org/apache/aries/org.apache.aries.util/1.1.1/org.apache.aries.util-1.1.1.jar + [10]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly + [11]: http://www.osgi.org/Download/Release5 "OSGi Enterprise Specification" [12]: #examples [13]: #examples [14]: #examples - [15]: #releases - [16]: http://search.maven.org/#artifactdetails%7Corg.ow2.asm%7Casm-all%7C5.0.4%7Cjar - [17]: #releases + [15]: #examples + [16]: #releases + [17]: http://search.maven.org/#artifactdetails%7Corg.ow2.asm%7Casm-all%7C5.0.4%7Cjar [18]: #releases - [19]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.spi.bundle/1.0.0/org.apache.aries.spifly.examples.spi.bundle-1.0.0.jar - [20]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-spi-bundle/ - [21]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-jar/ - [22]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider1.bundle/1.0.0/org.apache.aries.spifly.examples.provider1.bundle-1.0.0.jar - [23]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-bundle/ - [24]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider2.bundle/1.0.0/org.apache.aries.spifly.examples.provider2.bundle-1.0.0.jar - [25]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/ - [26]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-jar/ - [27]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client1.bundle/1.0.0/org.apache.aries.spifly.examples.client1.bundle-1.0.0.jar - [28]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-bundle/ - [29]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client2.bundle/1.0.0/org.apache.aries.spifly.examples.client2.bundle-1.0.0.jar - [30]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/ - [31]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider-consumer-bundle/ - [32]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-resource-provider-bundle/ - [33]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-resource-client-bundle/ - [34]: http://www.osgi.org/Download/Release5 - [35]: http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html \ No newline at end of file + [19]: #releases + [20]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.spi.bundle/1.0.0/org.apache.aries.spifly.examples.spi.bundle-1.0.0.jar + [21]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-spi-bundle/ + [22]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-jar/ + [23]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider1.bundle/1.0.0/org.apache.aries.spifly.examples.provider1.bundle-1.0.0.jar + [24]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider1-bundle/ + [25]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.provider2.bundle/1.0.0/org.apache.aries.spifly.examples.provider2.bundle-1.0.0.jar + [26]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider2-bundle/ + [27]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-jar/ + [28]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client1.bundle/1.0.0/org.apache.aries.spifly.examples.client1.bundle-1.0.0.jar + [29]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client1-bundle/ + [30]: http://search.maven.org/remotecontent?filepath=org/apache/aries/spifly/examples/org.apache.aries.spifly.examples.client2.bundle/1.0.0/org.apache.aries.spifly.examples.client2.bundle-1.0.0.jar + [31]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-client2-bundle/ + [32]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-provider-consumer-bundle/ + [33]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-resource-provider-bundle/ + [34]: http://svn.apache.org/repos/asf/aries/trunk/spi-fly/spi-fly-examples/spi-fly-example-resource-client-bundle/ + [35]: http://www.osgi.org/Download/Release5 + [36]: http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html \ No newline at end of file