在 Tycho 中生成 p2 存储库依赖关系的分层依赖关系树

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

我正在尝试解决 tycho 中的版本冲突,其中在编译时加载插件的多个版本,这是项目结构不允许的,并在构建期间引发错误。 我已经检查了在清单中设置的版本在各处都相同,但是传递依赖项太多,无法手动检查它们。我尝试使用

mvn dependency:tree
生成依赖关系树,它还显示来自 p2 存储库的传递依赖关系。 不幸的是,它没有显示这些传递依赖项的层次结构,这使得找到导致版本冲突的特定所需包变得相当困难。 树的这一小部分显示了问题。

[INFO] Building State Chart Feature 0.0.3-SNAPSHOT                      [89/90]
[INFO] --------------------------[ eclipse-feature ]---------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ at.jku.mevss.statechart.feature ---
[INFO] at.jku.mevss:at.jku.mevss.statechart.feature:eclipse-feature:0.0.3-SNAPSHOT
[INFO] +- at.jku.mevss:cdsl.language:jar:0.0.1-SNAPSHOT:compile
[INFO] +- com.github.oxo42:stateless4j:jar:2.5.0:compile
[INFO] |  \- org.slf4j:slf4j-jdk14:jar:1.7.7:compile
[INFO] |     \- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] +- org.mapdb:mapdb:jar:2.0-beta13:compile
[INFO] +- com.google.guava:guava:jar:28.0-jre:compile
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  +- org.checkerframework:checker-qual:jar:2.8.1:compile
[INFO] |  +- com.google.errorprone:error_prone_annotations:jar:2.3.2:compile
[INFO] |  +- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile
[INFO] +- net.sdruskat:net.sdruskat.fragment.sun.misc:jar:1.0.0:compile
[INFO] +- org.jfree:jfreechart:jar:1.0.19:compile
[INFO] |  \- org.jfree:jcommon:jar:1.0.23:compile
[INFO] +- org.json:json:jar:20200518:compile
[INFO] +- com.helger:jcodemodel:jar:3.4.0:compile
[INFO] +- at.jku.mevss:at.jku.ase.logging:eclipse-plugin:2.16.0-SNAPSHOT:provided
[INFO] +- p2.eclipse-plugin:org.eclipse.core.runtime:jar:3.15.0.v20180817-1401:system
[INFO] +- p2.eclipse-plugin:org.apache.log4j:jar:1.2.15.v201012070815:system
[INFO] +- at.jku.mevss:at.jku.ase.ulm:eclipse-plugin:2.16.0-SNAPSHOT:provided
[INFO] +- at.jku.mevss:at.jku.mevss.eventdistributor.core:eclipse-plugin:0.1.0-SNAPSHOT:provided
[INFO] |  \- p2.eclipse-plugin:org.apache.commons.logging:jar:1.2.0.v20180409-1502:system
[INFO] +- at.jku.mevss:at.jku.mevss.lib:eclipse-plugin:0.1.0-SNAPSHOT:provided
[INFO] +- at.jku.mevss:at.jku.mevss.util:eclipse-plugin:1.0.0-SNAPSHOT:provided
[INFO] +- at.jku.mevss:at.jku.mevss.settingsPlugin:eclipse-plugin:1.0.0-SNAPSHOT:provided
[INFO] +- p2.eclipse-plugin:org.apache.commons.lang:jar:2.6.0.v201404270220:system
[INFO] +- p2.eclipse-plugin:javax.xml.bind:jar:2.2.0.v201105210648:system
[INFO] +- at.jku.mevss:at.jku.mevss.eventdistributor.service.core:eclipse-plugin:1.0.0-SNAPSHOT:provided
[INFO] +- p2.eclipse-plugin:org.eclipse.ui:jar:3.110.0.v20180828-1350:system
[INFO] +- p2.eclipse-plugin:org.apache.commons.io:jar:2.2.0.v201405211200:system
[INFO] +- p2.eclipse-plugin:org.apache.commons.collections:jar:3.2.2.v201511171945:system
[INFO] +- p2.eclipse-plugin:com.google.guava:jar:28.0.0.jre:system
[INFO] +- at.jku.mevss:at.jku.mevss.memodel:eclipse-plugin:0.1.0-SNAPSHOT:provided
[INFO] +- p2.eclipse-plugin:org.eclipse.core.resources:jar:3.13.100.v20180828-0158:system
[INFO] +- p2.eclipse-plugin:com.thoughtworks.xstream:jar:1.3.1.v201111240924:system
[INFO] +- p2.eclipse-plugin:org.json:jar:1.0.0.v201011060100:system
[INFO] +- p2.eclipse-plugin:com.google.gson:jar:2.8.2.v20180104-1110:system
[INFO] +- at.jku.mevss:at.jku.mevss.statechart.core:eclipse-plugin:0.1.0-SNAPSHOT:provided
[INFO] +- p2.eclipse-plugin:com.github.oxo42.stateless4j:jar:2.5.0:system
[INFO] +- p2.eclipse-plugin:org.slf4j.api:jar:1.7.10.v20170428-1633:system
[INFO] +- p2.eclipse-plugin:javax.xml:jar:1.3.4.v201005080400:system
[INFO] +- p2.eclipse-plugin:com.google.guava.failureaccess:jar:1.0.1:system
[INFO] +- p2.eclipse-plugin:javax.xml.stream:jar:1.0.1.v201004272200:system
[INFO] +- p2.eclipse-plugin:org.xmlpull:jar:1.1.3.4_v201201052148:system
...

从 p2 存储库获取的所有依赖项都不显示来源,因此在导致版本冲突时很难调试。 有没有办法生成一棵树,同时显示 p2 存储库中依赖项的层次结构?

java maven dependencies tycho p2
1个回答
0
投票

你可以使用第谷的

tycho-p2-plugin:dependency-tree
魔力吗?请参阅https://tycho.eclipseprojects.io/doc/4.0.9/tycho-p2-plugin/dependency-tree-mojo.html

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