
public.javadoc.org.spincast.plugins.processutils.SpincastProcessUtilsDefault.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.
SpincastProcessUtilsDefault (org.spincast:spincast-framework 1.7.1 API)
org.spincast.plugins.processutils
Class SpincastProcessUtilsDefault
- java.lang.Object
-
- org.spincast.plugins.processutils.SpincastProcessUtilsDefault
-
- All Implemented Interfaces:
- SpincastProcessUtils
public class SpincastProcessUtilsDefault
extends Object
implements SpincastProcessUtils
-
-
Constructor Summary
Constructors
Constructor and Description
SpincastProcessUtilsDefault(SpincastConfig spincastConfig,
SpincastUtils spincastUtils,
TemplatingEngine templatingEngine)
-
Method Summary
All Methods Instance Methods Concrete 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.
protected SpincastConfig
getSpincastConfig()
protected SpincastUtils
getSpincastUtils()
protected TemplatingEngine
getTemplatingEngine()
-
-
Constructor Detail
-
SpincastProcessUtilsDefault
@Inject
public SpincastProcessUtilsDefault(SpincastConfig spincastConfig,
SpincastUtils spincastUtils,
TemplatingEngine templatingEngine)
-
Method Detail
-
getSpincastConfig
protected SpincastConfig getSpincastConfig()
-
getSpincastUtils
protected SpincastUtils getSpincastUtils()
-
getTemplatingEngine
protected TemplatingEngine getTemplatingEngine()
-
executeGoalOnExternalMavenProject
public File executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo,
MavenProjectGoal mavenGoal)
Description copied from interface: SpincastProcessUtils
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).
- Specified by:
executeGoalOnExternalMavenProject
in interface SpincastProcessUtils
- 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
public File executeGoalOnExternalMavenProject(ResourceInfo projectRootInfo,
MavenProjectGoal mavenGoal,
Map<String,Object> pomParams)
Description copied from interface: SpincastProcessUtils
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).
- Specified by:
executeGoalOnExternalMavenProject
in interface SpincastProcessUtils
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
public void executeJar(String jarFilePath,
List<String> args,
JarExecutionHandler handler)
Description copied from interface: SpincastProcessUtils
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();
}
- Specified by:
executeJar
in interface SpincastProcessUtils
-
executeJar
public void executeJar(String javaBinPath,
String jarFilePath,
List<String> args,
JarExecutionHandler handler)
Description copied from interface: SpincastProcessUtils
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();
}
- Specified by:
executeJar
in interface SpincastProcessUtils
- Parameters:
javaBinPath
- The path to the java
executable to use.
Copyright © 2019. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy