【发布时间】:2018-02-27 20:32:18
【问题描述】:
我需要在 Maven 中安装 magnolia-rest-content-delivery 模块。
- 在安装此模块之前,我有以下依赖项。项目的构建和安装没有问题。
问题:如何在 magnolia 项目中不定义依赖版本?
- 第一次尝试安装没有版本,就像组
info.magnolia.rest中的其他人一样
这会导致 info.magnolia.rest:magnolia-rest-content-delivery:jar 的错误 `[ERROR] 'dependencies.dependency.version' 丢失。``
问题:magnolia-rest-content-delivery 有什么特别之处所以需要版本?
- 第二次尝试 - 将版本添加到
在部署过程中导致错误
Module Magnolia REST Content Delivery (version 2.0.1) is dependent on rest-integration (version 2.0.1/*),
but Magnolia REST Integration (version 1.2.1) is currently installed.
- 第三次尝试:将相同版本添加到
info.magnolia.restgroupId 中的所有依赖项
在部署过程中导致同样的错误
Module Magnolia REST Content Delivery (version 2.0.1) is dependent on rest-integration (version 2.0.1/*),
but Magnolia REST Integration (version 1.2.1) is currently installed.
接下来我可以尝试什么来解决问题? 谢谢。
更新: 项目的 pom 依赖于 magnolia-enterprise-bundle-parent v#5.5.4
在依赖树中我可以看到 magnolia-rest-integration 选择了 1.2.1 版本
什么是覆盖 BOM 中定义的版本的安全方法?
更新 2:
我最终在dependencyManagement部分覆盖了依赖版本
清理本地maven仓库并构建
尽管有效的 pom 现在显示 magnolia rest 模块的正确版本,但结果几乎相同
[ERROR] Module Magnolia REST Tools (version 2.0.1) is dependent on rest-integration (version 2.0.1/*),
but Magnolia REST Integration (version 1.2.1) is currently installed.
[ERROR] Module Magnolia REST Content Delivery (version 2.0.1) is dependent on rest-integration (version 2.0.1/*),
but Magnolia REST Integration (version 1.2.1) is currently installed.
我无法附加依赖树输出文件(这里是一小段摘录)
[INFO] +- info.magnolia.eebundle:magnolia-enterprise-standard-webapp:war:5.5.4:compile
[INFO] +- info.magnolia.rest:magnolia-rest-integration:jar:2.0.1:compile
[INFO] | +- info.magnolia.core:magnolia-configuration:jar:5.5.4:compile
[INFO] | | \- org.atteo:evo-inflector:jar:1.2.1:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.2:compile
[INFO] | | \- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | +- org.jboss.resteasy:resteasy-jaxrs:jar:3.0.19.SP1-redhat-1:compile
[INFO] | | +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Final-redhat-1:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.3.0.Final-redhat-1:compile
[INFO] | +- org.jboss.resteasy:resteasy-jackson2-provider:jar:3.0.19.SP1-redhat-1:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.8.6:compile
[INFO] | | \- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.8.6:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.8.6:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.8.6:compile
[INFO] | +- org.jboss.resteasy:resteasy-jaxb-provider:jar:3.0.19.SP1-redhat-1:compile
[INFO] | +- javax.ws.rs:javax.ws.rs-api:jar:2.0:compile
[INFO] | \- com.google.guava:guava:jar:18.0:compile
[INFO] +- info.magnolia.rest:magnolia-rest-services:jar:2.0.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.4:compile
[INFO] | +- org.apache.jackrabbit:jackrabbit-jcr-commons:jar:2.12.4:compile
[INFO] | +- commons-codec:commons-codec:jar:1.10:compile
[INFO] | +- org.jboss.resteasy:resteasy-jackson-provider:jar:3.0.19.SP1-redhat-1:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.12:compile
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12:compile
[INFO] | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.12:compile
[INFO] | | \- org.codehaus.jackson:jackson-xc:jar:1.9.12:compile
[INFO] | \- org.jboss.resteasy:resteasy-client:jar:3.0.19.SP1-redhat-1:compile
[INFO] +- info.magnolia.rest:magnolia-rest-tools:jar:2.0.1:compile
[INFO] | +- io.swagger:swagger-jaxrs:jar:1.5.4:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.8.6:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.8.6:compile
[INFO] | | | +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | | | \- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
[INFO] | | \- io.swagger:swagger-core:jar:1.5.4:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.8.6:compile
[INFO] | | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | \- io.swagger:swagger-models:jar:1.5.4:compile
[INFO] +- info.magnolia.rest:magnolia-rest-content-delivery:jar:2.0.1:compile
[INFO] | +- javax.json:javax.json-api:jar:1.0:compile
[INFO] | +- org.glassfish:javax.json:jar:1.0:compile
[INFO] | \- org.apache.jackrabbit:jackrabbit-spi-commons:jar:2.12.4:compile
[INFO] | \- org.apache.jackrabbit:jackrabbit-spi:jar:2.12.4:compile
这个mistic“Magnolia REST Integration(1.2.1版)”提到的唯一地方是:
.m2\repository\info\magnolia\bundle\magnolia-bundle-parent\5.5.4\magnolia-bundle-parent-5.5.4.pom
【问题讨论】: