Hi,

currently i'll try to use the DI things of Maven and simply failing...to use it...

I just simply wan't to use a class in a Maven plugin.

So in my plugin i would like to do a thing like this:


...
import org.apache.maven.plugins.annotations.Component;
...

@Component
private WindowsExecutableExtension special;


My interface looks like this:

public interfacte WindowsExecutableExtension {

  String ROLE = WindowsExecutableExtension.class.getName();
...
}


So my class DefaultWindowsExecutableExtension.java implements the interface WindowsExecutableExtension and it looks like this:

public class DefaultWindowsExecutableExtensions
    implements WindowsExecutableExtension
{
...
   public DefaultWindowsExecutableExtensions() {
    ...
   }
}



So i expected to get injected the class instantiated by the default constructor (non parameters)...

But currently i allways get the following:

[DEBUG] Configuring mojo org.codehaus.mojo:exec-maven-plugin:1.3-SNAPSHOT:exec from plugin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:1.3-SNAPSHOT, parent: sun.misc.Launcher$AppClassLoader@3f610944]
[WARNING] Error injecting: org.codehaus.mojo.exec.ExecMojo
com.google.inject.ProvisionException: Guice provision errors:

1) No implementation for org.codehaus.mojo.exec.WindowsExecutableExtension was bound.
  while locating org.codehaus.mojo.exec.ExecMojo

I assume that i make a very simple mistake but i don't see it ?

Can someone enlighten me ?

Thanks in advance...

Kind regards
Karl-Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to