Description

The svnant implementation provides some conditions which allow to check for some repository states so actions can be selectively performed.

Parameters

The following list of attributes is shared among all condition implementations:

AttributeDescriptionRequired
username

username that will be used for all nested svn commands.Deprecated. This attribute won't work with SVNANT 1.3.2+ . Use refid for svnSetting instead.

No
password

password that will be used for all nested svn commands.Deprecated. This attribute won't work with SVNANT 1.3.2+ . Use refid for svnSetting instead.

No
javahl

Set to "false" to use command line client interface instead of JNI JavaHL binding.Deprecated. This attribute won't work with SVNANT 1.3.2+ . Use refid for svnSetting instead.


Default: true
No
svnkit

Set to "false" to use command line client interface instead of SVNKit binding.Deprecated. This attribute won't work with SVNANT 1.3.2+ . Use refid for svnSetting instead.


Default: false
No
failonerror

Controls whether an error stops the build or is merely reported to the screen.Deprecated. This attribute won't work with SVNANT 1.3.2+ . Use refid for svnSetting instead.


Default: true
No
refid

If set the configuration for this task is taken from a svnSetting object. Such a settings instance simply provides default values, so they will be overridden in case the corresponding attribute on this task has been set.

No

Supported condition types

svnAvailablesvnExists

svnAvailable

Ant condition that verifies that a remote resource is available and identifies a specific type.

AttributeDescriptionRequired
target

File name or URL to the element to be queried during the condition.

Yes
type

Can be one of the following values:

  • file : The target must be a file.
  • dir : The target must be a directory.

No

svnExists

Ant condition that returns true if an element exists in the repository

AttributeDescriptionRequired
target

File name or URL to the element to be queried during the condition.

Yes

Example:

determine if there exist a "build.xml" file for a project

    <condition 
        property="fileExists" 
        value="true"
        else="false"
    >
        <svnExists 
            javahl="${javahl}" 
            svnkit="${svnkit}" 
            target="http://svn.mycompany.com/project/trunk/build.xml"
        />
    </condition>
    <echo>fileExists: ${fileExists}</echo>