无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.18.1

时间:2015-08-11 08:17:15

标签: maven maven-surefire-plugin

我在pom.xml中配置了maven-surefire-plugin,如:

callback: function() {

   this.print = function(){
      console.log('p '+ this.x);
   }

   this.print()

 }

但是当我点击def function(self, x, A, B) ...... 时,会导致以下错误:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.18.1</version>
  <configuration>
    <suiteXmlFiles>
      <suiteXmlFile>testng.xml</suiteXmlFile>
    </suiteXmlFiles>
  </configuration>
</plugin>

我在网上搜索但找不到任何有用的东西。你能帮助我吗?

2 个答案:

答案 0 :(得分:0)

该行:

  

[ERROR] java.lang.UnsupportedClassVersionError:org / testng / annotations / Test:不支持的major.minor版本52.0

显示java版本的错过匹配 例如,您尝试使用早于用于编译测试类的Java版本运行测试过程。

您应该将所有步骤对齐以使用相同的Java版本。

我希望这会有所帮助。

答案 1 :(得分:0)

如果您使用过IDEA和Maven,请尝试切换“跳过测试”模式

相关问题