当前位置: 首页 > 知识库问答 >
问题:

Java 11的Evosuite插件问题

马坚
2023-03-14

在从Java8升级到Java11时,我遇到了Evosuite maven插件(版本1.0.6)的问题。运行maven build时,evosuite测试类失败,在我的sample_estest.java文件上出现错误java.lang.ClassNotFoundException由:java.lang.IllegalArgumentException引起。

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>
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) 
public class Sample_ESTest {
...
}
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

共有1个答案

杜禄
2023-03-14

我不认为1.0.6与Java11兼容,而是1.1.0。不幸的是,在给出这个答案的时候,用于1.1.0的maven插件目前还不可用,所以下一个最好的方法是使用1.1.0的.jar文件:https://github.com/evosuite/evosuite/releases/tag/v1.1.0

 类似资料:
  • 支持哪些版本的Java? 但是,生成失败,出现以下消息:

  • 主要内容:Java11 文件API 的示例Java 11 通过提供新的重载方法而无需编写大量样板代码,引入了一种读取和写入文件的简单方法。 Java11 文件API 的示例 ApiTester.java 输出结果为  

  • 问题内容: 我尝试运行时收到此错误 问题答案: 请参阅Maven手册的部署部分。 您需要定义一个在元素的(不是你的,这是很糟糕),或在你的元素。

  • 我在尝试使用提供的Eclipse插件创建新的AEM项目时遇到了一些问题。我离线安装了插件和原型,因为代理阻止了安装站点。我无法在“创建”对话框中继续,它在eclipse中抛出“未处理事件循环异常”异常,堆栈跟踪如下: JAVAlang.RuntimeException:无法处理原型:null 原因:java。lang.NullPointerException位于 com.adobe.granite

  • 我是新来的Maven和Jasmine,并开始我尝试按照使用示例上的github页面,这是第一个命令开始: mvn原型:生成-Darch etypeRepository=http://searls-maven-repository.googlecode.com/svn/trunk/snapshots-Darch etypeGroupId=com.github.searls-Darch etypear