hudson.maven
Class MavenEmbedderUtils
java.lang.Object
hudson.maven.MavenEmbedderUtils
public class MavenEmbedderUtils
- extends java.lang.Object
- Author:
- Olivier Lamy
|
Field Summary |
static boolean |
debug
|
|
Method Summary |
static org.codehaus.plexus.classworlds.realm.ClassRealm |
buildClassRealm(java.io.File mavenHome,
org.codehaus.plexus.classworlds.ClassWorld world,
java.lang.ClassLoader parentClassLoader)
build a ClassRealm with all jars in mavenHome/lib/*.jar
the ClassRealm is ChildFirst with the current classLoader as parent. |
static org.codehaus.plexus.PlexusContainer |
buildPlexusContainer(java.lang.ClassLoader mavenClassLoader,
java.lang.ClassLoader parent,
MavenRequest mavenRequest)
used by PomParser in Jenkins |
static org.codehaus.plexus.PlexusContainer |
buildPlexusContainer(java.io.File mavenHome,
MavenRequest mavenRequest)
|
static MavenInformation |
getMavenVersion(java.io.File mavenHome)
|
static boolean |
isAtLeastMavenVersion(java.io.File mavenHome,
java.lang.String version)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
public static boolean debug
buildClassRealm
public static org.codehaus.plexus.classworlds.realm.ClassRealm buildClassRealm(java.io.File mavenHome,
org.codehaus.plexus.classworlds.ClassWorld world,
java.lang.ClassLoader parentClassLoader)
throws MavenEmbedderException
build a ClassRealm with all jars in mavenHome/lib/*.jar
the ClassRealm is ChildFirst with the current classLoader as parent.
- Parameters:
mavenHome - cannot be nullworld - can be null
- Returns:
-
- Throws:
MavenEmbedderException
buildPlexusContainer
public static org.codehaus.plexus.PlexusContainer buildPlexusContainer(java.io.File mavenHome,
MavenRequest mavenRequest)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
buildPlexusContainer
public static org.codehaus.plexus.PlexusContainer buildPlexusContainer(java.lang.ClassLoader mavenClassLoader,
java.lang.ClassLoader parent,
MavenRequest mavenRequest)
throws MavenEmbedderException
- used by PomParser in Jenkins
- Parameters:
mavenClassLoader - parent - mavenRequest -
- Returns:
-
- Throws:
MavenEmbedderException
getMavenVersion
public static MavenInformation getMavenVersion(java.io.File mavenHome)
throws MavenEmbedderException
- Parameters:
mavenHome -
- Returns:
- the maven version
- Throws:
MavenEmbedderException
isAtLeastMavenVersion
public static boolean isAtLeastMavenVersion(java.io.File mavenHome,
java.lang.String version)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
Copyright © 2011. All Rights Reserved.