2016-09-23 2 views
0

저는 Maven을 처음 사용하고 IntelliJ IDEA에서 jbehave, maven 및 thucydides로 첫 번째 bdd 테스트를 작성하려고합니다. Maven 패널에서 확인을 클릭하면 오류가 발생합니다.확인을 시작할 때 종속성 오류가 발생했습니다.

어떻게 해결할 수 있습니까? 미리 감사드립니다!

Apache Maven 3.3.9

오류 메시지

C:\Program Files\Java\jdk1.8.0_101\bin\java""-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition2016.2.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7537 " - Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.2.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.2.4 verify 

[INFO] Scanning for projects... 
[INFO]                   
[INFO] --------------------------------------------------------------------- 
[INFO] Building Sample Thucydides project 1.0-SNAPSHOT 
[INFO] --------------------------------------------------------------------- 
[INFO] --------------------------------------------------------------------- 
[INFO] BUILD FAILURE 
[INFO] --------------------------------------------------------------------- 
[INFO] Total time: 1.600s 
[INFO] Finished at: Fri Sep 23 10:36:29 AST 2016 
[INFO] Final Memory: 6M/16M 
[INFO] --------------------------------------------------------------------- 
[ERROR] Failed to execute goal on project bddtest: Could not resolve dependencies for project com.rostislavberezhnoy.bddtest:bddtest:jar:1.0- SNAPSHOT: Could not find artifact com.rostislavberezhnoy.bddtest:bddtest:jar:1.0-SNAPSHOT -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[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/DependencyResolutionException 

Process finished with exit code 1 

내 pom.xml 파일 :

<?xml version="1.0" encoding="UTF-8"?> 
<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>com.rostislavberezhnoy.bddtest</groupId> 
<artifactId>bddtest</artifactId> 
<version>1.0-SNAPSHOT</version> 
<packaging>jar</packaging> 

<name>Sample Thucydides project</name> 

<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <thucydides.version>0.9.268</thucydides.version> 
    <thucydides.jbehave.version>0.9.268</thucydides.jbehave.version> 
    <webdriver.driver>firefox</webdriver.driver> 
</properties> 

<dependencies> 
    <dependency> 
     <groupId>net.thucydides</groupId> 
     <artifactId>thucydides-core</artifactId> 
     <version>${thucydides.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>net.thucydides</groupId> 
     <artifactId>thucydides-junit</artifactId> 
     <version>${thucydides.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>net.thucydides</groupId> 
     <artifactId>thucydides-jbehave-plugin</artifactId> 
     <version>${thucydides.jbehave.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-simple</artifactId> 
     <version>1.6.1</version> 
    </dependency> 
    <dependency> 
     <groupId>org.easytesting</groupId> 
     <artifactId>fest-assert</artifactId> 
     <version>1.4</version> 
    </dependency> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.11</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.googlecode.lambdaj</groupId> 
     <artifactId>lambdaj</artifactId> 
     <version>2.3.3</version> 
    </dependency> 
    <dependency> 
     <groupId>com.rostislavberezhnoy.bddtest</groupId> 
     <artifactId>bddtest</artifactId> 
     <version>1.0-SNAPSHOT</version> 
    </dependency> 
</dependencies> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <version>2.11</version> 
      <configuration> 
       <skip>true</skip> 
      </configuration> 
     </plugin> 
     <plugin> 
      <artifactId>maven-failsafe-plugin</artifactId> 
      <version>2.11</version> 
      <configuration> 
       <includes> 
        <include>**/*Test.java</include> 
        <include>**/Test*.java</include> 
        <include>**/When*.java</include> 
        <include>**/*TestSuite.java</include> 
       </includes> 
      </configuration> 
      <executions> 
       <execution> 
        <goals> 
         <goal>integration-test</goal> 
         <goal>verify</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>2.3.2</version> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-javadoc-plugin</artifactId> 
      <version>2.9</version> 
     </plugin> 
     <plugin> 
      <groupId>net.thucydides.maven.plugins</groupId> 
      <artifactId>maven-thucydides-plugin</artifactId> 
      <version>${thucydides.version}</version> 
      <executions> 
       <execution> 
        <id>thucydides-reports</id> 
        <phase>post-integration-test</phase> 
        <goals> 
         <goal>aggregate</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
</build> 

<profiles> 
    <profile> 
     <id>maven2</id> 
     <activation> 
      <file> 
       <missing>${basedir}</missing> 
      </file> 
     </activation> 
     <reporting> 
      <plugins> 
       <plugin> 
        <groupId>net.thucydides.maven.plugins</groupId> 
        <artifactId>maven-thucydides-plugin</artifactId> 
        <version>${thucydides.version}</version> 
       </plugin> 
      </plugins> 
     </reporting> 
    </profile> 
    <profile> 
     <id>maven3</id> 
     <activation> 
      <file> 
       <exists>${basedir}</exists> 
      </file> 
     </activation> 
     <build> 
      <plugins> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-site-plugin</artifactId> 
        <version>3.2</version> 
        <configuration> 
         <reportPlugins> 
          <plugin> 
           <groupId>net.thucydides.maven.plugins</groupId> 
           <artifactId>maven-thucydides-plugin</artifactId> 
           <version>${thucydides.version}</version> 
          </plugin> 
         </reportPlugins> 
        </configuration> 
       </plugin> 
      </plugins> 
     </build> 
    </profile> 
</profiles> 

답변

0

귀하의 문제는 발견되지

<dependency> 
    <groupId>com.rostislavberezhnoy.bddtest</groupId> 
    <artifactId>bddtest</artifactId> 
    <version>1.0-SNAPSHOT</version> 
</dependency> 

로 다스 려한다는 것이다.

Maven 빌드가 생성하려는 이슈와 이름이 같은 것 같습니다.

즉, 당신은 귀하의 pom에서 자신을 추천합니다. 나는 그 의존성을 다시 생각하고 다시 실행하는 것을 고려할 것이다. 그것은 누군가가 그 의존성을 도입 한 실수 일 가능성이 큽니다.

+0

고마워요 !!! –

0

유물 com.rostislavberezhnoy.bddtest 찾을 수 없습니다 : bddtest : 항아리 : 1.0-SNAPSHOT -> [Help 1]

개인 mvn repo를 사용하는 경우 먼저 로컬에 설치하거나 maven repo에 배포해야합니다.

this을 참조하여 jar 파일을 설치할 수 있습니다.

+0

내 지역 디렉터리에 어떻게 설치할 수 있습니까? –

+0

@ R.Berezhnoy 당신이 이것을 참조 할 수 있습니다 https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html –

관련 문제