On 23 March 2011 08:19, TomazM <tomaz.majerh...@arnes.si> wrote:

> No this is not issue, probably bad design of maven plugin.
> Because if I take configuration out of executions then it is working other
> wise throw ridiculous error.
>
>
Nope that is F.A.D. not a bug but E.B.K.A.C.



> But if I aggregate pom's then unpacking doesn't work at all (where ever you
> put configuration for this plugin doesn't work, because it can not read
> artifactItems)
>
> For me this is bug of plugin or maven design, it doesn't matter it just not
> work
>

It works the way it is intended to work.  You are not supposed to just
invoke random plugin goals from the command line.... you are supposed to
invoke lifecycle phases.  The plugin goals are to support debugging the
lifecycle and some simple one-off tasks.... if it is something you have to
do a lot then it should be bound to the lifecycle via executions... if it is
not to happen every time, then put the binding in a profile.... you can even
put a default lifecycle phase in the profile so that all you need to do is

mvn -PmySuperProfile

and it will invoke the lifecycle and all the profile bound executions

-Stephen


> Regards, Tomaz
>
> S, Stephen Connolly piše:
> > The first(Andrew) and the last comment (Brian) explains it all..
> >
> > In general in Maven you do not invoke goals directly, but instead you
> invoke the phase that the goal is bound to (or any later phase)
> >
> > The example code binds the goal to the package phase, and also puts the
> configuration for that binding into the execution.  Therefore when you run
> the
> > goal directly from the CLI as "mvn dependency:unpack" the plugin is
> missing its required configuration because the configuration is contained
> within a
> > lifecycle execution.
> >
> > The example illustrated best practice, which is what examples should do.
> >
> > If you read the second half of the page you
> > link:
> http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html#Unpacking_from_the_command_line
> >
> > It will tell you how to make things work the way you are trying to make
> them work, but you should only do that while trying to figure out how to use
> > the plugin.  Once you have that figured out, move the configuration back
> into an execution (or if it is something that is only occasional, move it
> > into a profile or best an execution in a profile) and just use the
> lifecycle to invoke it as needed
> >
> > -Stephen
> >
> > On 22 March 2011 12:28, TomazM <tomaz.majerh...@arnes.si <mailto:
> tomaz.majerh...@arnes.si>> wrote:
> >
> >     On this site http://jira.codehaus.org/browse/MDEP-163 you have a bug
> report, but this gay saying that this is not a bug, what else is then.
> >
> >     ----------------------------------------
> >     Dan Tran made changes - 31/Dec/09 5:57 PM
> >     Status  Open [ 1 ]      Closed [ 6 ]
> >     Resolution              Not A Bug [ 6 ]
> >     ---------------------------------------
> >
> >     If you are distributing something and basic example from your site
> >
> http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html
> >
> >     throw an exception:
> >     [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-dependency-plugin:2.2:unpack (default-cli) on
> project ozwizard_lu_dev: The parameters
> >     'artifactItems' for goal
> org.apache.maven.plugins:maven-dependency-plugin:2.2:unpack are missing or
> invalid -> [Help 1]
> >
> >
> >     1) Or change your documentation how to use it
> >     2) Or actually look and test for your bug
> >
> >
> >     Regards, Tomaz
> >
> >
> >
> >     ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: users-unsubscr...@maven.apache.org <mailto:
> users-unsubscr...@maven.apache.org>
> >     For additional commands, e-mail: users-h...@maven.apache.org<mailto:
> users-h...@maven.apache.org>
> >
> >
>
>

Reply via email to