@@ -140,7 +140,7 @@ class ClusterFormationTasks {
140140 } else {
141141 dependsOn = startTasks. empty ? startDependencies : startTasks. get(0 )
142142 writeConfigSetup = { Map esConfig ->
143- String unicastTransportUri = node. config. unicastTransportUri(nodes. get(0 ), node, project. ant )
143+ String unicastTransportUri = node. config. unicastTransportUri(nodes. get(0 ), node, project. createAntBuilder() )
144144 if (unicastTransportUri == null ) {
145145 esConfig[' discovery.zen.ping.unicast.hosts' ] = []
146146 } else {
@@ -717,7 +717,7 @@ class ClusterFormationTasks {
717717 Collection<String > unicastHosts = new HashSet<> ()
718718 nodes. forEach { node ->
719719 unicastHosts. addAll(node. config. otherUnicastHostAddresses. call())
720- String unicastHost = node. config. unicastTransportUri(node, null , project. ant )
720+ String unicastHost = node. config. unicastTransportUri(node, null , project. createAntBuilder() )
721721 if (unicastHost != null ) {
722722 unicastHosts. add(unicastHost)
723723 }
@@ -913,9 +913,10 @@ class ClusterFormationTasks {
913913 outputPrintStream : outputStream,
914914 messageOutputLevel : org.apache.tools.ant.Project . MSG_INFO )
915915
916- project. ant. project. addBuildListener(listener)
917- Object retVal = command(project. ant)
918- project. ant. project. removeBuildListener(listener)
916+ AntBuilder ant = project. createAntBuilder()
917+ ant. project. addBuildListener(listener)
918+ Object retVal = command(ant)
919+ ant. project. removeBuildListener(listener)
919920 return retVal
920921 }
921922
0 commit comments