You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Patil, Shivakumar (GE Healthcare)" <Pa...@ge.com> on 2006/05/19 12:05:49 UTC
File Copy
I want to copy a file from one directory to another.
Is there any standard & elegant way to copy a file in Maven.I could not
find any.(Suggest me any if you know).
Instead Iam using the ant plugin for maven & trying to do the copy.
I tried this...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<copy file="C:\build\work\abc.ear"
tofile="C:\abc"/>
</tasks>
</configuration>
</plugin>
The above piece runs fine & successfully.But,the file is NEVER copied.
Any suggestions please...
Re: File Copy
Posted by Geoffrey De Smet <ge...@gmail.com>.
It's probably because you didn't define at what <execution> or <phase>
the antrun plugin should do that task, see its docs or the m2 book.
Jamie Bisotti wrote:
> On 5/19/06, Patil, Shivakumar (GE Healthcare) <Pa...@ge.com>
> wrote:
>>
>> I want to copy a file from one directory to another.
>> Is there any standard & elegant way to copy a file in Maven.I could not
>> find any.(Suggest me any if you know).
>> Instead Iam using the ant plugin for maven & trying to do the copy.
>> I tried this...
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-antrun-plugin</artifactId>
>> <configuration>
>> <tasks>
>> <copy file="C:\build\work\abc.ear"
>> tofile="C:\abc"/>
>> </tasks>
>> </configuration>
>> </plugin>
>>
>> The above piece runs fine & successfully.But,the file is NEVER copied.
>>
>> Any suggestions please...
>>
>>
>
> Sounds like you are looking for <resources>.
>
--
With kind regards,
Geoffrey De Smet
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: File Copy
Posted by Jamie Bisotti <jb...@gmail.com>.
On 5/19/06, Patil, Shivakumar (GE Healthcare) <Pa...@ge.com>
wrote:
>
> I want to copy a file from one directory to another.
> Is there any standard & elegant way to copy a file in Maven.I could not
> find any.(Suggest me any if you know).
> Instead Iam using the ant plugin for maven & trying to do the copy.
> I tried this...
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <configuration>
> <tasks>
> <copy file="C:\build\work\abc.ear"
> tofile="C:\abc"/>
> </tasks>
> </configuration>
> </plugin>
>
> The above piece runs fine & successfully.But,the file is NEVER copied.
>
> Any suggestions please...
>
>
Sounds like you are looking for <resources>.
--
Jamie Bisotti