jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-4285

CliManager.parse() cannot be called from within a mojo

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 2.1.0, 2.2.0
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Complexity:
    Intermediate

Description

As reported by Benjamin Bentmann:

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? 

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.

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-4166 Problem parsing command-line options in release:perform

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Improvement - An improvement or enhancement to an existing feature or task. MNG-4024 Open up CLIManager

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brett Porter added a comment - 31/Dec/09 12:08 AM

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.

Show
Brett Porter added a comment - 31/Dec/09 12:08 AM 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.

People

  • Assignee:
    Unassigned
    Reporter:
    John Casey
Vote (0)
Watch (0)

Dates

  • Created:
    06/Aug/09 10:14 AM
    Updated:
    31/Dec/09 12:08 AM
    Resolved:
    31/Dec/09 12:08 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.