0

I want to use Quartz 2 dependency with spring 1.5.2.RELEASE

There I want to override the parent spring pom dependency for the quartz dependency only.

I tried to do this :

<properties>
    <quartz.version>2.3.0</quartz.version>
</properties>


<parent> 
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.2.RELEASE</version>
</parent>


<dependencies>
 <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-quartz</artifactId>
    </dependency>
</dependencies>

Error: Project build error: 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-quartz:jar is missing.

Kramer
  • 389
  • 8
  • 34
  • Since there is no pom dependency of quartz 1.5.2.RELEASE therefore I am getting this error – Kramer Mar 19 '19 at 09:13
  • You need to use tag in your pom.xml. Check this : https://stackoverflow.com/questions/2619598/differences-between-dependencymanagement-and-dependencies-in-maven – Habil Mar 19 '19 at 09:17
  • @Habil if I do this no dependency is read it's giving error in whole project – Kramer Mar 19 '19 at 09:23
  • `spring-boot-starter-quartz` and quartz support in general for Spring Boot is only available since Spring Boot 2. So trying this with 1.5 will not work. – M. Deinum Mar 19 '19 at 09:34
  • @M.Deinum that's why I am asking if I can override parent pom dependency or not....though I have mentioned it directly.....` org.springframework.boot spring-boot-starter-quartz 2.0.0.RELEASE ` It's working in this case – Kramer Mar 19 '19 at 09:52
  • As stated overriding a dependency version for something that isn't managed is not going to work. Next to that trying to mix jars of different version is something you should never do, it will lead to issues. Overriding versions only works for versions defined in the parent not for included dependencies (unless they are defined in the parent). – M. Deinum Mar 19 '19 at 11:21

0 Answers0