Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
BarnasJ opened this issue May 20, 2020 · 1 comment
Assignees
Labels
type: regression A regression from a previous release
Milestone

Comments

@BarnasJ
Copy link

BarnasJ commented May 20, 2020

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 20, 2020
@wilkinsona wilkinsona added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels May 20, 2020
@wilkinsona wilkinsona added this to the 2.3.1 milestone May 20, 2020
@wilkinsona wilkinsona self-assigned this May 20, 2020
@wilkinsona wilkinsona changed the title spring-boot-gradle-plugin error during gradle compile tasks Dependency version for org.apache.commons:commons-compress is missing from spring-boot-gradle-plugin's pom May 20, 2020
@wilkinsona
Copy link
Member

Thanks for the report. The runtime scope of the commons-compress dependency is correct. It's an implementation detail of the plugin so it should not leak onto the compile classpath of a consuming project. If your project that is consuming spring-boot-gradle-plugin also uses commons-compress it should declare its own dependency upon it.

The missing version number is unintentional and we will fix it. Thanks for letting us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

3 participants