ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pomè Elisabetta <ep...@axioma.it>
Subject R: R: copyng and renaming files
Date Wed, 29 Aug 2007 13:33:16 GMT
Ok, sorry, I din't realize that my JAVA_HOME was bad setted.
Now I have a new problem. When I try to run my project I got the following
error:

BUILD FAILED
C:\Moda\script\prova_copia_rep.xml:18: Problem: failed to create task or
type for
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

I have the ant-contrib-1.0b3.jar regularly copyed under
apache-ant-1.7.0\lib. But if I open it with winrar and I edit file
net/sf/antcontrib/antcontrib.properties I don't find the for task listed.
Should be this the problem?
I downloaded ant-contrib-1.0b3-bin.zip from
http://sourceforge.net/project/showfiles.php?group_id=36177
Any further idea?
TKS

Elisabetta


-----Messaggio originale-----
Da: Peter Reilly [mailto:peter.kitt.reilly@gmail.com]
Inviato: mercoledì 29 agosto 2007 13.25
A: Ant Users List
Oggetto: Re: R: copyng and renaming files


On 8/29/07, Pomè Elisabetta <epome@axioma.it> wrote:
> Thank you all,
> I got some problem with your suggets
>
> 1) I tried to use ant-contrib with ant 1.7 but I got the error:
>    java.lang.UnsupportedClassVersionError:
> net/sf/antcontrib/property/PropertyCopy (Unsupported 
major.minor version
> 48.0)
48.0 means that the class is for java1.4, - are you using java1.3 to
run the test?

Peter

>
> 2) I tried to use flattenmapper in different ways, but I 
couldn't be able to
> let it work
>
> Any ideas on how to go on?
>
> Thank you
>
> Elisabetta
>
> -----Messaggio originale-----
> Da: Vijay Aravamudhan [mailto:avijayr@gmail.com]
> Inviato: mercoledì 29 agosto 2007 12.39
> A: Ant Users List
> Oggetto: Re: copyng and renaming files
>
>
> you can achieve the same without using ant-contrib: by using a
> flattenmapper to get the list of files (without directory names), and
> then using that in an include to move from 'destination' to
> 'destination/old' and then copying from 'origin' to 'destination'.
>
> hth,
> Vijay
>
> Kriss wrote:
> > Hi,
> >
> > You can use antcrontib task 'for' and the task basename, as
> following :
> >
> > <project name="backup and copy" default="main" basedir=".">
> >    <property environment="env"/>
> >    <property name="origine.dir" value="c:\origin"/>
> > <property name="dest.dir" value="c:\dest"/>
> > <property name="dest.backup.dir" value="c:\dest\old"/>
> >
> >
> > <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
> >
> > <target name="main">
> >  <for param="file2copy">
> >    <path>
> >      <fileset dir="${origine.dir}">
> >      <include name="*.java"/>
> >      </fileset>
> >    </path>
> >    <sequential>
> >    <antcall target="backupAndCopy">
> >     <param name="file2copy" value="@{file2copy}"/>
> >    </antcall>
> >    </sequential>
> >  </for>
> >     </target>
> >
> >
> >     <target name="backupAndCopy">
> >        <basename property="file2copy.filename" file="${file2copy}"/>
> >  <move file="${dest.dir}/${file2copy.filename}"
> > tofile="${dest.backup.dir}/${file2copy.filename}"/>
> >  <copy file="${origine.dir}/${file2copy.filename}"
> > tofile="${dest.dir}/${file2copy.filename}"/>
> >     </target>
> >
> > </project>
> >
> >
> > Have a nice day,
> > kriss
> >
> > ----- Original Message ----- From: "Pomè Elisabetta" 
<epome@axioma.it>
> > To: <user@ant.apache.org>
> > Sent: Wednesday, August 29, 2007 10:53 AM
> > Subject: copyng and renaming files
> >
> >
> >> Hi everybody,
> >> I apologize if this issue have been posted previously, but I
> search the
> >> mailing list and I couldn't find nothing similar.
> >> I need to copy files (says A.java e B.java) from a directoy
> Origin to a
> >> directory Destination. The directory Destination already 
contains an
> >> older
> >> version of A.java and B.java, but it contains many other
> files. Before
> >> copying A.java and B.java (the new version) from Origin I
> need to save
> >> A.java and B.java contained in Destination in another directory
> >> (Destination\Old). This is my problem: I don't know how to
> say to ant
> >> that
> >> the set of fils that it have to copy from Destination to
> >> Destinatio\Old is
> >> the same that in contained in Origin.
> >> Thank you in advance for your kind reply
> >> Elisabetta
> >>
> >>
> >>
> >> Axioma S.p.A. www.axioma.it
> >> via De Vizzi 35/39 - 20092 Cinisello B.mo (MI)
> >> Tel. +39 02-618.061 - Fax +39 02-660.10337
> >>
> >>
> >
> >
> > 
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message