我正在使用tycho来制作构建过程。
这个项目是一个RCP应用程序,有tycho 0.21.0和Java 1.6编译器。
这个项目使用欧罗巴插件和功能,为了解决这个问题,我使用了featuresandbundles发布者,并将这些文件放在Nexus中。
在我的项目中,我有:
aggregator_project parent_project feature_project repository_project
我发给你的是pom的项目。
当我执行命令mvn clean install时,tycho会显示以下错误:
[ERROR] Software being installed: com.soluzionasf.zeus 1.0.0
[ERROR] Missing requirement: com.soluzionasf.zeus 1.0.0 requires 'bundle com.soluzionasf.arqw10.common 1.0.0' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from com.soluzionasf.zeus 1.0.0 to bundle com.soluzionasf.arqw10.common 1.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi.ui 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common.ui 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.fieldservice.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.igeautils 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.operation.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.operation.ui.common 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; No solution found because the problem is unsatisfiable.] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from com.soluzionasf.zeus 1.0.0 to bundle com.soluzionasf.arqw10.common 1.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi.ui 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common.ui 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.fieldservice.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.igeautils 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.operation.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.operation.ui.common 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; No solution found because the problem is unsatisfiable.]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from com.soluzionasf.zeus 1.0.0 to bundle com.soluzionasf.arqw10.common 1.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.bdi.ui 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.common.ui 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.fieldservice.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.igeautils 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.operation.lib 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; Unable to satisfy dependency from com.soluzionasf.zeus.operation.ui.common 1.0.0 to bundle com.soluzionasf.arqw10.common 0.0.0.; No solution found because the problem is unsatisfiable.]
at org.eclipse.tycho.p2.util.resolution.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98)
at org.eclipse.tycho.p2.util.resolution.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)
at org.eclipse.tycho.p2.util.resolution.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63)
at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:166)
at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:103)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.doResolveDependencies(P2DependencyResolver.java:352)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.resolveDependencies(P2DependencyResolver.java:325)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:107)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
的Feature.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example</groupId>
<artifactId>zeus.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../com.example.zeus.parent</relativePath>
</parent>
<artifactId>zeus.feature</artifactId>
<packaging>eclipse-feature</packaging>
</project>
的repository.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>zeus.repository</artifactId>
<packaging>eclipse-repository</packaging>
<parent>
<groupId>com.example</groupId>
<artifactId>zeus.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../com.example.zeus.parent</relativePath>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<formats>
<win32>zip</win32>
<linux>tar.gz</linux>
<macosx>tar.gz</macosx>
</formats>
</configuration>
<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>
</project>
有人有任何想法来解决这个问题吗?
答案 0 :(得分:1)
我发现了错误原因:
访问项目com.soluzionasf.arqw10.common并打开pom.xml文件,我发现它是这样的:
<groupId> com.soluzionasf.arqw10.common </ groupId>
<artifactId> com.soluzionasf.arqw10.common </ artifactId>
<version> 1.0.0-SNAPSHOT </ version>
<packaging> jar </ packaging>
正确的是:
<groupId> com.soluzionasf.arqw10.common </ groupId>
<artifactId> com.soluzionasf.arqw10.common </ artifactId>
<version> 1.0.0-SNAPSHOT </ version>
<packaging> eclipse-plugin </ packaging>