Garry Dias
Garry Dias

Reputation: 475

groovy-all:3.0.8 in my build.gradle is downloading different jars versions

After adding groovie-all:3.0.8 into my build.gradle, the downloaded jars are in different version as shown bellow. Each of this jars has its 3.0.8 version and I don't know why they aren't download instead.

groovy-all jars

Appreciate any help

Thanx

Upvotes: 2

Views: 3787

Answers (1)

ChrLipp
ChrLipp

Reputation: 15668

Since Groovy 2.5, groovy-all is just a pom which brings in the equivalent component jars, see the according release notes. This explains that you see no groovy-all.

Regarding the version numbers: spring-boot defines the grooy version, you can print it with:

ext {
    // versions taken from Spring BOM
    GROOVY_VERSION = dependencyManagement.importedProperties['groovy.version']
    println GROOVY_VERSION
}

and I expect it is 2.5.13 which for example is included by Spring Boot Version 2.3.4. Unfortunately you didn't specify your used Spring version.

With Spring Boot you include Groovy normally just with

compile "org.codehaus.groovy:groovy-all"

without a version number since Spring Boot defines the version.

So the question is how to override the provided Spring version - alternatively you can increase the used Spring version to get a more recent Groovy version.

To override the Spring version just exclude Groovy, eg see this SO posts:

E.g. use:

ext['groovy.version'] = '3.0.8'

To see which component included the wrong version you can execute the Gradle task "dependencies" (find it in IDEA under the help categegory). In this answer I assumed it was Spring (and I am sure it was).

Upvotes: 2

Related Questions