Mathieu,

Thanks for your answer it works. I am posting my code here just in case
anyone else is looking for this solution.

in my build.properties file i put the ant-contrib.jar file

ant-contrib.jar=/path/to/ant-contrib.jar

Then in my build.xml file i have the following code
<?xml version="1.0"?>
<project name="svnant" default="svncheckout">
        <!--  all properties are in build.properties -->
          <property file="build.properties" />
        <!-- path to the svnant libraries. Usually they will be located
in ANT_HOME/lib -->
          <path id="project.classpath">
            <pathelement location="${svnjavahl.jar}" />
            <pathelement location="${svnant.jar}" />
            <pathelement location="${svnClientAdapter.jar}" />
            <pathelement location="${ant-contrib.jar}" />
          </path>

          <!-- load the svn task -->
          <taskdef resource="svntask.properties"
classpathref="project.classpath"/>
<!-- contains the propertycopy -->
    <taskdef resource="net/sf/antcontrib/antcontrib.properties"
classpathref="project.classpath" />

        <target name="svncheckout" description="Checkout project from
Subversion.">
                <input message="Please enter Project Name:"
addproperty="project.name" defaultvalue="" />
                <input message="Branch or Tag? (exp. branch/1.0.1a)
default is trunk:" addproperty="bt.path" defaultvalue="trunk" />
                <condition property="abort">
                        <equals arg1="" arg2="${project.name}" />
                </condition>
                <fail if="abort">Build aborted Project name not
specified.</fail>
                <propertycopy name="project.home"
from="${project.name}.home" />
                <echo> project.src = ${project.home} </echo>
                <fail />


This is not the complete script, but enough to give someone an idea on
how it should work.

Take notice of the lines that i add the taskdef. 

Thanks for the help

On Sat, 2006-10-14 at 19:06 +0900, Mathieu Champlon wrote:
> Hello,
> 
> Edward Mann a écrit :
> > (...)
> >                 <property name="project.home" value="${project.name}.home" 
> > />
> > (...)
> >   
> 
> Right here you probably want instead something like
> 
>                 <property name="project.home" value="${${project.name}.home}" 
> />
> 
> However you cannot do this as the properties are only evaluated once.
> To solve this you can use the <propertycopy> task from ant-contrib : 
> http://ant-contrib.sourceforge.net/tasks/tasks/propertycopy.html
> 
> So instead you would have :
> 
>                 <propertycopy property="project.home" 
> from="${project.name}.home" />
> 
> 
> I hope this helps.
> 
> 
> MAT.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to