qickrooms / flex-mojos

Automatically exported from code.google.com/p/flex-mojos
0 stars 0 forks source link

Install-mojo fails differently for different missing parameters; better error handling and reporting #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I run "mvn info.flex-mojos:install-mojo:deploy-sdk", I get:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for
'install-mojo:deploy-sdk'

[0] Inside the definition for plugin 'install-mojo' specify the following:

<configuration>
  ...
  <url>VALUE</url>
</configuration>

-OR-

on the command line, specify: '-Durl=VALUE'

Now if I move on and add the url parameter and run "mvn
info.flex-mojos:install-mojo:deploy-sdk -Durl=file:///opt/maven", I get a
much more user friendly error:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Flex SDK folder not defined.

It's however missing the name of the parameter for SDK folder
(flex.sdk.folder).

As a next step, if I add the flex.sdk.folder parameter and run "mvn
info.flex-mojos:install-mojo:deploy-sdk -Dflex.sdk.folder=/opt/flex3
-Durl=file:///opt/maven" I get this error including a stacktrace:

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An invalid artifact was detected.

This artifact might be in your project's POM, or it might have been
included transitively during the resolution process. Here is the
information we do have for this artifact:

    o GroupID:     com.adobe.flex.compiler
    o ArtifactID:  batik-awt-util
    o Version:     <<< MISSING >>>
    o Type:        jar

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.artifact.InvalidArtifactRTException: For artifact
{com.adobe.flex.compiler:batik-awt-util:null:jar}: The version cannot be empty.

In this case, it looks like the mojo is going ahead with the individual
installs without checking if version is specified.

It would be good if the mojo reports errors more consistently, in user
friendly fashion, including the names of mandatory parameters.

Original issue reported on code.google.com by aru...@gmail.com on 23 Nov 2008 at 2:49

GoogleCodeExporter commented 9 years ago
Very low priority issue.

Original comment by aru...@gmail.com on 23 Nov 2008 at 2:50

GoogleCodeExporter commented 9 years ago
I change it to produce the following error:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for
'install-mojo:install-sdk'

[0] Inside the definition for plugin 'install-mojo' specify the following:

<configuration>
  ...
  <sdkFolder>VALUE</sdkFolder>
</configuration>

-OR-

on the command line, specify: '-Dflex.sdk.folder=VALUE'

[1] Inside the definition for plugin 'install-mojo' specify the following:

<configuration>
  ...
  <version>VALUE</version>
</configuration>

-OR-

on the command line, specify: '-Dversion=VALUE'

Fixed at revision 904

VELO

Original comment by velo...@gmail.com on 23 Nov 2008 at 10:27