You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stanimir Stamenkov <s7...@netscape.net> on 2013/06/02 17:12:35 UTC

Copy an artifact with its transitive dependencies to a specified location

I want to copy an artifact with its transitive dependencies to a 
specified location.  The artifact is not a dependency of the project 
the given build step would be part of.

I've tried the "copy" goal of the maven-dependency-plugin [1], but 
it doesn't have a "transitive" option.  I've also tried the "get" 
goal, but its "destination" parameter is deprecated and after all it 
doesn't copy the transitive dependencies to that destination.

I've also tried using the "copy-dependencies" goal by first 
declaring the needed artifact as runtime dependency to the project, 
which I don't really want to, and then specifying "includeGroupIds" 
and "includeArtifactIds" parameters, but this is mostly the same as 
"copy" specifying all artifacts explicitly, which I don't want to 
manually resolve and hard-code.

Is there an easy way to achieve what I'm after?

[1] http://maven.apache.org/plugins/maven-dependency-plugin/

-- 
Stanimir

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


Re: Copy an artifact with its transitive dependencies to a specified location

Posted by Stanimir Stamenkov <s7...@netscape.net>.
Mon, 3 Jun 2013 19:46:11 +0200, /Baptiste MATHUS/:

> From my understanding of your need you should use dependency:get and use
> destination parameter.

Seems like, but the transitive dependencies get only downloaded to 
the local repository and not copied to the specified `destination`, 
as far as I understand and as far as I've observed.

> Dependency:copy-dependencies inadequately forces you to have a pom which I
> understand you don't have.

I have a POM where I would like to include the given dependency goal 
at certain phase (like `package`), but the dependency I would like 
to set up (copying it to a specified location, including its 
transitive dependencies) is not a declared dependency in/of the POM.

> There's a feature hole here that might be filled. Could you please file a
> jira abt this so that it can be fixed?

I'll post back a reference.

> I suppose we need to figure out where this feature would be located: either
> by undeprecating destination param some way , either removing the
> requirement for a maven pom for copy-deps or by creating a brand new goal.
>
> Thanks a lot.
>
>
> Le 2 juin 2013 17:13, "Stanimir Stamenkov" <s7...@netscape.net> a écrit :
>
>> I want to copy an artifact with its transitive dependencies to a specified
>> location.  The artifact is not a dependency of the project the given build
>> step would be part of.
>>
>> I've tried the "copy" goal of the maven-dependency-plugin [1], but it
>> doesn't have a "transitive" option.  I've also tried the "get" goal, but
>> its "destination" parameter is deprecated and after all it doesn't copy the
>> transitive dependencies to that destination.
>>
>> I've also tried using the "copy-dependencies" goal by first declaring the
>> needed artifact as runtime dependency to the project, which I don't really
>> want to, and then specifying "includeGroupIds" and "includeArtifactIds"
>> parameters, but this is mostly the same as "copy" specifying all artifacts
>> explicitly, which I don't want to manually resolve and hard-code.
>>
>> Is there an easy way to achieve what I'm after?
>>
>> [1] http://maven.apache.org/plugins/maven-dependency-plugin/

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


Re: Copy an artifact with its transitive dependencies to a specified location

Posted by Baptiste MATHUS <ml...@batmat.net>.
>From my understanding of your need you should use dependency:get and use
destination parameter.

Dependency:copy-dependencies inadequately forces you to have a pom which I
understand you don't have.

There's a feature hole here that might be filled. Could you please file a
jira abt this so that it can be fixed?

I suppose we need to figure out where this feature would be located: either
by undeprecating destination param some way , either removing the
requirement for a maven pom for copy-deps or by creating a brand new goal.

Thanks a lot.
Le 2 juin 2013 17:13, "Stanimir Stamenkov" <s7...@netscape.net> a écrit :

> I want to copy an artifact with its transitive dependencies to a specified
> location.  The artifact is not a dependency of the project the given build
> step would be part of.
>
> I've tried the "copy" goal of the maven-dependency-plugin [1], but it
> doesn't have a "transitive" option.  I've also tried the "get" goal, but
> its "destination" parameter is deprecated and after all it doesn't copy the
> transitive dependencies to that destination.
>
> I've also tried using the "copy-dependencies" goal by first declaring the
> needed artifact as runtime dependency to the project, which I don't really
> want to, and then specifying "includeGroupIds" and "includeArtifactIds"
> parameters, but this is mostly the same as "copy" specifying all artifacts
> explicitly, which I don't want to manually resolve and hard-code.
>
> Is there an easy way to achieve what I'm after?
>
> [1] http://maven.apache.org/**plugins/maven-dependency-**plugin/<http://maven.apache.org/plugins/maven-dependency-plugin/>
>
> --
> Stanimir
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<us...@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>