我有一个带有以下设置的ant build.xml文件:
<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>运行ant构建将生成以下输出:
[svn] Using svnkit
[svn] <Commit> started ...
[svn] commit -m "commit version from build.xml by username" -N C:/path/to/WebContent/version.properties但它永远不会结束。就挂在这句话上了。由于SvnKit将WebContent目录设置为锁定,我最终不得不终止构建并清理svn目录
客户端库是svn版本1.6,我使用的是svnant版本1.3.1 Ant版本是1.7.1
这是怎么回事?
为什么它从不抛出错误或停止?
SvnKit是否只有SVN版本1.7+?
编辑:
所以我更多地摆弄了一下。如果我运行构建,而文件没有任何更改,则构建将继续
[svn] <Commit> finished.但是,如果我对文件进行任何编辑并运行构建,它就会挂起。
我遗漏了什么?
发布于 2013-04-06 00:46:35
谢谢@ChadNouis,我终于发现我在加载svn用户名和pw的属性文件之前设置了它们。
它被挂起是因为存储库需要用户名/pw,但没有提供用户名/pw。
看起来服务器会拒绝或者客户端会意识到超时的东西,但这就是问题所在。
有问题的配置:
<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>https://stackoverflow.com/questions/15773891
复制相似问题