List of usage examples for org.apache.maven.plugin MojoExecution getSource
public Source getSource()
From source file:com.github.sdedwards.m2e_nar.internal.NarTestCompileBuildParticipant.java
License:Apache License
public NarTestCompileBuildParticipant(MojoExecution execution, boolean runOnIncremental, boolean runOnConfiguration) { super(new MojoExecution(execution.getMojoDescriptor(), execution.getExecutionId(), execution.getSource()), runOnIncremental, runOnConfiguration); // Some versions of nar-maven-plugin don't have a nar-test-unpack goal // this means the test artifacts won't be available to us. // What we need to do is run the nar-testCompile goal without any tests // its configuration in order to just unpack. Xpp3Dom configuration = new Xpp3Dom(execution.getConfiguration()); logger.debug("Configuration before: " + configuration); for (int i = 0; i < configuration.getChildCount(); ++i) { if ("tests".equals(configuration.getChild(i).getName())) { configuration.removeChild(i); break; }//from ww w . j av a2s .c o m } logger.debug("Configuration after: " + configuration); getMojoExecution().setConfiguration(configuration); }