Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.

Maven dependency updates - #86

Closed
sebady wants to merge 1 commit into
paypal:masterfrom
sebady:patch-sebady-dependency-updates
Closed

sebady wants to merge 1 commit into
paypal:masterfrom
sebady:patch-sebady-dependency-updates

Conversation

@sebady

@sebady sebady commented Dec 6, 2017

Copy link
Copy Markdown

Add exclusions for some maven dependencies to reduce duplicate
classes in classpath.

@sebady
sebady force-pushed the patch-sebady-dependency-updates branch from f0e0dc8 to deee722 Compare December 8, 2017 14:07
Add exclusions for some maven dependencies to reduce duplicate
classes in classpath.
@sebady
sebady force-pushed the patch-sebady-dependency-updates branch from deee722 to 18bd9dd Compare December 8, 2017 15:28

@TexanHogman TexanHogman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebady doesn't make sense to be to exclude in this project based upon how we may assemble this later with Tomcat. The exclusion should come at a higher level

@sebady

sebady commented Dec 8, 2017

Copy link
Copy Markdown
Author

There is already a direct tomcat dependency here via org.springframework.boot:spring-boot-starter-web -> org.springframework.boot:spring-boot-starter-tomcat -> org.apache.tomcat.embed:tomcat-embed-core

@sebady

sebady commented Dec 8, 2017

Copy link
Copy Markdown
Author

If the goal is to have this starter be agnostic of tomcat / undertow than some of these existing dependencies will need to be reworked and some should be marked as provided. That's all beyond the scope of this pr though.

@fabiocarvalho777

Copy link
Copy Markdown
Collaborator

@sebady , I agree with @TexanHogman .

And, regarding the comment of yours below, not, that is not the goal of this starter. The goal of this starter is to integrate RESTEasy to Spring Boot. The tomcat dependency is brought by Spring Boot itself by default, not this starter, not RESTEasy. And the reason why Spring Boot does so is because it is "opinionated", and it prefers Tomcat as its "favorite" container.

If the goal is to have this starter be agnostic of tomcat / undertow ...

<artifactId>resteasy-jackson2-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't be removed because it is needed for compilation time in in class ResteasyApplicationBuilder.java. As good practice, you should always have explicitly set in your pom files all dependencies you need for compilation time, instead of relying on eventual transitive dependencies.

<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>${resteasy.version}</version>
<!-- wse javax annotation classes from org.apache.tomcat:tomcat-annotations-api -->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, and the following exclusion too, can't be done, because you are under the assumption that Tomcat will always be present, which is not true. Spring Boot applications can use other containers, like Jetty or Undertow.

@sebady

sebady commented Dec 8, 2017

Copy link
Copy Markdown
Author

Tomcat is always present via inclusion here of spring-boot-starter-web dependency. Would you consider removing spring-boot-starter-web as a dependency in this starter? Do we need it here as a direct maven dependency? It's removal would make these exclusions in this pr un-necessary and reduces the class conflicts on the class path.

@sebady

sebady commented Dec 9, 2017

Copy link
Copy Markdown
Author

closing. See this is an alternative pr #88

@sebady sebady closed this Dec 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants