
public.javadoc.org.spincast.plugins.processutils.SpincastProcessUtils.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastProcessUtils (org.spincast:spincast-framework 1.7.1 API)
org.spincast.plugins.processutils
Interface SpincastProcessUtils
-
- All Known Implementing Classes:
- SpincastProcessUtilsDefault
public interface SpincastProcessUtils
Utilities related to processes and external projects
manipulation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods
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.
-
-
Method Detail
-
executeGoalOnExternalMavenProject
File executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo,
MavenProjectGoal mavenGoal)
Execute the specified goal on an external Maven project.
If the project is located on the classpath, it
first copies it to the file system (in a temp folder).
- Returns:
- the root directory of the project. This will be
the same as the specified path if on the file system,
or will be the created temp directory where the project from the
classpath has been copied otherwise.
-
executeGoalOnExternalMavenProject
File executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo,
MavenProjectGoal mavenGoal,
Map<String,Object> pomParams)
Execute the specified goal on an external Maven project.
If the project is located on the classpath, it
first copies it to the file system (in a temp folder).
- Parameters:
pomParams
- Before executing the goal, those parameters
are used to replace placeholders in the project's pom.xml
using Spincast's TemplatingEngine
.
- Returns:
- the root directory of the project. This will be
the same as the specified path if on the file system,
or will be the created temp directory where the project from the
classpath has been copied otherwise.
-
executeJar
void executeJar(String jarFilePath,
List<String> args,
JarExecutionHandler handler)
Run an executable .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();
}
-
executeJar
void executeJar(String javaBinPath,
String jarFilePath,
List<String> args,
JarExecutionHandler handler)
Run an executable .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();
}
- Parameters:
javaBinPath
- The path to the java
executable to use.
Copyright © 2019. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy