Reputation: 6525
I am facing issue with Jenkins build using maven release build. The reason is for test case is failing. I am trying to skip the test cases but, its failing.
Screen shot of my Jenkins setting:-
Log :-
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.
Is there anything I am missing, please suggest. Any advice would be helpful. Please help me on this.
Upvotes: 2
Views: 7366
Reputation: 410
This worked for me.
--batch-mode -DskipTests -Darguments=-DskipTests release:prepare
Upvotes: 0
Reputation: 3495
The command line you are (were ?) looking for is :
release:prepare release:perform "-Darguments=-DskipTests=true" (compile tests, non execution)
or
release:prepare release:perform "-Darguments=-Dmaven.test.skip=true" (do not even compile tests)
This plugin forks Maven (at least to run the tests), so you have to use
"-Darguments=-DskipTests=true -Dproperty1=value -Dproperty2=anothervalue"
to pass arguments to the forked process.
Upvotes: 4