You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by acec acec <to...@yahoo.ca> on 2007/06/14 18:01:12 UTC

copy file in maven

hi,
What's the easiest way to copy file in maven?
Should I use ant plugin to do that?
Thanks.



      Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com

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


RE: copy file in maven

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
If the file is in the repository, you can use the
maven-dependency-plugin:copy goal. 

-----Original Message-----
From: acec acec [mailto:tomcatacec@yahoo.ca] 
Sent: Thursday, June 14, 2007 12:01 PM
To: users@maven.apache.org
Subject: copy file in maven

hi,
What's the easiest way to copy file in maven?
Should I use ant plugin to do that?
Thanks.



      Ask a question on any topic and get answers from real people. Go
to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com

---------------------------------------------------------------------
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: copy file in maven

Posted by acec acec <to...@yahoo.ca>.
Hi,
We have an old project, which uses ant and could 
generate a customized tomcat folder.

My new project using maven, I need copy some files
into old customized tomcat folder.

Thanks.
Arden

--- Nathan Maves <na...@gmail.com> wrote:

> First what is the reason for your need to copy a
> file?
> 
> The first thing that triggers in my mind is that you
> have a resource file
> that you need copied to your artifact.  If this is
> not the case then you may
> need to define your problem a little better.
> 
> Nathan
> 
> On 6/14/07, Jeff Mutonho <ej...@gmail.com>
> wrote:
> >
> > On 6/14/07, Eric Redmond <er...@gmail.com>
> wrote:
> > > Yeah, ant is the easiest way.
> > >
> > > Eric
> > >
> >
> > Or you can try this :
> >
> >
> >
>
http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html
> >
> >
> >
> >
> >
> > "Don't take the name of root in vain."
> >
> > Jeff  Mutonho
> > Cape Town
> > South Africa
> >
> > GoogleTalk : ejbengine
> > Skype        : ejbengine
> > Registered Linux user number 366042
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> >
> >
> 



      Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca


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


Re: copy file in maven

Posted by Nathan Maves <na...@gmail.com>.
First what is the reason for your need to copy a file?

The first thing that triggers in my mind is that you have a resource file
that you need copied to your artifact.  If this is not the case then you may
need to define your problem a little better.

Nathan

On 6/14/07, Jeff Mutonho <ej...@gmail.com> wrote:
>
> On 6/14/07, Eric Redmond <er...@gmail.com> wrote:
> > Yeah, ant is the easiest way.
> >
> > Eric
> >
>
> Or you can try this :
>
>
> http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html
>
>
>
>
>
> "Don't take the name of root in vain."
>
> Jeff  Mutonho
> Cape Town
> South Africa
>
> GoogleTalk : ejbengine
> Skype        : ejbengine
> Registered Linux user number 366042
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: copy file in maven

Posted by Ralf Quebbemann <ra...@gmx.de>.
Files can also be copied locally with the wagon-maven-plugin (use file protocol 
instead of scp). BTW, the plugin is able to copy multiple files, because it 
takes an input directory as argument. Filtering or multiple source/destination 
directories do not work currently.

I use this plugin for copying nightly builds using webdav protocol.

A configuration example using local file copy might be:

<configuration>
   <id>myserverid</id>
   <inputDirectory>target/assembly</inputDirectory> 
   <url>file:///usr/local/share/myapplicationdir</url>
</configuration>

Take care

	Ralf

