You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Christopher Styles <st...@gmail.com> on 2008/02/05 15:20:54 UTC

task won't run in cruise control but runs from windows command prompt...

Hi,

I know this isn't a Cruise Control list, but I need some assistance
with this issue, since it centers around Ant - and no one from the Cruise
Contol list has responded... When I run the tasks below in cruise control
2.7.1, the second task fails, which happens to be dependent on the first...
When I run them from the Windows command prompt they work great, but I'm not
yielding the same results in Cruise Control... What's suppose to happen is,
target "lib-ext" will be executed, but first the dependency target
"lib-ext-test" gets executed. If the folder exists, it will set the
"folder-exists" property. Then, Ant goes back to the "lib-ext" task and
checks the dependency. If "folder-exists" is set, "lib-ext" will be
executed. Otherwise, it won't.  In other words, the "lib-ext-test" target
checks to see if the folder exists, and if it does, "lib-ext" ftps the files
within the folder.... If the folder doesn't exist, "lib-ext" doesn't
execute, and the process moves on to the next target in the sequence... As I
stated earlier, it works great from the Windows command prompt, but in
Cruise Control it fails and just says "folder doesn't exist"... Why won't
this execute in Cruise Control like it does from the Windows command
prompt...??? If someone could assist me with this I'd surely appreciate
it...

<target name="lib-ext-test">
   <available property="folder-exists"
      file="${existingExt.dir}"/>
</target>

<target name="lib-ext" if="folder-exists" depends="lib-ext-test">
    <ftp server="${remoteHostName}"
        userid="${remoteInstallUserId}" password="${remoteInstallPassword}"
        remotedir="${remoteExtFtpDir}"
        verbose="yes"
        binary="yes"
        action="put"
        chmod="755">
     <fileset dir="${existingExt.dir}">
        <include name="*.jar"/>
        <include name="*.properties"/>
        <include name="*.txt"/>
        <include name="*.xml"/>
        <include name="*.xsd"/>
     </fileset>
    </ftp>
</target>

Thanks
Chris

Re: task won't run in cruise control but runs from windows command prompt...

Posted by Tim-at-Startupgeek <ti...@gmail.com>.
Greetings - 
Just ran into this myself with our CC environment - your question about 'why
this will run from the command prompt but not from Cruise Control' is
something I just solved for us.  

Check the system account that Cruise Control is running under.  We're
running CCNet under Windows ourselves and the service account it uses didn't
have the same permissions as my account; it kept failing for that reason.

I ended up making it a domain admin of our environment to end any
outstanding permissions issues (we're a small shop and I don't want to make
a career out of simulating permissions issues for our servers).

Hope that helps.

~T


Christopher Styles wrote:
> 
> Hi,
> 
> I know this isn't a Cruise Control list, but I need some assistance
> with this issue, since it centers around Ant - and no one from the Cruise
> Contol list has responded... When I run the tasks below in cruise control
> 2.7.1, the second task fails, which happens to be dependent on the
> first...
> When I run them from the Windows command prompt they work great, but I'm
> not
> yielding the same results in Cruise Control... What's suppose to happen
> is,
> target "lib-ext" will be executed, but first the dependency target
> "lib-ext-test" gets executed. If the folder exists, it will set the
> "folder-exists" property. Then, Ant goes back to the "lib-ext" task and
> checks the dependency. If "folder-exists" is set, "lib-ext" will be
> executed. Otherwise, it won't.  In other words, the "lib-ext-test" target
> checks to see if the folder exists, and if it does, "lib-ext" ftps the
> files
> within the folder.... If the folder doesn't exist, "lib-ext" doesn't
> execute, and the process moves on to the next target in the sequence... As
> I
> stated earlier, it works great from the Windows command prompt, but in
> Cruise Control it fails and just says "folder doesn't exist"... Why won't
> this execute in Cruise Control like it does from the Windows command
> prompt...??? If someone could assist me with this I'd surely appreciate
> it...
> 
> <target name="lib-ext-test">
>    <available property="folder-exists"
>       file="${existingExt.dir}"/>
> </target>
> 
> <target name="lib-ext" if="folder-exists" depends="lib-ext-test">
>     <ftp server="${remoteHostName}"
>         userid="${remoteInstallUserId}"
> password="${remoteInstallPassword}"
>         remotedir="${remoteExtFtpDir}"
>         verbose="yes"
>         binary="yes"
>         action="put"
>         chmod="755">
>      <fileset dir="${existingExt.dir}">
>         <include name="*.jar"/>
>         <include name="*.properties"/>
>         <include name="*.txt"/>
>         <include name="*.xml"/>
>         <include name="*.xsd"/>
>      </fileset>
>     </ftp>
> </target>
> 
> Thanks
> Chris
> 
> 

-- 
View this message in context: http://www.nabble.com/task-won%27t-run-in-cruise-control-but-runs-from-windows-command-prompt...-tp15291117p15816645.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: task won't run in cruise control but runs from windows command prompt...

Posted by Antti Luoma <an...@gmail.com>.
Hi,

Have you introduced ${existingExt.dir} in cruise control and passed that to
ant correctly?  for example:

<cruisecontrol>
    <property name="ftp.ext.dir" value="/home/ftp"/>
.......
.......
 <project ..>
...
<ant target="clean..build"
                      anthome="${env.ANT_HOME}"
                      buildfile="build-wrapper.xml"
                      uselogger="true"
                      >
                <property name="existingExt.dir" value="${ftp.ext.dir}" />
            </ant>
...
</project>
</cruisecontrol>
...


-- 
-Antti-

2008/2/5, Christopher Styles <st...@gmail.com>:
>
> Hi,
>
> I know this isn't a Cruise Control list, but I need some assistance
> with this issue, since it centers around Ant - and no one from the Cruise
> Contol list has responded... When I run the tasks below in cruise control
> 2.7.1, the second task fails, which happens to be dependent on the
> first...
> When I run them from the Windows command prompt they work great, but I'm
> not
> yielding the same results in Cruise Control... What's suppose to happen
> is,
> target "lib-ext" will be executed, but first the dependency target
> "lib-ext-test" gets executed. If the folder exists, it will set the
> "folder-exists" property. Then, Ant goes back to the "lib-ext" task and
> checks the dependency. If "folder-exists" is set, "lib-ext" will be
> executed. Otherwise, it won't.  In other words, the "lib-ext-test" target
> checks to see if the folder exists, and if it does, "lib-ext" ftps the
> files
> within the folder.... If the folder doesn't exist, "lib-ext" doesn't
> execute, and the process moves on to the next target in the sequence... As
> I
> stated earlier, it works great from the Windows command prompt, but in
> Cruise Control it fails and just says "folder doesn't exist"... Why won't
> this execute in Cruise Control like it does from the Windows command
> prompt...??? If someone could assist me with this I'd surely appreciate
> it...
>
> <target name="lib-ext-test">
>    <available property="folder-exists"
>       file="${existingExt.dir}"/>
> </target>
>
> <target name="lib-ext" if="folder-exists" depends="lib-ext-test">
>     <ftp server="${remoteHostName}"
>         userid="${remoteInstallUserId}"
> password="${remoteInstallPassword}"
>         remotedir="${remoteExtFtpDir}"
>         verbose="yes"
>         binary="yes"
>         action="put"
>         chmod="755">
>      <fileset dir="${existingExt.dir}">
>         <include name="*.jar"/>
>         <include name="*.properties"/>
>         <include name="*.txt"/>
>         <include name="*.xml"/>
>         <include name="*.xsd"/>
>      </fileset>
>     </ftp>
> </target>
>
> Thanks
> Chris
>

AW: task won't run in cruise control but runs from windows command prompt...

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
You should echo the property "folder-exists" in both targets.

Maybe the property is already set when you reach the first task. ANT will never unset it.

CC runs a loop.
Find out in what situations the errer happens.
Is it the first call by CC or the second.

-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: Christopher Styles [mailto:styles706@gmail.com] 
Gesendet: Dienstag, 5. Februar 2008 15:21
An: Ant Users List
Betreff: task won't run in cruise control but runs from windows command prompt...

Hi,

I know this isn't a Cruise Control list, but I need some assistance with this issue, since it centers around Ant - and no one from the Cruise Contol list has responded... When I run the tasks below in cruise control 2.7.1, the second task fails, which happens to be dependent on the first...
When I run them from the Windows command prompt they work great, but I'm not yielding the same results in Cruise Control... What's suppose to happen is, target "lib-ext" will be executed, but first the dependency target "lib-ext-test" gets executed. If the folder exists, it will set the "folder-exists" property. Then, Ant goes back to the "lib-ext" task and checks the dependency. If "folder-exists" is set, "lib-ext" will be executed. Otherwise, it won't.  In other words, the "lib-ext-test" target checks to see if the folder exists, and if it does, "lib-ext" ftps the files within the folder.... If the folder doesn't exist, "lib-ext" doesn't execute, and the process moves on to the next target in the sequence... As I stated earlier, it works great from the Windows command prompt, but in Cruise Control it fails and just says "folder doesn't exist"... Why won't this execute in Cruise Control like it does from the Windows command prompt...??? If someone could assist me with this I'd surely appreciate it...

<target name="lib-ext-test">
   <available property="folder-exists"
      file="${existingExt.dir}"/>
</target>

<target name="lib-ext" if="folder-exists" depends="lib-ext-test">
    <ftp server="${remoteHostName}"
        userid="${remoteInstallUserId}" password="${remoteInstallPassword}"
        remotedir="${remoteExtFtpDir}"
        verbose="yes"
        binary="yes"
        action="put"
        chmod="755">
     <fileset dir="${existingExt.dir}">
        <include name="*.jar"/>
        <include name="*.properties"/>
        <include name="*.txt"/>
        <include name="*.xml"/>
        <include name="*.xsd"/>
     </fileset>
    </ftp>
</target>

Thanks
Chris

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