ANT SVN mkDir блокируется от новой версии SVN (в Teamcity) - PullRequest
0 голосов
/ 10 июля 2020

У нас есть сервер Teamcity, на котором запущено несколько очень старых сборок ANT.

Краткое описание процесса сборки:

  1. Teamcity получает исходный код от svn
  2. Teamcity запускает ant с файлом сборки
  3. ANT выполняет сборку c
  4. ANT использует svnant.jar для создания тега версии

После обновления Версия SVN (это было что-то старое, например 1.6.x) для новой версии SVN, шаг 4 всегда блокируется (сервер teamcity показывает шаг сборки «mkdir» навсегда)

Я предполагаю, что у нас есть

  • либо проблема с версией (svnant.jar не поддерживает новый сервер SVN)
  • , либо у нас есть проблема с доступом SSL (новый сервер SVN больше не поддерживает старую версию SSL и svnant. jar не поддерживает новый SSL)

Мы уже обновили сервер Teamcity до новой версии, но это не изменило проблему.

У кого-то есть идеи, в чем проблема / решение это?

BUILD- XML

<?xml version="1.0" encoding="ISO-8859-1" ?>
<project name="db Build XML" basedir="." default="cleanup">

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

    <!-- START ############# Define properties ############# -->

    <!-- svn server properties -->
    <property name="svnRootDatabaseLib" value="${build.repository.databaseLib.path}" />
    <property name="svnRootJavaLib" value="${build.repository.javalib.path}" />
    <property name="svnTags" value="${build.tag.path}" />
    <property name="svnUser" value="${build.repository.user}" />
    <property name="svnPwd" value="${build.repository.password}" />
    <property name="svnHistoryRoot" value="${build.history.repository.path}" />

    <!-- temp directory properties -->

    <property name="tmpDir" value="../tmpDir" />

    <property name="releaseTmpDir" value="../releaseTmpDir" />


    <!-- packages directory properties -->
    <property name="guiDir" value="../gui" />
    <property name="mainDir" value="../main" />

    <property name="dbDir" value="../" />

    <property name="manifestTmpFile" value="${releaseTmpDir}/MANIFEST.MF" />

    <property name="nant.onfailure" value="cleanup" />

    <property name="build.type" value="buildserver" />
    <tstamp>
        <format property="TODAY" pattern="dd.MM.yyyy HH:mm:ss" />
    </tstamp>

    <!-- START ############# init ############# -->

    <target name="init">

        <fail unless="build.repository.path" message="$${build.repository.path} is not defined" />
        <fail unless="build.tag.path" message="$${build.tag.path} is not defined" />
        <fail unless="build.repository.user" message="$${build.repository.user} is not defined" />
        <fail unless="build.repository.password" message="$${build.repository.password} is not defined" />
        <fail unless="build.sic.version" message="$${build.sic.version} is not defined" />

        <mkdir dir="${releaseTmpDir}" />
        <mkdir dir="${releaseTmpDir}/mg" />

        <manifest file="${manifestTmpFile}">
            <attribute name="Build-Version" value="${build.number}" />
            <attribute name="Build-Type" value="${build.type}" />
            <attribute name="Build-Name" value="Java Library" />
            <attribute name="Build-Date" value="${TODAY}" />
            <attribute name="Build-Environment" value="JDK ${java.version}" />
            <attribute name="Build-SIC-Version" value="${build.sic.version}" />
            <attribute name="Build-Tag-Path" value="${svnTags}/${build.number}" />
            
        </manifest>

    </target>


    <!-- START ############# create packages ############# -->

    <target name="dbJar" depends="init">

        <delete dir="${tmpDir}" />
        <mkdir dir="${tmpDir}" />

        <javac srcdir="${dbDir}/sources" destdir="${tmpDir}" compiler="modern" nowarn="true" debug="true" optimize="true" deprecation="false">
            <classpath>
                <fileset dir="${dbDir}/resources/lib">
                    <include name="**/*.jar" />
                </fileset>
                <fileset dir="${releaseTmpDir}">
                    <include name="**/*.jar" />
                </fileset>
            </classpath>
        </javac>

        <!-- Copy conf dir to tmp -->
        <copy todir="${tmpDir}/config">
            <fileset dir="${dbDir}/resources/config" />
        </copy>

        <jar encoding="UTF8" destfile="${releaseTmpDir}/mg/databaseLib.jar" basedir="${tmpDir}" includes="**" compress="true" manifest="${manifestTmpFile}" />

    </target>


    <!-- START ############# Custom Tasks ############# -->

    <!-- Copy additional files -->
    <target name="copyToRelease" depends="dbJar">

        <!-- EXT dir for JAR files -->
        <copy preservelastmodified="true" todir="${releaseTmpDir}/ext">
            <fileset dir="../resources/lib">
                <include name="**/*" />
                <exclude name="junit-4.11.jar"/>
            </fileset>
        </copy>
    </target>

    <!-- Label version in SVN -->
    <target name="labelVersion" depends="copyToRelease">

        <svn svnkit="true" username="${svnUser}" password="${svnPwd}">
            <mkdir url="${svnTags}/${build.number}" message="INTERNAL db subdirectory created" />

                <!-- Label databaseLib -->
                <copy srcUrl="${svnRootDatabaseLib}" destUrl="${svnTags}/${build.number}/db" message="INTERNAL New tag ${build.number}" />
                <!-- Label JavaLib -->
                <copy srcUrl="${svnRootJavaLib}" destUrl="${svnTags}/${build.number}/javalib" message="INTERNAL New tag ${build.number}" />
            
        </svn>

    </target>


    <target name="cleanup" depends="labelVersion">

        <delete dir="${tmpDir}" failonerror="false" />
        <delete file="${manifestTmpFile}" failonerror="false" />
    </target>


    <!-- END ############# create packages ############# -->

