I would like to use service ServiceLoader between diferrent modules in a maven Project. I have a parent module called iMage. In the parent module there is a module with a name jmjrst.main and it has a public abstract class called JmjrstPlugin
.
Then there is another module called prizm-plugin with the following class:
public class HelloWorldPlugin extends JmjrstPlugin{ ... }
I added jmjrst.main
as a dependency to prizm-plugin
and vica-versa as well.
In order to use ServiceLoader I wanted to use META-INF/services generator. I added the following line to the pom.xml of prizm-plugin:
<dependency>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
<version>1.1</version>
<optional>true</optional>
</dependency>
And the class HelloWorldPlugin starts like that:
@MetaInfServices(JmjrstPlugin.class)
public class HelloWorldPlugin extends JmjrstPlugin{ ... }
On the website on META-INF/services generator goes: "When you use javac in JavaSE6, META-INF/services/* files are generated automatically. No additional compiler switches are necessary. This library handles incremental compilation correctly, too."
At my case nothing is generated. Can somebody help me with that?