io.github.dropwizard-jobs 的 Maven 依赖

Maven dependency for io.github.dropwizard-jobs

我正在使用 io.github.dropwizard-jobs (https://github.com/dropwizard-jobs/dropwizard-jobs) 作为 Dropwizard 项目中的调度程序。

已添加 POM 依赖项

<dependency>
    <groupId>io.github.dropwizard-jobs</groupId>
    <artifactId>dropwizard-jobs-guice</artifactId>
    <version>4.0.0-RELEASE</version>
</dependency>

集成通过 eclipse 在本地运行良好,但是当尝试使用 mvn clean package 创建包时,出现以下错误。

[WARNING]
Dependency convergence error for com.mchange:c3p0:0.9.5.4 paths to dependency are:
+-project_name:Scheduler:1.0.0.0
  +-io.github.dropwizard-jobs:dropwizard-jobs-guice:4.0.0-RELEASE
    +-io.github.dropwizard-jobs:dropwizard-jobs-core:4.0.0-RELEASE
      +-com.mchange:c3p0:0.9.5.4
and
+-project_name:Scheduler:1.0.0.0
  +-io.github.dropwizard-jobs:dropwizard-jobs-guice:4.0.0-RELEASE
    +-org.quartz-scheduler:quartz:2.3.1
      +-com.mchange:c3p0:0.9.5.3
and
+-project_name:Scheduler:1.0.0.0
  +-io.github.dropwizard-jobs:dropwizard-jobs-guice:4.0.0-RELEASE
    +-com.mchange:c3p0:0.9.5.4

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability the error(s) are [
Dependency convergence error for com.mchange:c3p0:0.9.5.4 paths to dependency are:
+-project_name:Scheduler:1.0.0.0
  +-io.github.dropwizard-jobs:dropwizard-jobs-guice:4.0.0-RELEASE
    +-io.github.dropwizard-jobs:dropwizard-jobs-core:4.0.0-RELEASE
      +-com.mchange:c3p0:0.9.5.4
and
+-project_name:Scheduler:1.0.0.0
  +-io.github.dropwizard-jobs:dropwizard-jobs-guice:4.0.0-RELEASE
    +-org.quartz-scheduler:quartz:2.3.1
      +-com.mchange:c3p0:0.9.5.3
and
+-project_name:Scheduler:1.0.0.0
  +-io.github.dropwizard-jobs:dropwizard-jobs-guice:4.0.0-RELEASE
    +-com.mchange:c3p0:0.9.5.4

请让我知道我遗漏了什么或还需要补充什么。

在您的 POM 中,依赖收敛规则处于活动状态。这意味着如果您的依赖关系树中具有相同依赖关系的不同版本,构建将失败。

您需要通过添加修复 com.mchange:c3p0.

版本的 <dependencyManagement> 条目来解决这个问题