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

Reactor BOM has explicit scope for dependencies (should be empty) #677

Closed
dsyer opened this issue Oct 16, 2019 · 4 comments
Closed

Reactor BOM has explicit scope for dependencies (should be empty) #677

dsyer opened this issue Oct 16, 2019 · 4 comments

Comments

@dsyer
Copy link

dsyer commented Oct 16, 2019

The problem is that any project that uses the BOM and includes reactor as a transitive dependency (in any scope) will get reactor jars in compile scope.

See spring-projects/spring-framework#23660 for a similar problem there.

@dsyer
Copy link
Author

dsyer commented Oct 16, 2019

Looks like it is still a problem in Dysprosium. Also a problem in Californium (Spring Boot 2.1).

@wilkinsona
Copy link

wilkinsona commented Oct 16, 2019

This pom will reproduce the problem:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.0.BUILD-SNAPSHOT</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.example</groupId>
	<artifactId>dependency-scope-problem</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>dependency-scope-problem</name>
	<description>Demo project for Spring Boot</description>

	<properties>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-redis</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>

reactor-core and reactive-streams end up in compile scope.

nebhale added a commit to cloudfoundry/java-buildpack-auto-reconfiguration that referenced this issue Oct 16, 2019
Due to an issue with the Reactor BOM (reactor/reactor#677), too many classes,
including a version of Reactor, were being shaded in.  This change updates the
dependency configuration to minimize the shaded dependencies.

[resolves #73]

Signed-off-by: Ben Hale <bhale@pivotal.io>
bclozel added a commit to bclozel/reactor that referenced this issue Oct 16, 2019
This commit applies the Artifactory Gradle plugin and configures it to
publish the generated BOM.

Fixes reactor#677
bclozel added a commit to bclozel/reactor that referenced this issue Oct 16, 2019
This commit removes the scope information from the managed dependencies
in the Reactor BOM.

See reactorgh-677
bclozel added a commit to bclozel/reactor that referenced this issue Oct 17, 2019
This commit applies the Artifactory Gradle plugin and configures it to
publish the generated BOM.

Fixes reactor#677
simonbasle pushed a commit to bclozel/reactor that referenced this issue Oct 18, 2019
This commit applies the Artifactory Gradle plugin and configures it to
publish the generated BOM.

Fixes reactor#677
simonbasle pushed a commit to bclozel/reactor that referenced this issue Oct 18, 2019
Prior to this commit, the build would use the maven plugin to prepare
and publish a BOM for the reactor projects.

This commit replaces that with the java-platform plugin and expresses
the dependency versions as constraints.
simonbasle pushed a commit to bclozel/reactor that referenced this issue Oct 18, 2019
This commit applies the Artifactory Gradle plugin and configures it to
publish the generated BOM.

See other commits in reactor#678, see reactor#677.
simonbasle pushed a commit that referenced this issue Oct 18, 2019
This commit applies the Artifactory Gradle plugin and configures it to
publish the generated BOM.

See other commits in #678, see #677.
simonbasle pushed a commit that referenced this issue Oct 18, 2019
Prior to this commit, the build would use the maven plugin to prepare
and publish a BOM for the reactor projects.

This commit replaces that with the java-platform plugin and expresses
the dependency versions as constraints.

Backport modifications: no reactor-rabbitMQ, reactor-netty is under ipc.
simonbasle pushed a commit that referenced this issue Oct 18, 2019
This commit applies the Artifactory Gradle plugin and configures it to
publish the generated BOM.

See other commits in #678, see #677.
@simonbasle
Copy link
Member

This should now be fixed in Bismuth, Californium and Dysprosium build snapshots. Please double check @wilkinsona or @dsyer, and thanks for all the heavy lifting @bclozel !
Note that we don't plan on releasing a Bismuth release, unless this alone is still a red flag for SPR 5.0.x / Boot 2.0.x ? Californium on the other hand is used by SPR 5.1.x/ Boot 2.1.x and is still supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants