You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Hoffer <dh...@gmail.com> on 2010/01/20 21:09:41 UTC

maven-dependency-plugin unpack to different folder?

Using the maven-dependency-plugin is there a way to unpack to a different
folder?  I.e. if I have a resource at /foo/bar/config.txt can I configure to
unpack at /props/config.txt?

-Dave

RE: maven-dependency-plugin unpack to different folder?

Posted by su...@wipro.com.
		<execution>
            <id>prepare-provided-dependencies</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
		</execution>
Copy-dependencies may not copy resources may be.

You can also use maven-antrun-plugin and copy.
		<configuration>
              <tasks>
                <copy todir="/props/">
                  <fileset dir="/foo/bar/"/>
                </copy>
              </tasks>
            </configuration>

Subir 

-----Original Message-----
From: David Hoffer [mailto:dhoffer6@gmail.com] 
Sent: Thursday, January 21, 2010 1:40 AM
To: Maven Users List
Subject: maven-dependency-plugin unpack to different folder?

Using the maven-dependency-plugin is there a way to unpack to a
different folder?  I.e. if I have a resource at /foo/bar/config.txt can
I configure to unpack at /props/config.txt?

-Dave

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

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


Re: maven-dependency-plugin unpack to different folder?

Posted by Wayne Fay <wa...@gmail.com>.
> its going to include the foo/bar folder.  How can I get rid of this?

I don't know if this will work, but worth a try:

<outputDirectory>${project.build.directory}/classes/foo/bar</outputDirectory>
          <includes>config.txt</includes>
</artifactItem>

Wayne

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


Re: maven-dependency-plugin unpack to different folder?

Posted by Dan Tran <da...@gmail.com>.
you need to make 2 executions, one to unpack and one to the move thru ant run

-D
On Wed, Jan 20, 2010 at 12:38 PM, David Hoffer <dh...@gmail.com> wrote:
> Right but how can I flatten or remove the folder from the artifactItem?  For
> example if I say
>
> <artifactItem>
>                                    ...
>
> <outputDirectory>${project.build.directory}/classes</outputDirectory>
>                                    <includes>foo/bar/config.txt</includes>
> </artifactItem>
>
> its going to include the foo/bar folder.  How can I get rid of this?
>
> -Dave
>
> On Wed, Jan 20, 2010 at 1:31 PM, Dan Tran <da...@gmail.com> wrote:
>
>> for unpack goal, you can specify outputDirectory per artitfactItem
>> configuration.
>>
>> -Dan
>>
>>
>> On Wed, Jan 20, 2010 at 12:09 PM, David Hoffer <dh...@gmail.com> wrote:
>> > Using the maven-dependency-plugin is there a way to unpack to a different
>> > folder?  I.e. if I have a resource at /foo/bar/config.txt can I configure
>> to
>> > unpack at /props/config.txt?
>> >
>> > -Dave
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Re: maven-dependency-plugin unpack to different folder?

Posted by David Hoffer <dh...@gmail.com>.
Right but how can I flatten or remove the folder from the artifactItem?  For
example if I say

<artifactItem>
                                    ...

<outputDirectory>${project.build.directory}/classes</outputDirectory>
                                    <includes>foo/bar/config.txt</includes>
</artifactItem>

its going to include the foo/bar folder.  How can I get rid of this?

-Dave

On Wed, Jan 20, 2010 at 1:31 PM, Dan Tran <da...@gmail.com> wrote:

> for unpack goal, you can specify outputDirectory per artitfactItem
> configuration.
>
> -Dan
>
>
> On Wed, Jan 20, 2010 at 12:09 PM, David Hoffer <dh...@gmail.com> wrote:
> > Using the maven-dependency-plugin is there a way to unpack to a different
> > folder?  I.e. if I have a resource at /foo/bar/config.txt can I configure
> to
> > unpack at /props/config.txt?
> >
> > -Dave
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven-dependency-plugin unpack to different folder?

Posted by Dan Tran <da...@gmail.com>.
for unpack goal, you can specify outputDirectory per artitfactItem
configuration.

-Dan


On Wed, Jan 20, 2010 at 12:09 PM, David Hoffer <dh...@gmail.com> wrote:
> Using the maven-dependency-plugin is there a way to unpack to a different
> folder?  I.e. if I have a resource at /foo/bar/config.txt can I configure to
> unpack at /props/config.txt?
>
> -Dave
>

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