@Mojo(name="run",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
defaultPhase=NONE,
threadSafe=true)
public class NinjaRunMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
buildOutputDirectory
Directory containing the build files.
|
protected String |
context
Context path for SuperDevMode.
|
protected String |
contextPath
Deprecated.
|
protected List<String> |
excludes
Exludes in Java regex format.
|
protected List<String> |
includes
Includes in Java regex format.
|
protected String |
jvmArgs
Extra arguments to pass to the forked JVM.
|
protected String |
mainClass
Main class to run in SuperDevMode.
|
protected String |
mode
Mode for SuperDevMode.
|
protected List<org.apache.maven.artifact.Artifact> |
pluginArtifacts |
protected Integer |
port
Port for SuperDevMode (can also be set in conf/application.conf)
|
protected org.apache.maven.project.MavenProject |
project |
protected Long |
settleDownMillis
Amount of time to wait for file changes to settle down before triggering a
restart in SuperDevMode.
|
protected boolean |
skip
Skip execution of this plugin.
|
protected Integer |
sslPort
SSL port for SuperDevMode (can also be set in conf/application.conf)
|
protected boolean |
useDefaultExcludes
Adds assets directory and freemarker templates to excluded files.
|
protected boolean |
watchAllClassPathDirs
Watch all directories on runtime classpath of project.
|
protected boolean |
watchAllClassPathJars
Watch all jars on runtime classpath of project.
|
protected File[] |
watchDirs
All directories to watch for changes.
|
| Constructor and Description |
|---|
NinjaRunMojo() |
@Parameter(defaultValue="${project}",
readonly=true)
protected org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${plugin.artifacts}",
readonly=true)
protected List<org.apache.maven.artifact.Artifact> pluginArtifacts
@Parameter(property="ninja.skip",
defaultValue="false",
required=true)
protected boolean skip
@Parameter(property="ninja.outputDirectory",
defaultValue="${project.build.outputDirectory}",
required=true)
protected String buildOutputDirectory
@Parameter(property="ninja.watchDirs",
required=false)
protected File[] watchDirs
@Parameter(property="ninja.watchAllClassPathDirs",
defaultValue="false",
required=true)
protected boolean watchAllClassPathDirs
@Parameter(property="ninja.watchAllClassPathJars",
defaultValue="false",
required=true)
protected boolean watchAllClassPathJars
@Parameter(property="ninja.includes",
required=false)
protected List<String> includes
@Parameter(property="ninja.excludes",
required=false)
protected List<String> excludes
@Parameter(property="ninja.useDefaultExcludes",
defaultValue="true",
required=true)
protected boolean useDefaultExcludes
@Parameter(property="ninja.context",
required=false)
protected String context
@Deprecated protected String contextPath
@Parameter(property="ninja.mode",
defaultValue="dev",
required=false)
protected String mode
@Parameter(property="ninja.port",
required=false)
protected Integer port
@Parameter(property="ninja.ssl.port",
required=false)
protected Integer sslPort
@Parameter(property="ninja.mainClass",
required=false)
protected String mainClass
@Parameter(property="ninja.jvmArgs",
required=false)
protected String jvmArgs
@Parameter(property="ninja.settleDownMillis",
defaultValue="500",
required=false)
protected Long settleDownMillis
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected String getContextPath()
protected DelayedRestartTrigger buildDelayedRestartTrigger(RunClassInSeparateJvmMachine machine)
protected WatchAndRestartMachine buildWatchAndRestartMachine(Set<Path> directoriesToRecursivelyWatch, Set<String> includes, Set<String> excludes, DelayedRestartTrigger restartTrigger) throws IOException
IOExceptionprotected RunClassInSeparateJvmMachine buildRunClassInSeparateJvmMachine(String name, String classNameWithMainToRun, List<String> classpath, List<String> jvmArguments, File mavenBaseDir)
protected void initMojoFromUserSubmittedParameters()
protected List<org.apache.maven.artifact.Artifact> getAllArtifactsComingFromNinjaStandalone(List<org.apache.maven.artifact.Artifact> artifacts)
artifacts - A list of artifacts that will be filtered.protected void alertAndStopExecutionIfDirectoryWithCompiledClassesOfThisProjectDoesNotExist(String directoryWithCompiledClassesOfThisProject) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionCopyright © 2016. All rights reserved.