eclipse - 无法解析 MavenProject 的依赖项

标签 eclipse maven build tycho

我的问题很不明确,因为我不知道从哪里开始解决问题。我希望您指出具体的“关键字”或代码点,我可以使用它们来分析问题。

我能够部署 eclipse bundle 和 eclipse feature 并将其部署到我自己的存储库

mvnrepo.company.de

当我开始部署(安装)我的 eclipse 产品时,我确实遇到了依赖项解决问题。部署产品的 pom 除了创建产品之外别无他法。 我试着跟随 http://www.vogella.com/tutorials/EclipseTycho/article.html#exercise-tycho-build-for-products

有问题的包部署在

mvnrepo.company.de/p2/eal-global-software-trunk/

我自己编译/部署了那个包。

包含 bundle 的存储库列在日志文件中。

[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-3pp/
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-3pp/
[INFO] Adding repository http://mvnrepo.company.de/p2/eal-3pp

!ENTRY org.eclipse.equinox.p2.metadata.repository 2 0 2018-04-26 14:02:16.634
!MESSAGE Error parsing metadata repository
!SUBENTRY 1 org.eclipse.equinox.p2.core 2 0 2018-04-26 14:02:16.634
!MESSAGE Error in file:/C:/Users/lm/.m2/repository/.cache/tycho/p2-repository-metadata/content-405500690.jar at line 17416, column 51: Missing required attribute in "property": value
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/common/
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/common/
[INFO] Adding repository http://mvnrepo.company.de/p2/common
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-core-trunk/
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-core-trunk/
[INFO] Adding repository http://mvnrepo.company.de/p2/eal-core-trunk
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-rts-trunk/
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-rts-trunk/
[INFO] Adding repository http://mvnrepo.company.de/p2/eal-rts-trunk
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-software-trunk/
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-software-trunk/
[INFO] Adding repository http://mvnrepo.company.de/p2/eal-software-trunk
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-global-software-trunk/
[INFO] Fetching p2.index from http://mvnrepo.company.de/p2/eal-global-software-trunk/
[INFO] Adding repository http://mvnrepo.company.de/p2/eal-global-software-trunk
[DEBUG] Added 505 locally built units to the target platform
[INFO] Resolving dependencies of MavenProject: de.eal:de.global.runtime.product:0.0.1-SNAPSHOT @ M:\Entwicklung\Runtime-New-SVN\workspace\checkout\software\my_product\global.runtime\products\software.product\pom.xml
[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from de.global.runtime.feature.feature.group 0.0.1 to de.global.runtime [0.0.1.201804260929].; No solution found because the problem is unsatisfiable.]
[INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: de.global.runtime 0.0.1.qualifier
[ERROR]   Missing requirement: de.global.runtime.feature.feature.group 0.0.1 requires 'de.global.runtime [0.0.1.201804260929]' but it could not be found
[ERROR]   Cannot satisfy dependency: de.global.runtime 0.0.1.qualifier depends on: de.global.runtime.feature.feature.group [0.0.1,0.0.2)
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: de.eal:de.global.runtime.product:0.0.1-SNAPSHOT @ M:\Entwicklung\Runtime-New-SVN\workspace\checkout\software\my_product\global.runtime\products\software.product\pom.xml: See log for details -> [Help 1]
org.apache.maven.MavenExecutionException: Cannot resolve dependencies of MavenProject: de.eal:de.global.runtime.product:0.0.1-SNAPSHOT @ M:\Entwicklung\Runtime-New-SVN\workspace\checkout\software\my_product\global.runtime\products\software.product\pom.xml
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:100)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.eclipse.tycho.artifacts.DependencyResolutionException: Cannot resolve dependencies of MavenProject: de.eal:de.global.runtime.product:0.0.1-SNAPSHOT @ M:\Entwicklung\Runtime-New-SVN\workspace\checkout\software\my_product\global.runtime\products\software.product\pom.xml
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:201)
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:115)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.doResolveDependencies (P2DependencyResolver.java:367)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.resolveDependencies (P2DependencyResolver.java:335)
    at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject (DefaultTychoResolver.java:117)
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:95)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.eclipse.tycho.p2.util.resolution.ResolverException: See log for details
    at org.eclipse.tycho.p2.util.resolution.ProjectorResolutionStrategy.resolve (ProjectorResolutionStrategy.java:88)
    at org.eclipse.tycho.p2.util.resolution.AbstractResolutionStrategy.resolve (AbstractResolutionStrategy.java:42)
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:194)
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:115)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.doResolveDependencies (P2DependencyResolver.java:367)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.resolveDependencies (P2DependencyResolver.java:335)
    at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject (DefaultTychoResolver.java:117)
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:95)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

我正在使用第谷

<tycho.version>1.1.0</tycho.version>

产品pom片段

<packaging>eclipse-repository</packaging>
    <version>0.0.1-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-repository-plugin</artifactId>
                <version>${tycho.version}</version>
                <configuration>
                    <includeAllDependencies>true</includeAllDependencies>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-director-plugin</artifactId>
                <version>${tycho.version}</version>
                <executions>
                    <execution>
                        <id>materialize-products</id>
                        <goals>
                            <goal>materialize-products</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>archive-products</id>
                        <goals>
                            <goal>archive-products</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

最佳答案

我的 *.product 中的 UID 在我的功能中被命名为一个 bundle

“de.global.runtime.product”是我的 *.product 文件的一部分

product name="XXX" uid="de.global.runtime.product" id="......

和一个插件的名字

de.eal:de.global.runtime.product:0.0.1-SNAPSHOT

将UID重命名为

uid="de.global.runtime.product.tycho"

成功了

关于eclipse - 无法解析 MavenProject 的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50045228/

相关文章:

java - Dropwizard:无法解析配置:logging.appenders

eclipse - STS-建立保存

java - 如何为 Maven 中的某些依赖项定义不同的目标文件夹

eclipse - Eclipse/STS 中的 Gradle 项目是否可以解决对同一工作区中其他 Gradle 项目的依赖关系?

java - 如何扩展 Eclipse 的比较上下文菜单?

java - 如何为 Maven 站点生成 Google 站点地图?

java - Spring 配置更改触发 TeamCity 构建?

java - 删除 Eclipse 符号

java - eclipse - 对未触及的文件强制保存操作

maven - 如何从通过 pom.xml 添加的 IntelliJ 中删除依赖项?