You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Rahul Thakur (JIRA)" <ji...@codehaus.org> on 2005/09/26 13:01:11 UTC

[jira] Commented: (MNG-688) m2 archetype:create without -DgroupId and -DartifactId throws exception

    [ http://jira.codehaus.org/browse/MNG-688?page=comments#action_47155 ] 

Rahul Thakur commented on MNG-688:
----------------------------------

Just wondering - could we extract all the [required] parameters/properties for a Mojo in runtime and create and display a usage/help message by default to the user when a plugin (any plugin) encounters 
<code> 
org.apache.maven.plugin.PluginParameterException
</code> ?



> m2 archetype:create without -DgroupId and -DartifactId throws exception
> -----------------------------------------------------------------------
>
>          Key: MNG-688
>          URL: http://jira.codehaus.org/browse/MNG-688
>      Project: Maven 2
>         Type: Bug
>   Components: maven-archetype-plugin
>     Versions: 2.0-alpha-3
>     Reporter: Niklas Gustavsson
>     Priority: Minor
>      Fix For: 2.0-beta-4

>
>
> When running m2 archetype:create without the system properties -DgroupId and -DartifactId an exception is thrown (see below). It would be great (and probably helpful for developers) if these properties were asked for if missing.
> --------------------------------------------------------
> org.apache.maven.plugin.MojoExecutionException: Error configuring plugin for exe
> cution of 'archetype:create'.
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:378)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:169)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:150)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:133)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:103)
>         at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:261)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:180)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:269)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
> Caused by: org.apache.maven.plugin.PluginParameterException: Invalid or missing
> parameters: [Mojo parameter [name: 'artifactId'; alias: 'null'], Mojo parameter
> [name: 'groupId'; alias: 'null']] for mojo: org.apache.maven.plugins:maven-arche
> type-plugin:1.0-alpha-1:create
>         at org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(
> DefaultPluginManager.java:764)
>         at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
> tPluginManager.java:527)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:373)
>         ... 15 more

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org