summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorThomas Koch <thomas@koch.ro>2022-06-13 11:17:33 +0000
committerthkoch2001 <94641+thkoch2001@users.noreply.github.com>2022-06-13 14:27:53 +0300
commit1c3c59de852f754d1b08810f9167afa532d42cc3 (patch)
tree67dcd548aecf429669f1e6bdb767a4eda7ffad1c /build.xml
parentc3307231d408908540b86b3e21406d9a542d8e5a (diff)
fix ant build failure on multiple call to resolve target
Failed build: https://github.com/yacy/yacy_search_server/runs/6859314856 Relevant build log: resolve: [ivy:retrieve] ivy.instance reference an ivy:settings defined in an other classloader. An new default one will be used in this project. [ivy:retrieve] :: Apache Ivy non official version - :: http://ant.apache.org/ivy/ :: [ivy:retrieve] :: loading settings :: url = jar:file:/usr/share/java/ivy.jar!/org/apache/ivy/core/settings/ivysettings.xml BUILD FAILED /home/yacy/actions-runner/_work/yacy_search_server/yacy_search_server/build.xml:111: java.lang.ClassCastException: org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor cannot be cast to org.apache.ivy.core.module.descriptor.ModuleDescriptor Finding: The second call to the resolve target in ant failed apparently due to two instances of Ivy in the java runtime. Without full investigation, the problem could be fixed by ensuring that the resolve target is only called once within one ant build.
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 36abdf92d..5d49f0b18 100644
--- a/build.xml
+++ b/build.xml
@@ -103,7 +103,7 @@
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.jar.file}"/>
</target>
- <target name="resolve" depends="install-ivy" description="--> retrieve dependencies with Ivy">
+ <target name="resolve" depends="install-ivy" description="--> retrieve dependencies with Ivy" unless="target-resolve-already-run">
<!-- The recommended way is to [conf] in the retrieve pattern instead of two calls to retrieve.
We can move there in a following step.
${lib} just happens to be equal to ${ivy.lib.dir}.
@@ -111,6 +111,7 @@
<ivy:retrieve conf="compile" pathid="compile.path" pattern="${ivy.lib.dir}/[artifact]-[revision].[ext]" />
<ivy:retrieve conf="test" pathid="test.path" pattern="${libt}/[artifact]-[revision].[ext]" />
<ivy:retrieve conf="libbuild" pathid="libbuild.path" pattern="${libbuild}/[artifact]-[revision].[ext]" />
+ <property name="target-resolve-already-run" value="true" />
</target>
<target name="buildGitRevTask" depends="resolve">