Key code is here: https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L1367-L1431 The CliRequest contains all the original arguments, MavenExecutionRequest transforms these values and can be accessed via MavenSession.
I don't see anything related to showVersion.
If you have a good argument why you need it later, you can provide a PR where the MavenExecutionRequest is extended with boolean showVersion()

thanks,
Robert

------ Oorspronkelijke bericht ------
Van "Christoph Läubrich" <[email protected]>
Aan "Maven Developers List" <[email protected]>
Datum 10-11-2022 08:49:03
Onderwerp Access the maven commandline options from a plexus component?

Is it possible to access the commandline options I pass to maven in a plexus 
component?

I'm especially interested in the -V option because I want this to trigger 
printing the version of my core-extension as well

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to