Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven发布构建跳过测试用例失败-Jenkins_Maven_Jenkins_Maven Release Plugin - Fatal编程技术网

Maven发布构建跳过测试用例失败-Jenkins

Maven发布构建跳过测试用例失败-Jenkins,maven,jenkins,maven-release-plugin,Maven,Jenkins,Maven Release Plugin,我面临使用maven发布版本的Jenkins构建的问题。原因是测试用例失败。我试图跳过测试用例,但失败了 我的詹金斯设置的屏幕截图:- 日志:- ationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource testReadNotCancelled(uk.com.xxx.yyy.sdp.bizservice

我面临使用maven发布版本的Jenkins构建的问题。原因是测试用例失败。我试图跳过测试用例,但失败了

我的詹金斯设置的屏幕截图:-

日志:-

    ationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testReadNotCancelled(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testReadNotCancelledNullReturn(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testSaveUserPasswordReset(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testSaveUserPasswordChange(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource

    Tests run: 232, Failures: 1, Errors: 135, Skipped: 3

    [ERROR] There are test failures.
有什么我遗漏的,请建议。 任何建议都会有帮助。请在这方面帮助我。

参数为。您没有提供值…

您正在(曾经?)查找的命令行是:

release:prepare release:perform "-Darguments=-DskipTests=true" (compile tests, non execution)

这个插件派生了Maven(至少是为了运行测试),所以您必须使用

"-Darguments=-DskipTests=true -Dproperty1=value -Dproperty2=anothervalue" 
将参数传递给分叉进程。

这对我很有效

--batch-mode  -DskipTests -Darguments=-DskipTests  release:prepare

感谢斯拉夫,我已经用-Darguments='-DskipTests=true'尝试了这个选项。但它不起作用。。。。你在哪里想出了
-Darguments
??把我的答案中的一行,整体和原样,放在你的两个“目标和选项”字段中。它仍然不起作用@Slav。我使用了这个common-Dresume=false发布:prepare-release:perform-DskipTests=true您不需要提供值,“-DskipTests”相当于“-DskipTests=true”。“-Darguments”是必要的,因为它是一个分叉过程。看到这个答案:非常重要,但微妙的细节,伙计们,
“-Darguments=
是必要的,thx Olivier!
--batch-mode  -DskipTests -Darguments=-DskipTests  release:prepare