You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andre Ranvik (JIRA)" <ji...@codehaus.org> on 2006/03/22 09:26:11 UTC

[jira] Created: (MNG-2166) Provide the help listing as default when no arguments are provided

Provide the help listing as default when no arguments are provided
------------------------------------------------------------------

         Key: MNG-2166
         URL: http://jira.codehaus.org/browse/MNG-2166
     Project: Maven 2
        Type: New Feature

  Components: Command Line  
    Versions: 2.0, 2.0.1, 2.0.2    
 Environment: Any
    Reporter: Andre Ranvik
    Priority: Minor


When just writing "mvn" with no arguments on the command line I get a message such as this: 
>mvn
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ----------------------------------------------------------------------------
[INFO] You must specify at least one goal. Try 'install'
[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Mar 22 09:15:04 CET 2006
[INFO] Final Memory: 1M/2M
[INFO] ----------------------------------------------------------------------------

Many new users to maven or any other such tools are used to getting at least some basic info of what is expected. How about just displaying the listing that shows up when a user writes "mvn -h" as default when no arguments are privided? This is also a feature that most other similar products have.  I also would suggest printing a URL for where they can get basic information for how to use maven.


-- 
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


[jira] Updated: (MNG-2166) Provide the help listing as default when no arguments are provided

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2166?page=all ]

John Casey updated MNG-2166:
----------------------------

    Fix Version: 2.2

> Provide the help listing as default when no arguments are provided
> ------------------------------------------------------------------
>
>          Key: MNG-2166
>          URL: http://jira.codehaus.org/browse/MNG-2166
>      Project: Maven 2
>         Type: New Feature

>   Components: Command Line
>     Versions: 2.0, 2.0.1, 2.0.2
>  Environment: Any
>     Reporter: Andre Ranvik
>     Priority: Minor
>      Fix For: 2.2

>
>
> When just writing "mvn" with no arguments on the command line I get a message such as this: 
> >mvn
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ----------------------------------------------------------------------------
> [INFO] You must specify at least one goal. Try 'install'
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Wed Mar 22 09:15:04 CET 2006
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> Many new users to maven or any other such tools are used to getting at least some basic info of what is expected. How about just displaying the listing that shows up when a user writes "mvn -h" as default when no arguments are privided? This is also a feature that most other similar products have.  I also would suggest printing a URL for where they can get basic information for how to use maven.

-- 
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


[jira] Commented: (MNG-2166) Provide the help listing as default when no arguments are provided

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104146 ] 

Brian Fox commented on MNG-2166:
--------------------------------

It is possible to set a default goal in the pom such that "mvn" is a valid invocation, however if no goals are found even after processing the pom, it would make sense to display some info.

> Provide the help listing as default when no arguments are provided
> ------------------------------------------------------------------
>
>                 Key: MNG-2166
>                 URL: http://jira.codehaus.org/browse/MNG-2166
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Command Line
>    Affects Versions: 2.0, 2.0.1, 2.0.2
>         Environment: Any
>            Reporter: Andre Ranvik
>            Priority: Minor
>             Fix For: 2.2.x
>
>
> When just writing "mvn" with no arguments on the command line I get a message such as this: 
> >mvn
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ----------------------------------------------------------------------------
> [INFO] You must specify at least one goal. Try 'install'
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Wed Mar 22 09:15:04 CET 2006
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> Many new users to maven or any other such tools are used to getting at least some basic info of what is expected. How about just displaying the listing that shows up when a user writes "mvn -h" as default when no arguments are privided? This is also a feature that most other similar products have.  I also would suggest printing a URL for where they can get basic information for how to use maven.

-- 
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

        

[jira] Updated: (MNG-2166) Provide the help listing as default when no arguments are provided

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-2166:
-----------------------------------

    Attachment: no-goal-help.patch

I still consider the output from Maven quite unhelpful in this case. Please consider that Maven is just a tool/utility for developers and hence not everybody out there will spend time to get through the documentation. Some peoply simply want to "use" Maven, not understand how it works.

The Ant scripts that I am trying to replace in our organization all provided some help about the current project and the available targets using the echo task when the default target was executed. This allowed newbies to quickly figure out how to perform build steps without ever reading the Ant manual. Surely, once you know Maven's lifecycle you never need such help targets but especially old Ant geeks need some easy way of migrating into Maven land.

The attached patch should provide the following console output:
{noformat}
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO]

You must specify at least one goal or lifecycle phase to perform build steps.
The following list illustrates some commonly used build commands:

  mvn clean
    Deletes any build output (e.g. class files or JARs).
  mvn test
    Runs the unit tests for the project.
  mvn install
    Copies the project artifacts into your local repository.
  mvn deploy
    Copies the project artifacts into the remote repository.
  mvn site
    Creates project documentation (e.g. reports or Javadoc).

