質問
EclipseでMavenプロジェクトを立ち上げてEvosuiteを使おうとしたのですがエラーが発生しました。
発生している問題・エラーメッセージ
Failed to execute goal org.evosuite.plugins:evosuite-maven-plugin:1.0.6:generate (default-cli) on project evosuitetest: Execution default-cli of goal org.evosuite.plugins:evosuite-maven-plugin:1.0.6:generate 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:\jdk-18.0.1.1/../lib/tools.jar -> [Help 1]
エラー内容
com.sun:tools:jar:1.0.0
を C:\jdk-18.0.1.1/../lib/tools.jar
に見つけれないよ、ということでしょうか。
com.sun ということはオラクルのつくったツールということでしょうか。
OpenJDKをつかっているのですがOracleJDKじゃないと動かないということでしょうか。
よくわかっていないですがOracleJDKは有料らしいのでOpenJDKで動くようにしたいです。
該当のソースコード
pom.xmlの内容です
公式ページの通りにやったつもりです。
xml
1<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 2 <modelVersion>4.0.0</modelVersion> 3 <groupId>com.evosuitetest</groupId> 4 <artifactId>evosuitetest</artifactId> 5 <version>0.0.1-SNAPSHOT</version> 6 7 <properties> 8 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 9 <maven.compiler.source>1.8</maven.compiler.source> 10 <maven.compiler.target>1.8</maven.compiler.target> 11 <evosuiteVersion>1.0.6</evosuiteVersion> 12 </properties> 13 <repositories> 14 <repository> 15 <id>EvoSuite</id> 16 <name>EvoSuite Repository</name> 17 <url>http://www.evosuite.org/m2</url> 18 </repository> 19 </repositories> 20 21 <pluginRepositories> 22 <pluginRepository> 23 <id>EvoSuite</id> 24 <name>EvoSuite Repository</name> 25 <url>http://www.evosuite.org/m2</url> 26 </pluginRepository> 27 </pluginRepositories> 28 <build> 29 <pluginManagement> 30 <plugins> 31 <plugin> 32 <groupId>org.evosuite.plugins</groupId> 33 <artifactId>evosuite-maven-plugin</artifactId> 34 <version>${evosuiteVersion}</version> 35 <executions> 36 <execution> 37 <goals> 38 <goal> prepare </goal> 39 </goals> 40 <phase> process-test-classes </phase> 41 </execution> 42 </executions> 43 </plugin> 44 <plugin> 45 <groupId>org.codehaus.mojo</groupId> 46 <artifactId>build-helper-maven-plugin</artifactId> 47 <version>1.8</version> 48 <executions> 49 <execution> 50 <id>add-test-source</id> 51 <phase>generate-test-sources</phase> 52 <goals> 53 <goal>add-test-source</goal> 54 </goals> 55 <configuration> 56 <sources> 57 <source>${customFolder}</source> 58 </sources> 59 </configuration> 60 </execution> 61 </executions> 62 </plugin> 63 <plugin> 64 <groupId>org.apache.maven.plugins</groupId> 65 <artifactId>maven-surefire-plugin</artifactId> 66 <version>2.17</version> 67 <configuration> 68 <properties> 69 <property> 70 <name>listener</name> 71 <value>org.evosuite.runtime.InitializingListener</value> 72 </property> 73 </properties> 74 </configuration> 75 </plugin> 76 </plugins> 77 </pluginManagement> 78 </build> 79 <dependencies> 80 <dependency> 81 <groupId>org.evosuite</groupId> 82 <artifactId>evosuite-standalone-runtime</artifactId> 83 <version>${evosuiteVersion}</version> 84 <scope>test</scope> 85 </dependency> 86 <dependency> 87 <groupId>junit</groupId> 88 <artifactId>junit</artifactId> 89 <version>4.12</version> 90 <scope>test</scope> 91 </dependency> 92 93 </dependencies> 94</project>
試したこと
xml
1<!-- https://mvnrepository.com/artifact/com.sun/tools --> 2<dependency> 3 <groupId>com.sun</groupId> 4 <artifactId>tools</artifactId> 5 <version>1.0.0</version> 6 <scope>system</scope> 7</dependency>
を入れてみましたが動きませんでした。
(build
の中のdependecies
に追記しました)
補足情報(FW/ツールのバージョンなど)
javaのバージョン:openjdk version "18.0.1.1"
mavenのバージョン:Apache Maven 3.8.6

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/07/24 07:16