public interface SpincastProcessUtils
| Modifier and Type | Method and Description |
|---|---|
File |
executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo,
MavenProjectGoal mavenGoal)
Execute the specified goal on an external Maven project.
|
File |
executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo,
MavenProjectGoal mavenGoal,
Map<String,Object> pomParams)
Execute the specified goal on an external Maven project.
|
void |
executeJar(String jarFilePath,
List<String> args,
JarExecutionHandler handler)
Run an executable
.jar by passing the
specified arguments. |
void |
executeJar(String javaBinPath,
String jarFilePath,
List<String> args,
JarExecutionHandler handler)
Run an executable
.jar by passing the
specified arguments. |
File executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo, MavenProjectGoal mavenGoal)
If the project is located on the classpath, it first copies it to the file system (in a temp folder).
File executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo, MavenProjectGoal mavenGoal, Map<String,Object> pomParams)
If the project is located on the classpath, it first copies it to the file system (in a temp folder).
pomParams - Before executing the goal, those parameters
are used to replace placeholders in the project's pom.xml
using Spincast's TemplatingEngine.void executeJar(String jarFilePath, List<String> args, JarExecutionHandler handler)
.jar by passing the
specified arguments.
If the process is not made to die automatically (for example it starts an HTTP server), you must kill the process by yourself!:
JarExecutionHandlerDefault handler = new JarExecutionHandlerDefault();
getSpincastProcessUtils().executeJar(jarFile.getAbsolutePath(),
Lists.newArrayList(),
handler);
try {
//...
} finally {
handler.killJarProcess();
}
void executeJar(String javaBinPath, String jarFilePath, List<String> args, JarExecutionHandler handler)
.jar by passing the
specified arguments.
If the process is not made to die automatically (for example it starts an HTTP server), you must kill the process by yourself!:
JarExecutionHandlerDefault handler = new JarExecutionHandlerDefault();
getSpincastProcessUtils().executeJar(jarFile.getAbsolutePath(),
Lists.newArrayList(),
handler);
try {
//...
} finally {
handler.killJarProcess();
}
javaBinPath - The path to the java
executable to use.Copyright © 2019. All rights reserved.