2014-11-05 2 views
1

현재 Maven을 통해 Eclipse RCP에서 SWTBot 테스트를 실행하려고합니다. Maven/Tycho를 사용하여 명령 줄에서 SWTBot 테스트를 실행할 때 "Missing requirement : org.eclipse.swtbot.eclipse.core"

내 pom.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> 
<groupId>my.package</groupId> 
<artifactId>my.package.swtbot</artifactId> 
<version>1.0.0</version> 
<packaging>eclipse-test-plugin</packaging> 
<parent> 
    <groupId>my.package</groupId> 
    <artifactId>my.package.parent</artifactId> 
    <version>0.0.1</version> 
    <relativePath>../my.package.parent/pom.xml</relativePath> 
</parent> 

그러나 나는 이러한 오류를 얻을 : 사람이 있습니까, 정말 이러한 종속성을 충족하는 방법을 모른다

[ERROR] Cannot resolve project dependencies: 
[ERROR] Software being installed: my.package.swtbot 1.0.0 
[ERROR] Missing requirement: my.package.swtbot 1.0.0 requires 'bundle org.eclipse.swtbot.eclipse.core 0.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 my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.core 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.finder 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.gef.finder 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.junit4_x 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.forms.finder 0.0.0.; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.v_OTDT_r220_201306071800 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.1.v_OTDT_r221_201309101918 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.2.v_OTDT_r222_201402180730 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.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 my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.core 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.finder 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.gef.finder 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.junit4_x 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.forms.finder 0.0.0.; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.v_OTDT_r220_201306071800 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.1.v_OTDT_r221_201309101918 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.2.v_OTDT_r222_201402180730 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; No solution found because the problem is unsatisfiable.] 
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:166) 
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) 
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) 
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) 
    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:483) 
    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: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.core 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.finder 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.eclipse.gef.finder 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.junit4_x 0.0.0.; Unable to satisfy dependency from my.package.swtbot 1.0.0 to bundle org.eclipse.swtbot.forms.finder 0.0.0.; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.v_OTDT_r220_201306071800 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.1.v_OTDT_r221_201309101918 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.9.2.v_OTDT_r222_201402180730 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; No solution found because the problem is unsatisfiable.] 
    at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98) 
    at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88) 
    at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63) 
    at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:157) 
    at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:107) 
    at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolveDependencies(P2TargetPlatformResolver.java:348) 
    at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:321) 
    at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109) 
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75) 
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:310) 
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) 
    ... 11 more 

을 단서? :)

답변

1

target platform for the Tycho build에 SWTBot p2 저장소를 추가해야합니다. 당신의 부모의 pom.xml의 <repositories> 섹션에 다음 코드를 추가하여 : 당신이 SWTBot의 다른 버전이 필요하면

<repository> 
    <id>swtbot</id> 
    <url>http://download.eclipse.org/technology/swtbot/releases/2.2.1/</url> 
    <layout>p2</layout> 
</repository> 

, 당신은 SWTBot home page의 다운로드 섹션에서 P2 저장소에 대한 링크를 찾을 수 있습니다.

관련 문제