Update: This seems to happen when the dependency is only <dependency org="org.apache.logging.log4j" name="log4j" rev="2.13.3" conf="compile->*"/>
Other dependencies do work. > On May 18, 2020, at 19:11 , Rick Mann <rm...@latencyzero.com> wrote: > > Hi there. For the life of me I can't get Ivy to set a classpath using > cachepath (I wrote this up on SO, too: > https://stackoverflow.com/questions/61869872/ant-ivy-wont-set-compile-classpath): > > ``` > <target name="resolve" description="==> retrieve dependencies with Ivy"> > <ivy:retrieve/> > <ivy:cachepath pathid="runtime.classpath" /> > </target> > ... > <pathconvert property="classpathInName" > refid="runtime.classpath" /> > <echo>runtime.classpath is '${classpathInName}'</echo> > ``` > > My ivy.xml: > ``` > <ivy-module version="2.0"> > <info organisation="com.latencyzero.missiondb" module="webapp"/> > > <configurations defaultconfmapping="runtime->*"> > <conf name="compile" visibility="public" description="this is > the default scope, used if none is specified. Compile dependencies are > available in all classpaths."/> > <conf name="provided" visibility="public" description="this is > much like compile, but indicates you expect the JDK or a container to provide > it. It is only available on the compilation classpath, and is not > transitive."/> > <conf name="runtime" visibility="public" description="this > scope indicates that the dependency is not required for compilation, but is > for execution. It is in the runtime and test classpaths, but not the compile > classpath." extends="compile"/> > <conf name="test" visibility="private" description="this scope > indicates that the dependency is not required for normal use of the > application, and is only available for the test compilation and execution > phases." extends="runtime"/> > </configurations> > > > <dependencies> > <dependency org="org.apache.logging.log4j" > name="log4j" rev="2.13.3" > conf="compile->*"/> > </dependencies> > </ivy-module> > ``` > > Output of `ant build` (value of runtime.classpath at the end): > > ``` > ... > resolve: > [ivy:retrieve] :: Apache Ivy 2.4.0 - 20141213170938 :: > http://ant.apache.org/ivy/ :: > [ivy:retrieve] :: loading settings :: url = > jar:file:/usr/local/Cellar/ant/1.10.8/libexec/lib/ivy-2.4.0.jar!/org/apache/ivy/core/settings/ivysettings.xml > [ivy:retrieve] :: resolving dependencies :: > com.latencyzero.missiondb#webapp;working@EclipseSSD-4728.local > [ivy:retrieve] confs: [compile, provided, runtime, test] > [ivy:retrieve] found org.apache.logging.log4j#log4j;2.13.3 in public > [ivy:retrieve] :: resolution report :: resolve 85ms :: artifacts dl 1ms > --------------------------------------------------------------------- > | | modules || artifacts | > | conf | number| search|dwnlded|evicted|| number|dwnlded| > --------------------------------------------------------------------- > | compile | 1 | 0 | 0 | 0 || 0 | 0 | > | provided | 0 | 0 | 0 | 0 || 0 | 0 | > | runtime | 1 | 0 | 0 | 0 || 0 | 0 | > | test | 1 | 0 | 0 | 0 || 0 | 0 | > --------------------------------------------------------------------- > [ivy:retrieve] :: retrieving :: com.latencyzero.missiondb#webapp > [ivy:retrieve] confs: [compile, provided, runtime, test] > [ivy:retrieve] 0 artifacts copied, 0 already retrieved (0kB/4ms) > > compile: > [echo] runtime.classpath is '' > ... > ``` > > Any idea what I'm doing wrong? Thanks. > > -- > Rick Mann > rm...@latencyzero.com > > -- Rick Mann rm...@latencyzero.com