Maven 1

improve "goal not found" reporting

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0-rc1
  • Fix Version/s: 1.1-rc1
  • Component/s: core
  • Labels:
    None
  • Number of attachments :
    0

Description

  • goal not found should be an error message, not an exception when leaving maven
  • goals that are not found should be reported before any building is done

Activity

Hide
Arnaud Heritier added a comment -

$ maven foo
__ __

\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.1-RC1-SNAPSHOT

Trying to get missing dependencies (and updated snapshots) required by Maven:

  • Checking for an update of maven:maven-model:3.0.2-SNAPSHOT:jar from http://people.apache.org/repo/m1-snapshot-repository/
    Skipping download as local copy is up to date!
    -------------------------------------------------------------------------------
    BUILD FAILED
    >> Goal 'foo' does not exist in this project.
    -------------------------------------------------------------------------------
    Total time : 2 seconds
    Finished at : Saturday, April 14, 2007 1:59:56 AM CEST
    Final Memory : 2M/3M
    -------------------------------------------------------------------------------
Show
Arnaud Heritier added a comment - $ maven foo __ __
\/ __ Apache_ ___
  \/ / ` \ V / -) ' \ ~ intelligent projects ~
_   _,_ _/___ _ _ v. 1.1-RC1-SNAPSHOT
Trying to get missing dependencies (and updated snapshots) required by Maven:
  • Checking for an update of maven:maven-model:3.0.2-SNAPSHOT:jar from http://people.apache.org/repo/m1-snapshot-repository/ Skipping download as local copy is up to date! ------------------------------------------------------------------------------- BUILD FAILED >> Goal 'foo' does not exist in this project. ------------------------------------------------------------------------------- Total time : 2 seconds Finished at : Saturday, April 14, 2007 1:59:56 AM CEST Final Memory : 2M/3M -------------------------------------------------------------------------------
Hide
Lukas Theussl added a comment -

This does not work if an unknown goal is called via attainGoal, eg:

<goal name="testNoSuchGoal">
    <attainGoal name="attain:nosuchGoal"/>
  </goal>

gives:

maven testNoSuchGoal
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.1-RC1-SNAPSHOT

Trying to get missing dependencies (and updated snapshots) required by Maven XDoc Plugin:
- Checking for an update of maven:maven-model:3.0.2-SNAPSHOT:jar from http://repo1.maven.org/maven/
-------------------------------------------------------------------------------
BUILD FAILED
-------------------------------------------------------------------------------
Total time   : 8 seconds
Finished at  : Monday, April 16, 2007 9:32:05 AM CEST
Final Memory : 3M/6M
-------------------------------------------------------------------------------
Show
Lukas Theussl added a comment - This does not work if an unknown goal is called via attainGoal, eg:
<goal name="testNoSuchGoal">
    <attainGoal name="attain:nosuchGoal"/>
  </goal>
gives:
maven testNoSuchGoal
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.1-RC1-SNAPSHOT

Trying to get missing dependencies (and updated snapshots) required by Maven XDoc Plugin:
- Checking for an update of maven:maven-model:3.0.2-SNAPSHOT:jar from http://repo1.maven.org/maven/
-------------------------------------------------------------------------------
BUILD FAILED
-------------------------------------------------------------------------------
Total time   : 8 seconds
Finished at  : Monday, April 16, 2007 9:32:05 AM CEST
Final Memory : 3M/6M
-------------------------------------------------------------------------------
Hide
Arnaud Heritier added a comment -

Ok, I'll check.
Sorry
I'm finishing my work on log I began several months ago.
It's quite ready, I'll commit it in some hours.
Thanks for your vigilance

Show
Arnaud Heritier added a comment - Ok, I'll check. Sorry I'm finishing my work on log I began several months ago. It's quite ready, I'll commit it in some hours. Thanks for your vigilance

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: