io.github.dropwizard-jobs的Maven依赖项

问题描述 投票:2回答:1

我在Dropwizard项目中将io.github.dropwizard-jobs(https://github.com/dropwizard-jobs/dropwizard-jobs)用于调度程序。

已添加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

[请让我知道我想念的内容或需要添加的内容。

java maven dependencies dropwizard maven-enforcer-plugin
1个回答
3
投票

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

您需要通过添加用于修复<dependencyManagement>版本的com.mchange:c3p0条目来对此进行补救。

© www.soinside.com 2019 - 2024. All rights reserved.