Results 1 to 2 of 2
  1. #1
    rnara is offline Member
    Join Date
    Mar 2016
    Posts
    5
    Rep Power
    0

    Default Available task doesn't work in sshexec

    Hi,

    I'm doing ssh to a remote server and checking if a file exists in a particular directory.

    If deploy.war.failed file exists then mark the target as failed. The following is not working. Please let me know your suggestions

    <target name="checklog">
    <sshexec host="server1"
    username="user1"
    password="xxxxx"
    <available file="/deployroot/deploy.war.deployed" property="deployed"/>
    <available file="/deploy.root/deploy.war.failed" property="not_deployed"/>
    <fail if="not_deployed" message="Deployment failed"/>
    />
    </target>

    =====================
    I'm getting the following error
    =====================

    Element type "sshexec" must be followed by either attribute specifications, ">" or "/>"

  2. #2
    rnara is offline Member
    Join Date
    Mar 2016
    Posts
    5
    Rep Power
    0

    Default Re: Available task doesn't work in sshexec

    I found that either command or command resource attributes can be used in sshexec.

    Is there any way to use "IF" or "Available" tasks within command attribute? Please let me know.

Similar Threads

  1. Why doesn't this work
    By The Doctor11 in forum New To Java
    Replies: 11
    Last Post: 11-04-2014, 05:57 PM
  2. Failed to create task or type sshexec
    By ssakhare in forum Apache Ant
    Replies: 0
    Last Post: 01-06-2014, 07:52 AM
  3. I wonder why this doesn't work...
    By louboulos in forum New To Java
    Replies: 3
    Last Post: 05-13-2012, 04:59 PM
  4. Why doesn't this work?
    By mailman in forum Java Applets
    Replies: 5
    Last Post: 01-10-2012, 01:01 PM
  5. Why doesn't this work?
    By Corder10 in forum New To Java
    Replies: 1
    Last Post: 07-04-2009, 10:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •