Package org.apache.maven.it
Class Embedded3xLauncher
java.lang.Object
org.apache.maven.it.Embedded3xLauncher
- All Implemented Interfaces:
MavenLauncher
Launches an embedded Maven 3.x instance from some Maven installation directory.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
static Embedded3xLauncher
Launches an embedded Maven 3.x instance from the current class path, i.e.static Embedded3xLauncher
createFromMavenHome
(String mavenHome, String classworldConf, List<URL> classpath) Launches an embedded Maven 3.x instance from some Maven installation directory.private static File
findProjectBaseDirectory
(File workingDirectory) Replicates the logic from Maven start script to find the project's base directory.private static ClassLoader
getBootLoader
(String mavenHome, List<URL> classpath) int
run
(String[] cliArgs, Properties systemProperties, String workingDirectory, File logFile)
-
Field Details
-
mavenCli
-
doMain
-
-
Constructor Details
-
Embedded3xLauncher
-
-
Method Details
-
createFromMavenHome
public static Embedded3xLauncher createFromMavenHome(String mavenHome, String classworldConf, List<URL> classpath) throws LauncherException Launches an embedded Maven 3.x instance from some Maven installation directory.- Throws:
LauncherException
-
createFromClasspath
Launches an embedded Maven 3.x instance from the current class path, i.e. the Maven 3.x dependencies are assumed to be present on the class path.- Throws:
LauncherException
-
getBootLoader
-
addUrls
-
run
public int run(String[] cliArgs, Properties systemProperties, String workingDirectory, File logFile) throws IOException, LauncherException - Specified by:
run
in interfaceMavenLauncher
- Throws:
IOException
LauncherException
-
getMavenVersion
- Specified by:
getMavenVersion
in interfaceMavenLauncher
- Throws:
LauncherException
-
findProjectBaseDirectory
Replicates the logic from Maven start script to find the project's base directory.- Parameters:
workingDirectory
- the working directory- Returns:
- the project's base directory
-