Class MavenAetherUtils
- java.lang.Object
-
- org.apache.maven.shared.transfer.project.MavenAetherUtils
-
public class MavenAetherUtils extends java.lang.ObjectThis util class will import the Aether library available from the installed Maven distribution. It will do nothing if it is called from outside of a ClassRealm.- Since:
- 0.11.1
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGERprivate static java.lang.StringNO_SUCH_REALM_EXCEPTION
-
Constructor Summary
Constructors Constructor Description MavenAetherUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidimportAether(java.lang.ClassLoader classLoader)Imports aether-util library from the user's Maven distribution.static voidimportAetherLibrary()Import the core Aether library from the maven distribution.private static booleanisClassRealm(java.lang.ClassLoader classLoader)Using reflection, check if the Classloader is actually an instance of a ClassRealm.
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
NO_SUCH_REALM_EXCEPTION
private static final java.lang.String NO_SUCH_REALM_EXCEPTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
importAetherLibrary
public static void importAetherLibrary()
Import the core Aether library from the maven distribution.
-
importAether
private static void importAether(java.lang.ClassLoader classLoader)
Imports aether-util library from the user's Maven distribution.PRECONDITION: the classLoader parameter is an instance of ClassRealm.
- Parameters:
classLoader- the Classloader which needs to access aether-util.
-
isClassRealm
private static boolean isClassRealm(java.lang.ClassLoader classLoader)
Using reflection, check if the Classloader is actually an instance of a ClassRealm.- Parameters:
classLoader- the Classloader to test.- Returns:
- true if it an instance of ClassRealm; false otherwise.
-
-