Search code examples
eclipsemavenbuildtycho

Cannot resolve dependencies of MavenProject


My question is very unspecific, because i dont know where to start fixing the problem. I hope that you point to specific 'keywords' or code points, which i can use to analyze the problem.

I was able to deploy eclipse bundle and eclipse feature and deployed it to my own repository

mvnrepo.company.de

I do have a dependency resolving problem when i start deploying (installing) my eclipse product. The pom which deploys the product has nothing else to do than creating a product. I tried to follow http://www.vogella.com/tutorials/EclipseTycho/article.html#exercise-tycho-build-for-products

The problematic bundle is deployed at

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

I compiled/deployed that bundle by myself.

The repository which include the bundle is listed in the log file.

[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

I am using tycho

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

Snippet of product 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>

Solution

  • The UID in my *.product was named like a bundle in my feature

    "de.global.runtime.product" was part of my *.product file

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

    and the name of a plugin

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

    After renaming the UID to

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

    it worked