Please see
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
for a complete description of available lifecycle phases.

Use "mvn -?" to show general usage information about Maven's command line.

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Oct 22 20:48:42 EDT 2007
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
{noformat}

This output is intended to show further comon use-cases than just "install". Besides, the user is pointed to a concrete URL with helpful information for his actual need (personally, I consider pointing people at home pages as helpful as telling to use Google... information should be found, not searched)

> Provide the help listing as default when no arguments are provided
> ------------------------------------------------------------------
>
>                 Key: MNG-2166
>                 URL: http://jira.codehaus.org/browse/MNG-2166
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Command Line
>    Affects Versions: 2.0, 2.0.1, 2.0.2
>         Environment: Any
>            Reporter: Andre Ranvik
>            Assignee: Brian Fox
>            Priority: Minor
>             Fix For: 2.0.8
>
>         Attachments: no-goal-help.patch
>
>
> When just writing "mvn" with no arguments on the command line I get a message such as this: 
> >mvn
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ----------------------------------------------------------------------------
> [INFO] You must specify at least one goal. Try 'install'
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Wed Mar 22 09:15:04 CET 2006
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> Many new users to maven or any other such tools are used to getting at least some basic info of what is expected. How about just displaying the listing that shows up when a user writes "mvn -h" as default when no arguments are privided? This is also a feature that most other similar products have.  I also would suggest printing a URL for where they can get basic information for how to use maven.

-- 
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

        

[jira] Commented: (MNG-2166) Provide the help listing as default when no arguments are provided

Posted by "Stefano Bagnara (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_95903 ] 

Stefano Bagnara commented on MNG-2166:
--------------------------------------

I was just adding a similar bug report.

Having at least an informative "mvn help" would really help.
I keep adding "BUILDING.txt" files to my projects to tell people what mvn commands they have to use to create the site, to create the package, to run some other plugin I configured in specific profiles and so on.

Even a simple plugin (maven-help-plugin) that answer by default a text written in the pom would be a big step forward, then having a property for a default target to be invoked (defaulting to the "maven-help-plugin", but possibily overridable with package, site:stage or anything wirtten in the pom) would be a great solution (similar to what we had in ant)

this "maven-help-plugin" could support inline text or a reference to a file to be shown or any other more advanced feature (automatically output help for the more common goals).

> Provide the help listing as default when no arguments are provided
> ------------------------------------------------------------------
>
>                 Key: MNG-2166
>                 URL: http://jira.codehaus.org/browse/MNG-2166
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Command Line
>    Affects Versions: 2.0, 2.0.1, 2.0.2
>         Environment: Any
>            Reporter: Andre Ranvik
>            Priority: Minor
>             Fix For: 2.2.x
>
>
> When just writing "mvn" with no arguments on the command line I get a message such as this: 
> >mvn
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ----------------------------------------------------------------------------
> [INFO] You must specify at least one goal. Try 'install'
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Wed Mar 22 09:15:04 CET 2006
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> Many new users to maven or any other such tools are used to getting at least some basic info of what is expected. How about just displaying the listing that shows up when a user writes "mvn -h" as default when no arguments are privided? This is also a feature that most other similar products have.  I also would suggest printing a URL for where they can get basic information for how to use maven.

-- 
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

        

[jira] Closed: (MNG-2166) Provide the help listing as default when no arguments are provided

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox closed MNG-2166.
--------------------------

         Assignee: Brian Fox
       Resolution: Fixed
    Fix Version/s:     (was: 2.x)
                   2.0.8

New output:

{noformat}
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO]

You must specify at least one goal. Try 'mvn install' to build or 'mvn -?' for options
See http://maven.apache.org for more information.


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Oct 22 20:48:42 EDT 2007
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
{noformat}

> Provide the help listing as default when no arguments are provided
> ------------------------------------------------------------------
>
>                 Key: MNG-2166
>                 URL: http://jira.codehaus.org/browse/MNG-2166
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Command Line
>    Affects Versions: 2.0, 2.0.1, 2.0.2
>         Environment: Any
>            Reporter: Andre Ranvik
>            Assignee: Brian Fox
>            Priority: Minor
>             Fix For: 2.0.8
>
>
> When just writing "mvn" with no arguments on the command line I get a message such as this: 
> >mvn
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ----------------------------------------------------------------------------
> [INFO] You must specify at least one goal. Try 'install'
> [INFO] ----------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Wed Mar 22 09:15:04 CET 2006
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> Many new users to maven or any other such tools are used to getting at least some basic info of what is expected. How about just displaying the listing that shows up when a user writes "mvn -h" as default when no arguments are privided? This is also a feature that most other similar products have.  I also would suggest printing a URL for where they can get basic information for how to use maven.

-- 
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