Skip to content

Dependency version for org.apache.commons:commons-compress is missing from spring-boot-gradle-plugin's pom #21518

@BarnasJ

Description

@BarnasJ

Hello,
we've got an issue with spring-boot-gradle-plugin when used as a dependency in the project.

Used versions

Spring Boot version used: 2.3.0.RELEASE
spring-boot-gradle-plugin version: 2.3.0.RELEASE
Gradle version: 5.6.4 (or 6.4 the same issue)

Description

When plugin is added as one of dependencies in build.gradle:

dependencies {
	api "org.springframework.boot:spring-boot-gradle-plugin:2.3.0.RELEASE"
}

we get errors like below:

Error while running gradle dependency task:

compileClasspath - Compile classpath for source set 'main'.
Errors occurred while build effective model from C:\Users\XXXXX\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-gradle-plugin\2.3.0.RELEASE\572eb5251f62db76a2c044a7f1d8b80492727cf4\spring-boot-gradle-plugin-2.3.0.RELEASE.pom:
    'dependencies.dependency.version' for org.apache.commons:commons-compress:jar is missing. in org.springframework.boot:spring-boot-gradle-plugin:2.3.0.RELEASE

Error while running gradle compileJava task:

> Task :compileJava
Errors occurred while build effective model from C:\Users\XXXXX\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-gradle-plugin\2.3.0.RELEASE\572eb5251f62db76a2c044a7f1d8b80492727cf4\spring-boot-gradle-plugin-2.3.0.RELEASE.pom:
    'dependencies.dependency.version' for org.apache.commons:commons-compress:jar is missing. in org.springframework.boot:spring-boot-gradle-plugin:2.3.0.RELEASE

We have checked the POM of this plugin and we have found that there is a change comparing it to 2.2.x versions:

In version 2.2.7.RELEASE POM we have:

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.19</version>
<scope>compile</scope>
</dependency>

And in version 2.3.0.RELEASE POM we have:

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<scope>runtime</scope>
</dependency>

There is a scope change and version property was removed.
With version 2.2.7.RELEASE we don't have that error.

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions