public class MavenEmbedderUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
debug |
| Modifier and Type | Method and Description |
|---|---|
static org.codehaus.plexus.classworlds.realm.ClassRealm |
buildClassRealm(File mavenHome,
org.codehaus.plexus.classworlds.ClassWorld world,
ClassLoader parentClassLoader)
build a
ClassRealm with all jars in mavenHome/lib/*.jar |
static org.codehaus.plexus.PlexusContainer |
buildPlexusContainer(ClassLoader mavenClassLoader,
ClassLoader parent,
MavenRequest mavenRequest)
used by PomParser in Jenkins
|
static org.codehaus.plexus.PlexusContainer |
buildPlexusContainer(File mavenHome,
MavenRequest mavenRequest) |
static MavenInformation |
getMavenVersion(File mavenHome) |
static boolean |
isAtLeastMavenVersion(File mavenHome,
String version) |
public static org.codehaus.plexus.classworlds.realm.ClassRealm buildClassRealm(File mavenHome, org.codehaus.plexus.classworlds.ClassWorld world, ClassLoader parentClassLoader) throws MavenEmbedderException
build a ClassRealm with all jars in mavenHome/lib/*.jar
the ClassRealm is ChildFirst with the current classLoader as parent.
mavenHome - cannot be nullworld - can be nullMavenEmbedderExceptionpublic static org.codehaus.plexus.PlexusContainer buildPlexusContainer(File mavenHome, MavenRequest mavenRequest) throws MavenEmbedderException
MavenEmbedderExceptionpublic static org.codehaus.plexus.PlexusContainer buildPlexusContainer(ClassLoader mavenClassLoader, ClassLoader parent, MavenRequest mavenRequest) throws MavenEmbedderException
mavenClassLoader - parent - mavenRequest - MavenEmbedderExceptionpublic static MavenInformation getMavenVersion(@Nonnull File mavenHome) throws MavenEmbedderException
mavenHome - Maven Home directoryMavenEmbedderException - Operation failurepublic static boolean isAtLeastMavenVersion(File mavenHome, String version) throws MavenEmbedderException
MavenEmbedderExceptionCopyright © 2004–2019. All rights reserved.