You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2009/12/31 07:08:55 UTC

[jira] Closed: (MNG-4285) CliManager.parse() cannot be called from within a mojo

     [ http://jira.codehaus.org/browse/MNG-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed MNG-4285.
-----------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 2.3.x)

from what I understand, our best approach to this is just to work with Maven 3.0 embeddable components in the future. Please reopen if I've missed something.

> CliManager.parse() cannot be called from within a mojo
> ------------------------------------------------------
>
>                 Key: MNG-4285
>                 URL: http://jira.codehaus.org/browse/MNG-4285
>             Project: Maven 2 & 3
>          Issue Type: Bug
>    Affects Versions: 2.1.0, 2.2.0
>            Reporter: John Casey
>
> As reported by Benjamin Bentmann:
> {noformat}
> as per MNG-4024, the CLIManager was exposed to the public API. Its parse() method returns a CommandLine object from commons-cli. Per MNG-4166, commons-cli is no longer filtered from the plugin realm.
> This constellation prohibits the usage CLIManager.parse() from Maven 2.2.x in plugins as the returned CommandLine originates from the core realm and isn't type-compatible with the same class from the plugin realm.
> So, do we have a better option than to extend the Javadoc of CLIManager in order to clearly state that it's for integrators only and not for plugins? 
> {noformat}
> After discussing with him a little more on IRC, he suggested wrapping the return type from the CliManager.parse() method such that we're not passing around objects from the commons-cli API. One ready-made alternative to the commons-cli classes might be MavenExecutionRequest...returning this might enable plugins to use a standard interface to interact with Maven's CLI-parsing while at the same time hiding the conflicting commons-cli classes.
> We can't make a change like this in 2.2.x, but it makes a lot of sense to pursue for 2.3.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira