Question

I have an ant build.xml file with the following setup:

<typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
 classpathref="svnant.classpath"/>

<svnSetting id="svn.settings" username="${svn.username}" password="${svn.pw}" 
javahl="false" svnkit="true" failonerror="true"/>

<target name="commit">
   <svn refid="svn.settings">
        <commit file="${webcontent}/version.properties"
            message="commit version from build.xml by ${user.name}"
        />
    </svn>

</target>

Running the ant build generates the following output:

[svn] Using svnkit
[svn] <Commit> started ...
[svn] commit -m "commit version from build.xml by username" -N C:/path/to/WebContent/version.properties

But it never finishes. Just hangs on that statement. I end up having to terminate the build and cleaning up the svn directory since the WebContent directory was set to locked by SvnKit

The client repository is svn version 1.6 and I'm using svnant version 1.3.1 Ant version is 1.7.1

What's the deal with this?

Why does it never toss an error or stop?

Is SvnKit only SVN version 1.7+?

EDIT:

So I messed around with it a little more. If I run the build and the file doesn't have any changes, the build continues with

 [svn] <Commit> finished.

But if I make any edits to the file and run the build it hangs.

What am I missing?

Était-ce utile?

La solution

Thanks @ChadNouis, I finally found out that I was setting my svn user name and pw before the properties file for them was loaded.

It was hanging because the repository requires a username/pw but none were supplied.

Seems like something that either the server would reject or the client would realize has timed out, but that was the issue.

The offending configuration:

<typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
 classpathref="svnant.classpath"/>

<!-- create svnSetting from properties...that don't exist yet -->
<svnSetting id="svn.settings" username="${svn.username}" password="${svn.pw}" 
javahl="false" svnkit="true" failonerror="true"/>

<!-- properties file loaded after svnSetting created...d'oh -->
<property file="svn-credentials.properties"/>

<target name="commit">
   <svn refid="svn.settings">
        <commit file="${webcontent}/version.properties"
            message="commit version from build.xml by ${user.name}"
        />
    </svn>

</target>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top