Class MavenCling
java.lang.Object
org.apache.maven.cling.ClingSupport
org.apache.maven.cling.MavenCling
Maven CLI "new-gen".
This is the default entry point for Maven. When launched via ClassWorlds, it checks the
maven.mainClass system property and delegates to the specified class if set.
This allows external tools (Maven Wrapper, IDEs) to launch Maven without setting
the main class property — MavenCling is used as the default.
-
Field Summary
Fields inherited from class ClingSupport
classWorld, classWorldManaged -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Invokerprotected Parserprotected ParserRequest.BuildercreateParserRequestBuilder(String[] args) static void"Normal" Java entry point.static intClassWorld Launcher "enhanced" entry point: returning exitCode and accepts Class World.static intmain(String[] args, org.codehaus.plexus.classworlds.ClassWorld world, InputStream stdIn, OutputStream stdOut, OutputStream stdErr) ClassWorld Launcher "embedded" entry point: returning exitCode and accepts Class World and streams.Methods inherited from class ClingSupport
createMessageBuilderFactory, run
-
Constructor Details
-
MavenCling
public MavenCling() -
MavenCling
public MavenCling(org.codehaus.plexus.classworlds.ClassWorld classWorld)
-
-
Method Details
-
main
"Normal" Java entry point. Note: Maven uses ClassWorld Launcher and this entry point is NOT used under normal circumstances.- Throws:
IOException
-
main
public static int main(String[] args, org.codehaus.plexus.classworlds.ClassWorld world) throws IOException ClassWorld Launcher "enhanced" entry point: returning exitCode and accepts Class World.When the
maven.mainClasssystem property is set to a class other thanMavenCling, this method delegates to that class'smain(String[], ClassWorld)method via reflection. This makesMavenClingthe default entry point that external tools (such as the Maven Wrapper or IDEs) can rely on without needing to set themaven.mainClassproperty.- Throws:
IOException
-
main
public static int main(String[] args, org.codehaus.plexus.classworlds.ClassWorld world, @Nullable InputStream stdIn, @Nullable OutputStream stdOut, @Nullable OutputStream stdErr) throws IOException ClassWorld Launcher "embedded" entry point: returning exitCode and accepts Class World and streams.- Throws:
IOException
-
createInvoker
- Specified by:
createInvokerin classClingSupport
-
createParser
- Specified by:
createParserin classClingSupport
-
createParserRequestBuilder
- Specified by:
createParserRequestBuilderin classClingSupport
-