diff --git a/takari-plugin-testing-its/src/test/projects/guicescopes/pom.xml b/takari-plugin-testing-its/src/test/projects/guicescopes/pom.xml index 5786963..eddccbc 100644 --- a/takari-plugin-testing-its/src/test/projects/guicescopes/pom.xml +++ b/takari-plugin-testing-its/src/test/projects/guicescopes/pom.xml @@ -21,7 +21,7 @@ 1.11.7 3.2.2 3.3 - 2.5.0-SNAPSHOT + 2.9.2-SNAPSHOT diff --git a/takari-plugin-testing-its/src/test/projects/guicescopes/src/main/java/guicescopes/GuiceScopesJSR330Mojo.java b/takari-plugin-testing-its/src/test/projects/guicescopes/src/main/java/guicescopes/GuiceScopesJSR330Mojo.java new file mode 100644 index 0000000..311c20d --- /dev/null +++ b/takari-plugin-testing-its/src/test/projects/guicescopes/src/main/java/guicescopes/GuiceScopesJSR330Mojo.java @@ -0,0 +1,23 @@ +package guicescopes; + +import javax.inject.Inject; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Mojo; + +@Mojo(name = "guicescopes-jsr330") +public class GuiceScopesJSR330Mojo extends AbstractMojo { + + @Inject + private MojoScopedComponent component; + + @Override + public void execute() throws MojoExecutionException, MojoFailureException { + if (component == null) { + throw new NullPointerException(); + } + } + +} diff --git a/takari-plugin-testing-its/src/test/projects/guicescopes/src/test/java/guicescopes/GuiceScopesTest.java b/takari-plugin-testing-its/src/test/projects/guicescopes/src/test/java/guicescopes/GuiceScopesTest.java index 422f907..bc839ad 100644 --- a/takari-plugin-testing-its/src/test/projects/guicescopes/src/test/java/guicescopes/GuiceScopesTest.java +++ b/takari-plugin-testing-its/src/test/projects/guicescopes/src/test/java/guicescopes/GuiceScopesTest.java @@ -22,4 +22,11 @@ public void test() throws Exception { // blows up if @MojoExecutionScoped component can't be injected maven.executeMojo(basedir, "guicescopes"); } + + @Test + public void test_jsr330() throws Exception { + File basedir = resources.getBasedir(); + // blows up if @MojoExecutionScoped component can't be injected + maven.executeMojo(basedir, "guicescopes-jsr330"); + } }