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

Maven dependency updates #86

Closed
wants to merge 1 commit into from

Conversation

sebady
Copy link

@sebady sebady commented Dec 6, 2017

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
Copy link

@TexanHogman TexanHogman left a comment

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
Copy link
Author

sebady commented Dec 8, 2017

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
Copy link
Author

sebady commented Dec 8, 2017

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
Member

@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 ...

</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
Copy link
Member

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.

@@ -65,6 +65,13 @@
<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
Member

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
Copy link
Author

sebady commented Dec 8, 2017

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
Copy link
Author

sebady commented Dec 9, 2017

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