Java 8 から Java 11 にアップグレードするときに、Evosuite Maven プラグイン (バージョン 1.0.6) の問題に直面しています。Maven ビルドの実行中java.lang.ClassNotFoundException Caused by: java.lang.IllegalArgumentException
に、Sample_ESTest.java
ファイルのエラーで evsuite テスト クラスが失敗しました。
pom.xml
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<dependency>
<groupId>org.evosuite</groupId>
<artifactId>evosuite-standalone-runtime</artifactId>
<version>1.0.6</version>
<scope>test</scope>
</dependency>
<plugin>
<groupId>org.evosuite.plugins</groupId>
<artifactId>evosuite-maven-plugin</artifactId>
<version>1.0.6</version>
</plugin>
Sample_ESTest.java
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class Sample_ESTest {
...
}
問題の詳細を取得するために、evsuite ヘルプ コマンド ( mvn evosuite:help
) を実行しようとしたところ、次のエラーが表示されました。
Failed to execute goal org.evosuite.plugins:evosuite-maven-plugin:1.0.6:help (default-cli) on project java11-upgrade: Execution default-cli of goal org.evosuite.plugins:evosuite-maven-plugin:1.0.6:help failed: Plugin org.evosuite.plugins:evosuite-maven-plugin:1.0.6 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.0.0 at specified path C:\My_Space\Tools\JDK\jdk-11.0.8/../lib/tools.jar
エラーはアーティファクトcom.sun:tools:jar:1.0.0を見つけられなかったと言いますが、私の理解によれば、tools.jarはJava11で削除されています。この問題を解決するために私を助けてください。
前もって感謝します!