
net.jangaroo.jooc.mvnplugin.SenchaAppWatchMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jangaroo-maven-plugin Show documentation
Show all versions of jangaroo-maven-plugin Show documentation
This plugin compiles Jangaroo sources to JavaScript.
The newest version!
package net.jangaroo.jooc.mvnplugin;
import net.jangaroo.jooc.mvnplugin.sencha.SenchaUtils;
import net.jangaroo.jooc.mvnplugin.sencha.executor.SenchaCmdExecutor;
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;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import java.io.File;
/**
* Start "sencha app watch" for a jangaroo-app project.
*/
@Mojo(name = "app-watch", threadSafe = true)
public class SenchaAppWatchMojo extends AbstractSenchaMojo {
@Parameter(defaultValue = "${project.build.directory}" + SenchaUtils.APP_TARGET_DIRECTORY)
private File appTargetDir;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (!Type.JANGAROO_APP_PACKAGING.equals(project.getPackaging())) {
throw new MojoExecutionException("This goal only supports projects with packaging type \"jangaroo-app\"");
}
String arguments = "app watch";
getLog().info("Starting \"sencha app watch\"");
SenchaCmdExecutor senchaCmdExecutor = new SenchaCmdExecutor(appTargetDir, arguments, getSenchaJvmArgs(), getLog(), getSenchaLogLevel());
senchaCmdExecutor.execute();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy