SvnAnt挂起提交重命名的SVN文件夹



我正在与Jenkins合作执行构建并运行我的Ant代码。

Jenkins负责将SVN文件签出到我的工作区。我使用SvnAnt提交对文件的更改。在这种情况下,我会在需要时提交新的FLA文件。这适用于我的所有构建,但有一个,这个构建的主要区别是,在源SVN文件中,签出的一个文件夹中有一个提交的打字错误,用户SVN重命名了文件夹,并删除了构建节点上的签出内容。当这个构建被修改(需要添加新的FLA文件)时,构建一直到提交部分并挂起。

其代码如下:

<!-- load the svn task -->
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
<target name="commitFLA">
    <echo>=== COMMIT FLA FILES TO THE ${dita.map.filename.root} MODULE FOLDER ===</echo>
    <svn username="${username}" password="${password}">
        <add dir="${workspace}${dita.map.filename.root}" force="true" />
        <commit dir="${workspace}${dita.map.filename.root}" message="Added FLA Template Files for the ${dita.map.filename.root} Module" />
    </svn>
</target>

以下是Jenkins展示的内容:

commitFLA:
 [echo] === COMMIT FLA FILES TO THE TTWCS_Sys_Admin MODULE FOLDER ===
  [svn] <Add> started ...
  [svn] <Add> finished.
  [svn] <Commit> started ..

现在,如果我已经提交了所有文件,并且在构建作业中没有进行任何更改,那么它可以正常工作:

commitFLA:
 [echo] === COMMIT FLA FILES TO THE TTWCS_Sys_Admin MODULE FOLDER ===
  [svn] <Add> started ...
  [svn] <Add> finished.
  [svn] <Commit> started ...
  [svn] <Commit> finished.

在这一点上,我不知道该怎么办。我需要知道是否有日志输出,我可以把它发布出来,这样我就知道问题是什么。这段代码用于多个构建作业,除了这一个和其他一些与此问题无关但使用类似提交代码结构的构建作业外,这些作业都可以正常工作。我希望修复这一个可以为其他人带来修复。

编辑:根据Chad Nouis 的要求,从JSTACK添加堆栈跟踪

2016-01-07 11:39:02 
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode): 
"Timer-0" #27 daemon prio=5 os_prio=0 tid=0x00000000546c3800 nid=0x5120 in Object.wait() [0x0000000056e1e000] 
   java.lang.Thread.State: TIMED_WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.util.TimerThread.mainLoop(Unknown Source) 
    - locked <0x00000000daf5c040> (a java.util.TaskQueue) 
    at java.util.TimerThread.run(Unknown Source) 
"Thread-11" #25 daemon prio=5 os_prio=0 tid=0x0000000053d87000 nid=0x4d88 in Object.wait() [0x0000000056cdf000] 
   java.lang.Thread.State: WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    - locked <0x00000000daf5c1d0> (a java.lang.ref.ReferenceQueue$Lock) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    at org.tmatesoft.svn.core.javahl.SVNClientImplTracker.run(SVNClientImplTracker.java:53) 
    at java.lang.Thread.run(Unknown Source) 
"Service Thread" #8 daemon prio=9 os_prio=0 tid=0x0000000052325800 nid=0x5080 runnable [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 
"C1 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000052320800 nid=0x4544 waiting on condition [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 
"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x00000000522c7000 nid=0x4e58 waiting on condition [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 
"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x00000000522c2800 nid=0x5178 waiting on condition [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 
"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x00000000522c1000 nid=0x5114 runnable [0x0000000000000000] 
   java.lang.Thread.State: RUNNABLE 
"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000001e99000 nid=0x53a4 in Object.wait() [0x000000005285f000] 
   java.lang.Thread.State: WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    - locked <0x00000000d5577718> (a java.lang.ref.ReferenceQueue$Lock) 
    at java.lang.ref.ReferenceQueue.remove(Unknown Source) 
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) 
"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x0000000001e97800 nid=0x526c in Object.wait() [0x00000000526de000] 
   java.lang.Thread.State: WAITING (on object monitor) 
    at java.lang.Object.wait(Native Method) 
    at java.lang.Object.wait(Unknown Source) 
    at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) 
    - locked <0x00000000d55778d0> (a java.lang.ref.Reference$Lock) 
"main" #1 prio=5 os_prio=0 tid=0x00000000003af000 nid=0x50c4 runnable [0x00000000020fd000] 
   java.lang.Thread.State: RUNNABLE 
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) 
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) 
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) 
    - locked <0x00000000c45b9478> (a java.net.DualStackPlainSocketImpl) 
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) 
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) 
    at java.net.PlainSocketImpl.connect(Unknown Source) 
    at java.net.SocksSocketImpl.connect(Unknown Source) 
    at java.net.Socket.connect(Unknown Source) 
    at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) 
    at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createSSLSocket(SVNSocketFactory.java:65) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:167) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:304) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:257) 
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:245) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:454) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:97) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:643) 
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryRoot(DAVRepository.java:128) 
    at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:996) 
    at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:891) 
    at org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:823) 
    at org.tmatesoft.svn.core.javahl.SVNClientImpl.commit(SVNClientImpl.java:665) 
    at org.tmatesoft.svn.core.javahl.SVNClientImpl.commit(SVNClientImpl.java:648) 
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.commit(AbstractJhlClientAdapter.java:310) 
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.commit(AbstractJhlClientAdapter.java:284) 
    at org.tigris.subversion.svnant.commands.Commit.svnCommitDir(Unknown Source) 
    at org.tigris.subversion.svnant.commands.Commit.execute(Unknown Source) 
    at org.tigris.subversion.svnant.commands.SvnCommand.executeCommand(Unknown Source) 
    at org.tigris.subversion.svnant.SvnTask.execute(Unknown Source) 
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) 
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
    at org.apache.tools.ant.Task.perform(Task.java:348) 
    at org.apache.tools.ant.Target.execute(Target.java:390) 
    at org.apache.tools.ant.Target.performTasks(Target.java:411) 
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) 
    at org.apache.tools.ant.Project.executeTarget(Project.java:1366) 
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 
    at org.apache.tools.ant.Project.executeTargets(Project.java:1249) 
    at org.apache.tools.ant.Main.runBuild(Main.java:801) 
    at org.apache.tools.ant.Main.startAnt(Main.java:218) 
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) 
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) 
"VM Thread" os_prio=2 tid=0x0000000001e91800 nid=0x4fb0 runnable  
"VM Periodic Task Thread" os_prio=2 tid=0x000000005232a800 nid=0x5330 waiting on condition  
JNI global references: 99

我发现了这个问题的修复方法。问题是SVN的签出版本(来自Jenkins插件)太低,无法提交回我们的Jenkins服务器。如果我使用SVNAnt来签出我想要提交更改的存储库,那么我可以使用SVNAnt向SVN添加/提交新文件,而不会出现任何问题。

相关内容

  • 没有找到相关文章

最新更新