[
http://jira.codehaus.org/browse/MOJO-1272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=213317#action_213317
]
Milos Kleint commented on MOJO-1272:
------------------------------------
just a side note:
I believe using annotations and jdk 1.6 annotation processors to generate
META-INF services entries is more transparent and deterministic than examining
the entire codebase.
I'm not sure if there is a generic purpose annotation processor for this sort
of thing, netbeans.org uses it's own version which does some additional stuff
on top of the jdk serviceloader.
http://hg.netbeans.org/main/file/7024baa3051f/openide.util.lookup/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java
http://hg.netbeans.org/main/file/7024baa3051f/openide.util.lookup/src/org/openide/util/lookup/ServiceProvider.java
> serviceloader-maven-plugin (for java6 ServiceLoader)
> ----------------------------------------------------
>
> Key: MOJO-1272
> URL: http://jira.codehaus.org/browse/MOJO-1272
> Project: Mojo
> Issue Type: New Feature
> Components: _Plugin Submission
> Environment: any
> Reporter: Francis De Brabandere
> Attachments: patch.zip, serviceloader-maven-plugin.zip
>
>
> I wrote a plugin that generates services files for the ServiceLoader
> introduced in Java 6 :
> http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html
> for example:
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
>
> <artifactId>serviceloader-maven-plugin</artifactId>
> <configuration>
> <services>
> <param>com.foo.Dictionary</param>
> <param>com.foo.Operation</param>
> </services>
> </configuration>
> </plugin>
> </plugins>
> </build>
> this will generate these files:
> META-INF/services/com.foo.Dictionary
> META-INF/services/com.foo.Operation
> by scanning the generated classes and finding all
> non-abstract/non-interface implementations of the service interfaces.
> The plugin itself has no Java 6 dependency
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email