org.eclipse.xtend.maven.AbstractXtendMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of report Show documentation
Show all versions of report Show documentation
The report generator for the Jnario testing language.
The newest version!
package org.eclipse.xtend.maven;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
import com.google.inject.Inject;
public abstract class AbstractXtendMojo extends AbstractMojo {
@Inject
protected MavenLog4JConfigurator log4jConfigurator;
/**
* The project itself. This parameter is set by maven.
*
* @parameter expression="${project}"
* @required
*/
protected MavenProject project;
/**
* Set this to true to skip compiling Xtend sources.
*
* @parameter default-value="false" expression="${skipXtend}"
*/
protected boolean skipXtend;
public AbstractXtendMojo() {
injectMembers();
}
public void execute() throws MojoExecutionException, MojoFailureException {
if (isSkipped()) {
getLog().info("skipped.");
} else {
log4jConfigurator.configureLog4j(getLog());
internalExecute();
}
}
protected void injectMembers() {
new XtendMavenStandaloneSetup().createInjectorAndDoEMFRegistration().injectMembers(this);
}
protected abstract void internalExecute() throws MojoExecutionException, MojoFailureException;
protected boolean isSkipped() {
return skipXtend;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy