guice:run

Full name:

org.kuali.maven.plugins:guice-maven-plugin:1.0.4:run

Description:

Create a Guice injector from the configured modules, get a java.lang.Runnable from the injector, and run it.

If no explicit modules are configured, look for a default module using groupId + artifactId by converting artifactId to camel case and appending the word Module. For example, the default module that would be loaded using this plugin's GAV information is:

org.kuali.maven.plugins.GuiceMavenPluginModule


Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Invokes the execution of this plugin's goal run prior to executing itself.

Optional Parameters

Name Type Since Description
annotation String - If supplied, the java.lang.Runnable must be bound using annotatedWith this annotation For example:
  bind(Runnable.class).annotatedWith([guice.annotation]).toInstance(new Runnable() { public void run() { System.out.println("hello world"); } };);

User property is: guice.annotation.
forceMojoExecution boolean - If true, mojo execution will always occur
Default value is: false.
User property is: guice.forceMojoExecution.
module String - The Guice module to use when creating the injector. This comes after guice.modules (if any were supplied).
User property is: guice.module.
modules List - List of Guice modules to use when creating the injector. If supplied, these come before guice.module
User property is: guice.modules.
provider String - A provider that returns Iterable<AbstractModule>, to supply to the injector.
User property is: guice.provider.
skip boolean - If true, mojo execution is skipped (unless forceMojoExecution is true)
Default value is: false.
User property is: guice.skip.

Parameter Details

annotation:

If supplied, the java.lang.Runnable must be bound using annotatedWith this annotation For example:
  bind(Runnable.class).annotatedWith([guice.annotation]).toInstance(new Runnable() { public void run() { System.out.println("hello world"); } };);
  • Type: java.lang.String
  • Required: No
  • User Property: guice.annotation

forceMojoExecution:

If true, mojo execution will always occur
  • Type: boolean
  • Required: No
  • User Property: guice.forceMojoExecution
  • Default: false

module:

The Guice module to use when creating the injector. This comes after guice.modules (if any were supplied).
  • Type: java.lang.String
  • Required: No
  • User Property: guice.module

modules:

List of Guice modules to use when creating the injector. If supplied, these come before guice.module
  • Type: java.util.List
  • Required: No
  • User Property: guice.modules

provider:

A provider that returns Iterable<AbstractModule>, to supply to the injector.
  • Type: java.lang.String
  • Required: No
  • User Property: guice.provider

skip:

If true, mojo execution is skipped (unless forceMojoExecution is true)
  • Type: boolean
  • Required: No
  • User Property: guice.skip
  • Default: false