</project>

Отвод резьбы:

2020-07-10 16:32:25
Full thread dump Java HotSpot(TM) Client VM (25.60-b23 mixed mode):

"Timer-0" #10 daemon prio=5 os_prio=0 tid=0x25e43000 nid=0x1128 in Object.wait() [0x2541f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.util.TimerThread.mainLoop(Timer.java:552)
    - locked <0x0fe64698> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:505)

"Thread-0" #8 daemon prio=5 os_prio=0 tid=0x25ec3800 nid=0x70 in Object.wait() [0x27b4f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0fe64820> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
    - locked <0x0fe64820> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
    at org.tmatesoft.svn.core.javahl.SVNClientImplTracker.run(SVNClientImplTracker.java:65)
    at java.lang.Thread.run(Thread.java:745)

"Service Thread" #7 daemon prio=9 os_prio=0 tid=0x24edf400 nid=0x6b0 runnable [0x00000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x24eb7c00 nid=0xa5c waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x24eb6800 nid=0x13c0 waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x24e83c00 nid=0xe9c runnable [0x00000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x24e7fc00 nid=0x1388 in Object.wait() [0x2523f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
    - locked <0x0f4d4168> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x24e79c00 nid=0x1258 in Object.wait() [0x2515f000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:502)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
    - locked <0x0f4d4308> (a java.lang.ref.Reference$Lock)

"main" #1 prio=5 os_prio=0 tid=0x00dd5800 nid=0x148 runnable [0x00fbe000]
   java.lang.Thread.State: RUNNABLE
    at java.io.WinNTFileSystem.getLastModifiedTime(Native Method)
    at java.io.File.lastModified(File.java:943)
    at org.tmatesoft.svn.core.internal.wc.SVNConfigFile.load(SVNConfigFile.java:219)
    at org.tmatesoft.svn.core.internal.wc.SVNConfigFile.getProperties(SVNConfigFile.java:52)
    at org.tmatesoft.svn.core.internal.wc.SVNCompositeConfigFile.getProperties(SVNCompositeConfigFile.java:32)
    at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getHostProperties(DefaultSVNAuthenticationManager.java:140)
    at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getProxyManager(DefaultSVNAuthenticationManager.java:89)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:147)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:323)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:999)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getCommitEditorInternal(DAVRepository.java:1129)
    at org.tmatesoft.svn.core.io.SVNRepository.getCommitEditor(SVNRepository.java:2474)
    at org.tmatesoft.svn.core.wc.SVNCommitClient.doMkDir(SVNCommitClient.java:467)
    at org.tmatesoft.svn.core.javahl.SVNClientImpl.mkdir(SVNClientImpl.java:834)
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.mkdir(AbstractJhlClientAdapter.java:2341)
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.mkdir(AbstractJhlClientAdapter.java:906)
    at org.tigris.subversion.svnant.commands.Mkdir.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:288)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    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:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

"VM Thread" os_prio=2 tid=0x24e75800 nid=0x3ec runnable 

"VM Periodic Task Thread" os_prio=2 tid=0x24ee3000 nid=0x814 waiting on condition 

JNI global references: 256
...