users@glassfish.java.net

Re: Re: Hk2 - what is it, how to use it?

From: <forums_at_java.net>
Date: Mon, 18 Feb 2013 06:30:00 -0600 (CST)

Do you know how the HK2-maven plugin works ? I try to use hk2-maven-plugin
v2.0.5 to generate an HK2 Log Handler (for Glassfish 3.1.2.2). I made a very
simple Java Class : @Service @ContractProvided(Handler.class)
@Scoped(Singleton.class) public class MyHandler extends Handler implements
PostConstruct { // Methods Implementation } I try to use Maven to generate
the Jar file with generated META-INF/services (like the doc
http://docs.oracle.com/cd/E26576_01/doc.312/e24927/writing-hk2-components.htm#ghpvp
says) in my POM I add the plugin : org.glassfish.hk2 hk2-maven-plugin 2.0.5
true fr/** and the dependency: org.glassfish.hk2 hk2-maven-plugin 2.0.5
compile but there's nothing generated. In my jar I have my .class and a
standard Manifest.MF Manifest-Version: 1.0 Archiver-Version: Plexus Archiver
Created-By: Apache Maven Built-By: H Build-Jdk: 1.7.0_09 Have you got an idea
? a sample ? Thanks

--
[Message sent by forum member 'hopipouet']
View Post: http://forums.java.net/node/894728