You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by al...@apache.org on 2017/10/17 18:48:49 UTC

svn commit: r1812438 - /aries/site/trunk/content/modules/blueprint-maven-plugin.mdtext

Author: alien11689
Date: Tue Oct 17 18:48:49 2017
New Revision: 1812438

URL: http://svn.apache.org/viewvc?rev=1812438&view=rev
Log:
Add information about new annotations for blueprint maven plugin

Modified:
    aries/site/trunk/content/modules/blueprint-maven-plugin.mdtext

Modified: aries/site/trunk/content/modules/blueprint-maven-plugin.mdtext
URL: http://svn.apache.org/viewvc/aries/site/trunk/content/modules/blueprint-maven-plugin.mdtext?rev=1812438&r1=1812437&r2=1812438&view=diff
==============================================================================
--- aries/site/trunk/content/modules/blueprint-maven-plugin.mdtext (original)
+++ aries/site/trunk/content/modules/blueprint-maven-plugin.mdtext Tue Oct 17 18:48:49 2017
@@ -29,7 +29,7 @@ Usage:
     <plugin>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint-maven-plugin</artifactId>
-        <version>1.5.0</version>
+        <version>1.9.0</version>
         <configuration>
             <scanPaths>
                 <scanPath>org.my.package</scanPath>
@@ -78,12 +78,6 @@ Creates blueprint xml from annotations i
   - @PostConstruct Marks a method to be called after DI is finished (init-method)
   - @PreDestroy Marks a method to be called before the bean is destroyed (destroy-method)
 
-### pax-cdi ###
-  - @OsgiServiceProvider(classes={TaskService.class}) Publishes a bean as an OSGi service with the given interfaces
-  - @OsgiService creates a reference to an OSGi service. On optional filter is also possible
-  - @Properties Defines service properties for OSGiServiceProvider
-  - @Property Defines a service property
-
 ### javax.persistence ###
   - @PersistenceContext(unitName="tasklist") inject a managed EntityManager for the given persistence unit into a field
   - @PersistenceUnit(unitName="tasklist") inject an unmanaged EntityManagerFactory for the given persistence unit into a field
@@ -93,6 +87,30 @@ Creates blueprint xml from annotations i
   - @Config Creates cm:property-placehoder
   - @DefaultProperty Configure default values for properties in property-placeholder
 
+### Collection annotations (org.apache.aries.blueprint.annotation.collection)
+  - @CollectionInject Inject list, set or array of existing beans of provided interface
+
+### Bean annotations (org.apache.aries.blueprint.annotation.bean)
+  - @Bean Mark a class as a bean or method as factory of bean
+
+### Reference listener annotations (org.apache.aries.blueprint.annotation.referencelistener)
+  - @ReferenceListener Marks bean as reference listener
+  - @Bind Method of referenence listener to be called when service registers
+  - @Unbind Method of referenence listener to be called when service unregisters
+
+### Service annotations (org.apache.aries.blueprint.annotation.service)
+  - @Service Publishes a bean as an OSGi service with the given interfaces
+  - @ServiceProperty Defines a service property 
+  - @Reference Creates a reference to an OSGi service
+  - @ReferenceList Creates a list of references of an OSGi services
+
+### pax-cdi (supported in version 1.x, probably dropped in next major versions) ###
+  - @OsgiServiceProvider(classes={TaskService.class}) Publishes a bean as an OSGi service with the given interfaces
+  - @OsgiService creates a reference to an OSGi service. On optional filter is also possible
+  - @Properties Defines service properties for OSGiServiceProvider
+  - @Property Defines a service property 
+
+
 ### Spring (supported in version 1.x, probably dropped in next major versions) ###
   - @Autowired Inject a bean by type and optionally further qualifiers
   - @Component Creates bean witd default or given name
@@ -111,12 +129,6 @@ Creates blueprint xml from annotations i
         <optional>true</optional>
     </dependency>
     <dependency>
-        <groupId>org.ops4j.pax.cdi</groupId>
-        <artifactId>pax-cdi-api</artifactId>
-        <version>0.8.0</version>
-        <optional>true</optional>
-    </dependency>
-    <dependency>
         <groupId>javax.enterprise</groupId>
         <artifactId>cdi-api</artifactId>
         <version>1.2</version>
@@ -137,7 +149,13 @@ Creates blueprint xml from annotations i
     <dependency>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint-maven-plugin-annotation</artifactId>
-        <version>1.0.0</version>
+        <version>1.3.0</version>
+        <optional>true</optional>
+    </dependency>
+    <dependency>
+        <groupId>org.ops4j.pax.cdi</groupId>
+        <artifactId>pax-cdi-api</artifactId>
+        <version>0.8.0</version>
         <optional>true</optional>
     </dependency>
     <dependency>
@@ -155,7 +173,7 @@ Whole plugin is written using 'plugin ar
     <dependency>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint-maven-plugin-spi</artifactId>
-        <version>1.0.0</version>
+        <version>1.1.0</version>
     </dependency>
 
 Next add file (or files) to META-INF/services directory describing which interface implementation your artifact provides and add such artifact as plugin dependency
@@ -163,7 +181,7 @@ Next add file (or files) to META-INF/ser
     <plugin>
         <groupId>org.apache.aries.blueprint</groupId>
         <artifactId>blueprint-maven-plugin</artifactId>
-        <version>1.5.0</version>
+        <version>1.9.0</version>
         ...
         <dependencies>
             <dependency>
@@ -175,6 +193,17 @@ Next add file (or files) to META-INF/ser
         ...
     </plugin>
 
+## Additional configuration ##
+
+Bean from factories are named by bean class nams or as defined in @Named or @Bean annotations. 
+If you want to name such beans after producing method name then add configuration parameter:
+
+    <configuration>
+        <customParameters>
+            <blueprint.beanFromFactory.nameFromFactoryMethodName>true</blueprint.beanFromFactory.nameFromFactoryMethodName>
+        </customParameters>
+    </configuration>
+
 ## Example ##
 
 For a complete example see [tasklist-blueprint-cdi][1] on github or [tests of blueprint-maven-plugin][2].