Package org.apache.maven.shared.verifier
Class Embedded3xLauncher
java.lang.Object
org.apache.maven.shared.verifier.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 voidstatic Embedded3xLauncherLaunches an embedded Maven 3.x instance from the current class path, i.e.static Embedded3xLaunchercreateFromMavenHome(String mavenHome, String classworldConf, List<URL> classpath) Launches an embedded Maven 3.x instance from some Maven installation directory.private static FilefindProjectBaseDirectory(File workingDirectory) Replicates the logic from Maven start script to find the project's base directory.private static ClassLoadergetBootLoader(String mavenHome, List<URL> classpath) intrun(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:
runin interfaceMavenLauncher- Throws:
IOExceptionLauncherException
-
getMavenVersion
- Specified by:
getMavenVersionin 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
-