-
Notifications
You must be signed in to change notification settings - Fork 41.2k
spring-boot-starter-velocity incompatible with spring-boot-starter-data-jpa #2814
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
Comments
I assume you're using Maven? If you order your dependencies with <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-velocity</artifactId>
</dependency> Maven will choose to use Antlr 2.7.7. However, if you list <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-velocity</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> Maven will choose Antlr 2.7.2. This difference is because of Maven's "dependency mediation":
If you were using Gradle you would always get 2.7.7 as, when there are multiple versions of a dependency in the graph, Gradle will choose the latest version. There are a few ways you can fix this yourself:
That said, we should probably take the same approach as we have for another Hibernate dependency, javassist, and declare dependency management for the version of Antlr that Hiberate uses. For the record, the Spring IO Platform already provides such dependency management. |
Hibernate depends on antlr:antlr:2.7.7 (the latest version on Antlr 2) and fails with earlier 2.7.x versions due to a missing method. This can cause problems for Maven users if they also depend on something that pulls in an earlier version of Antlr, such as spring-boot-starter-velocity. Gradle users are unaffected as, when multiple versions of a dependency are found in the graph, Gradle will choose the latest version. This commit adds dependency management for antlr:antlr:2.7.7 to ensure that the latest, and Hibernate compatible, version of Antlr 2 is used. Closes spring-projectsgh-2814
Hello,
Using Spring boot 1.2.3 , spring-boot-starter-velocity is incompatible with spring-boot-starter-data-jpa due to the resolved version of antlr
The text was updated successfully, but these errors were encountered: