spring boot - Gradle with a local pom dependency picks up wrong version -
my build.gradle references local maven pom. have enabled mavenlocal()
repository , have added jar compile time dependency (eg. my-local-lib, shown below).
repositories { mavencentral() mavenlocal() } dependencies { compile (group: 'com.company', name: 'my-local-lib', version: '1.0-snapshot') }
gradle indeed picks , adds dependency. my-local-lib, however, dependent on library specified in pom.xml, gradle fails pick correct version specified in pom.xml, , instead chooses earlier version. particular jar dependency not dependency on other library.
is known issue? due my-local-lib being snapshot version? there way can enforce gradle respect versions specified in libraries?
try add following piece of code:
configurations.all { resolutionstrategy { cachechangingmodulesfor 0, 'seconds' } }
to build.gradle
script.
Comments
Post a Comment