acec acec wrote:
> But I do not need scp, I only need file copy on my
> localhost.
> :-(
> Maybe I have to use ant plugin.
> 
> --- Bernd Bohmann <be...@atanion.com> wrote:
> 
>> Hello Jon,
>>
>> just deployed a little bit documentation about the
>> wagon plugin.
>>
>> http://myfaces.apache.org/wagon-maven-plugin
>>
>> We are using this plugin to publish the nightly
>> builds to the nightly 
>> build download location.
>>
>> Regards
>>
>> Bernd
>>
>> Jon Strayer wrote:
>>> Is there any documentation on the wagon plugin?
>>>
>>> On 6/14/07, Ralf Quebbemann <ra...@gmx.de> wrote:
>>>> Hi,
>>>>
>>>> maybe it's not the best way to use the
>> recommended copy-maven-plugin.
>>>> Although
>>>> it does its job (and yes I wrote it) there are
>> plugins out there which
>>>> have
>>>> better capabilities.
>>>>
>>>> You might want to check out the
>> wagon-maven-plugin from the MyFaces
>>>> project:
>>>>
>>>>     <groupId>org.apache.myfaces.maven</groupId>
>>>>     <artifactId>wagon-maven-plugin</artifactId>
>>>>     <version>1.0.5</version>
>>>>
>>>> This plugin uses wagon. So copying to remote
>> destinations (scp, webdav,
>>>> etc..)
>>>> should be no problem.
>>>>
>>>> The only drawback is, that it's not very
>> convenient. Currently it's not
>>>> possible
>>>> to copy more than one file. Wildcards are not
>> supported either.
>>>> Source code is available and I am sure patches
>> are welcome. So give it a
>>>> try.
>>>>
>>>> However, the copy-maven-plugin works on local
>> filesystems but is not
>>>> maintained
>>>> anymore.
>>>>
>>>>         Ralf
>>>>
>>>> Jeff Mutonho wrote:
>>>>> On 6/14/07, Eric Redmond
>> <er...@gmail.com> wrote:
>>>>>> Yeah, ant is the easiest way.
>>>>>>
>>>>>> Eric
>>>>>>
>>>>> Or you can try this :
>>>>>
>>>>>
> http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "Don't take the name of root in vain."
>>>>>
>>>>> Jeff  Mutonho
>>>>> Cape Town
>>>>> South Africa
>>>>>
>>>>> GoogleTalk : ejbengine
>>>>> Skype        : ejbengine
>>>>> Registered Linux user number 366042
>>>>>
>>>>>
> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> users-unsubscribe@maven.apache.org
>> For additional commands, e-mail:
>> users-help@maven.apache.org
>>
>>
> 
> 
> 
>       Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice at http://ca.messenger.yahoo.com/
> 
> ---------------------------------------------------------------------
> 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: copy file in maven

Posted by acec acec <to...@yahoo.ca>.
But I do not need scp, I only need file copy on my
localhost.
:-(
Maybe I have to use ant plugin.

--- Bernd Bohmann <be...@atanion.com> wrote:

> Hello Jon,
> 
> just deployed a little bit documentation about the
> wagon plugin.
> 
> http://myfaces.apache.org/wagon-maven-plugin
> 
> We are using this plugin to publish the nightly
> builds to the nightly 
> build download location.
> 
> Regards
> 
> Bernd
> 
> Jon Strayer wrote:
> > Is there any documentation on the wagon plugin?
> > 
> > On 6/14/07, Ralf Quebbemann <ra...@gmx.de> wrote:
> >>
> >> Hi,
> >>
> >> maybe it's not the best way to use the
> recommended copy-maven-plugin.
> >> Although
> >> it does its job (and yes I wrote it) there are
> plugins out there which
> >> have
> >> better capabilities.
> >>
> >> You might want to check out the
> wagon-maven-plugin from the MyFaces
> >> project:
> >>
> >>     <groupId>org.apache.myfaces.maven</groupId>
> >>     <artifactId>wagon-maven-plugin</artifactId>
> >>     <version>1.0.5</version>
> >>
> >> This plugin uses wagon. So copying to remote
> destinations (scp, webdav,
> >> etc..)
> >> should be no problem.
> >>
> >> The only drawback is, that it's not very
> convenient. Currently it's not
> >> possible
> >> to copy more than one file. Wildcards are not
> supported either.
> >>
> >> Source code is available and I am sure patches
> are welcome. So give it a
> >> try.
> >>
> >> However, the copy-maven-plugin works on local
> filesystems but is not
> >> maintained
> >> anymore.
> >>
> >>         Ralf
> >>
> >> Jeff Mutonho wrote:
> >> > On 6/14/07, Eric Redmond
> <er...@gmail.com> wrote:
> >> >> Yeah, ant is the easiest way.
> >> >>
> >> >> Eric
> >> >>
> >> >
> >> > Or you can try this :
> >> >
> >> >
> >>
>
http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html
> 
> >>
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > "Don't take the name of root in vain."
> >> >
> >> > Jeff  Mutonho
> >> > Cape Town
> >> > South Africa
> >> >
> >> > GoogleTalk : ejbengine
> >> > Skype        : ejbengine
> >> > Registered Linux user number 366042
> >> >
> >> >
>
---------------------------------------------------------------------
> >> > 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
> >>
> >>
> > 
> > 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> users-help@maven.apache.org
> 
> 



      Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice at http://ca.messenger.yahoo.com/

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


Re: copy file in maven

Posted by Bernd Bohmann <be...@atanion.com>.
Hello Jon,

just deployed a little bit documentation about the wagon plugin.

http://myfaces.apache.org/wagon-maven-plugin

We are using this plugin to publish the nightly builds to the nightly 
build download location.

Regards

Bernd

Jon Strayer wrote:
> Is there any documentation on the wagon plugin?
> 
> On 6/14/07, Ralf Quebbemann <ra...@gmx.de> wrote:
>>
>> Hi,
>>
>> maybe it's not the best way to use the recommended copy-maven-plugin.
>> Although
>> it does its job (and yes I wrote it) there are plugins out there which
>> have
>> better capabilities.
>>
>> You might want to check out the wagon-maven-plugin from the MyFaces
>> project:
>>
>>     <groupId>org.apache.myfaces.maven</groupId>
>>     <artifactId>wagon-maven-plugin</artifactId>
>>     <version>1.0.5</version>
>>
>> This plugin uses wagon. So copying to remote destinations (scp, webdav,
>> etc..)
>> should be no problem.
>>
>> The only drawback is, that it's not very convenient. Currently it's not
>> possible
>> to copy more than one file. Wildcards are not supported either.
>>
>> Source code is available and I am sure patches are welcome. So give it a
>> try.
>>
>> However, the copy-maven-plugin works on local filesystems but is not
>> maintained
>> anymore.
>>
>>         Ralf
>>
>> Jeff Mutonho wrote:
>> > On 6/14/07, Eric Redmond <er...@gmail.com> wrote:
>> >> Yeah, ant is the easiest way.
>> >>
>> >> Eric
>> >>
>> >
>> > Or you can try this :
>> >
>> >
>> http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html 
>>
>> >
>> >
>> >
>> >
>> >
>> >
>> > "Don't take the name of root in vain."
>> >
>> > Jeff  Mutonho
>> > Cape Town
>> > South Africa
>> >
>> > GoogleTalk : ejbengine
>> > Skype        : ejbengine
>> > Registered Linux user number 366042
>> >
>> > ---------------------------------------------------------------------
>> > 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
>>
>>
> 
> 

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


Re: copy file in maven

Posted by Jon Strayer <jo...@strayer.org>.
Is there any documentation on the wagon plugin?

On 6/14/07, Ralf Quebbemann <ra...@gmx.de> wrote:
>
> Hi,
>
> maybe it's not the best way to use the recommended copy-maven-plugin.
> Although
> it does its job (and yes I wrote it) there are plugins out there which
> have
> better capabilities.
>
> You might want to check out the wagon-maven-plugin from the MyFaces
> project:
>
>     <groupId>org.apache.myfaces.maven</groupId>
>     <artifactId>wagon-maven-plugin</artifactId>
>     <version>1.0.5</version>
>
> This plugin uses wagon. So copying to remote destinations (scp, webdav,
> etc..)
> should be no problem.
>
> The only drawback is, that it's not very convenient. Currently it's not
> possible
> to copy more than one file. Wildcards are not supported either.
>
> Source code is available and I am sure patches are welcome. So give it a
> try.
>
> However, the copy-maven-plugin works on local filesystems but is not
> maintained
> anymore.
>
>         Ralf
>
> Jeff Mutonho wrote:
> > On 6/14/07, Eric Redmond <er...@gmail.com> wrote:
> >> Yeah, ant is the easiest way.
> >>
> >> Eric
> >>
> >
> > Or you can try this :
> >
> >
> http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html
> >
> >
> >
> >
> >
> >
> > "Don't take the name of root in vain."
> >
> > Jeff  Mutonho
> > Cape Town
> > South Africa
> >
> > GoogleTalk : ejbengine
> > Skype        : ejbengine
> > Registered Linux user number 366042
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
Esse Quam Videre
To Be, rather than to Seem

Re: copy file in maven

Posted by Ralf Quebbemann <ra...@gmx.de>.
Hi,

maybe it's not the best way to use the recommended copy-maven-plugin. Although 
it does its job (and yes I wrote it) there are plugins out there which have 
better capabilities.

You might want to check out the wagon-maven-plugin from the MyFaces project:

    <groupId>org.apache.myfaces.maven</groupId>
    <artifactId>wagon-maven-plugin</artifactId>
    <version>1.0.5</version>

This plugin uses wagon. So copying to remote destinations (scp, webdav, etc..) 
should be no problem.

The only drawback is, that it's not very convenient. Currently it's not possible 
to copy more than one file. Wildcards are not supported either.

Source code is available and I am sure patches are welcome. So give it a try.

However, the copy-maven-plugin works on local filesystems but is not maintained 
anymore.

	Ralf

Jeff Mutonho wrote:
> On 6/14/07, Eric Redmond <er...@gmail.com> wrote:
>> Yeah, ant is the easiest way.
>>
>> Eric
>>
> 
> Or you can try this :
> 
> http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html 
> 
> 
> 
> 
> 
> 
> "Don't take the name of root in vain."
> 
> Jeff  Mutonho
> Cape Town
> South Africa
> 
> GoogleTalk : ejbengine
> Skype        : ejbengine
> Registered Linux user number 366042
> 
> ---------------------------------------------------------------------
> 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: copy file in maven

Posted by Jeff Mutonho <ej...@gmail.com>.
On 6/14/07, Eric Redmond <er...@gmail.com> wrote:
> Yeah, ant is the easiest way.
>
> Eric
>

Or you can try this :

http://quebbemann.kicks-ass.net/development/qu-base/maven-plugins/copy-maven-plugin/index.html





"Don't take the name of root in vain."

Jeff  Mutonho
Cape Town
South Africa

GoogleTalk : ejbengine
Skype        : ejbengine
Registered Linux user number 366042

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


Re: copy file in maven

Posted by Eric Redmond <er...@gmail.com>.
Yeah, ant is the easiest way.

Eric

On 6/14/07, acec acec <to...@yahoo.ca> wrote:
>
> hi,
> What's the easiest way to copy file in maven?
> Should I use ant plugin to do that?
> Thanks.
>
>
>
>       Ask a question on any topic and get answers from real people. Go to
> Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Eric Redmond
http://www.sonatype.com