Skip to content

Commit

Permalink
failing test the demostrates issue #18
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Fedorenko <[email protected]>
  • Loading branch information
ifedorenko committed Apr 20, 2017
1 parent 970f0f6 commit 6b9ba31
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<takariLifecycleVersion>1.11.7</takariLifecycleVersion>
<mavenVersion>3.2.2</mavenVersion>
<mavenPluginPluginVersion>3.3</mavenPluginPluginVersion>
<it-project.version>2.5.0-SNAPSHOT</it-project.version>
<it-project.version>2.9.2-SNAPSHOT</it-project.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

0 comments on commit 6b9ba31

Please sign in to comment.