Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: _Plugin Submission
-
Labels:None
-
Environment:any
-
Complexity:Intermediate
-
Number of attachments :
Description
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
Patch to get the plugin work under Windows as well.
Reamrk: Please excuse me for being quite new to creating patches on the console without having a version controlling system.