On 13 February 2012 18:20,  <chad.da...@emc.com> wrote:
> I'm wondering what the difference would be between the following two ways of 
> handling copying of a certain type of maven dependency.  The dependency I'm 
> talking about is something like, for instance, a self-extracting installer 
> that I want to bundle with my custom assembly.   I've deployed this installer 
> as a maven artifact.  Initially, I didn't think  of it as a normal maven 
> dependency, since it's not a compile dependency, so I set the build up to use 
> the maven-dependency-plugin:copy mojo.

The rule of thumb is use dependency:copy if the dependency comes from
outside your reactor, as dependency:copy will not affect the build
order, and you might need to influence the build order. [can always
add a >pom< typed dependency to force the build order if needed

> This works great.  However, I then started wondering whether I should just 
> declare the dependency in my dependencies and then use the 
> maven-dependency-plugin:copy-dependencies mojo.

this one is equally good, but will (by definition) ensure that the
reactor is built in the correct sequence for dependencies from the
reactor... but in some cases, you may not want this as, by necessity,
listing dependencies can influence the classpath if the dependencies
are of type >jar<

>
> Can anyone provide some insight as to whether either way is better or worse?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to