ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Mann <ed.m...@arctechnologies.net>
Subject Re: build.properties input select
Date Sat, 14 Oct 2006 05:51:24 GMT
I have done that. But my results are not what i expect. Here is my
script.

<?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}" />
          </path>

          <!-- load the svn task -->
          <taskdef resource="svntask.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>
                <property name="project.home"
value="${project.name}.home" />
                <echo> project.home = ${project.home} </echo>
                <fail />
                <property name="dst.dir"    location="${project.name}"/>
                <property name="urlRepos"
value="file:///home/svn/${project.name}/${bt.path}" />
                <svn javahl="TRUE">
                        <checkout url="${urlRepos}"
destPath="${dst.dir}" />
                </svn>
        </target>

I expect to see that path,(/my/project/dev2 but all i see is the project
name plus home. (project2.home)

And this is what executes on my checkout.

I hope this helps clarify more.

Thanks.


On Fri, 2006-10-13 at 22:29 -0700, Sean (Xuong) Phu wrote:
> There is an <input> task that you can use to prompt the user. See http://ant.apache.org/manual/CoreTasks/input.html.
>   As for concatenating user input with ".home", you can do 
>   <property name="finalValue" value="${userInput}.home" />
> 
> Edward Mann <ed.mann@arctechnologies.net> wrote:
>   I am trying to build an and build process where the user will run ant
> and it will prompt them for the project. The projects are held in the
> build.properties file. 
> They look like this.
> 
> project1.home=/my/project/dev1
> project2.home=/my/project/dev2
> 
> There are other things in the file but this is all the user will ever
> edit. What i want is for the users to type in project2 and the ant
> script will checkout from subversion that project and put it in the path
> for project2.home.
> 
> Is this possible with ant? I would need to append the .home to the end
> of the project name so i can get it's home directory. 
> 
> Thanks.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
>  		
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.


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


Mime
View raw message