私はキュウバーテストをmavenとjunitで実行しようとしています。私はキュウリのキーワード@given、@などを使用すると、パッケージcucumber.api.java.enが存在しないため、エラーを表示しています。私はMavenバージョン3.3.9で試しました。そして、私のpom.xmlは下にあります。私はそれが依存不一致かそれ以外のものか分かりません。これで誰も私を助けられますか?パッケージcucumber.api.java.enは存在しませんキュウリ
のpom.xml:
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- <dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<type>maven-plugin</type>
</dependency> -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.3.9</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>3.5.1</version>
<!-- <configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration> -->
</plugin>
</plugins>
</build>
maven依存関係であなたのcucumber-java jarをチェックすると、注釈コードを含むパッケージがそこに存在するはずです。依存関係にcucumber-htmlを含めることもできますが、エラーはありません。 – Grasshopper