All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.processutils.SpincastProcessUtilsDefault.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






SpincastProcessUtilsDefault (org.spincast:spincast-framework 1.7.1 API)












org.spincast.plugins.processutils

Class SpincastProcessUtilsDefault

  • java.lang.Object
    • org.spincast.plugins.processutils.SpincastProcessUtilsDefault
    • Method Detail

      • 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