New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoSuchMethodError is thrown in case of not defining surefire #69

Closed
lordofthejars opened this Issue Jul 25, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@lordofthejars
Member

lordofthejars commented Jul 25, 2017

Issue Overview

java.lang.NoSuchMethodError is thrown in case of not defining surefire.

Expected Behaviour

Work with defaults

Current Behaviour

A java.lang.NoSuchMethodError is exception is thrown

Caused by: java.lang.NoSuchMethodError: org.apache.maven.surefire.providerapi.ProviderParameters.getProviderProperties()Ljava/util/Map;
	at org.arquillian.smart.testing.surefire.provider.ProviderParametersParser.getProperty(ProviderParametersParser.java:46)
	at org.arquillian.smart.testing.surefire.provider.info.JUnitCoreProviderInfo.isAnyConcurrencySelected(JUnitCoreProviderInfo.java:47)
	at org.arquillian.smart.testing.surefire.provider.info.JUnitCoreProviderInfo.isApplicable(JUnitCoreProviderInfo.java:33)
	at org.arquillian.smart.testing.surefire.provider.ProviderList.autoDetectOneProvider(ProviderList.java:37)
	at org.arquillian.smart.testing.surefire.provider.ProviderList.resolve(ProviderList.java:23)
	at org.arquillian.smart.testing.surefire.provider.SmartTestingSurefireProvider.<init>(SmartTestingSurefireProvider.java:25)
Steps To Reproduce
  1. Execute smart testing on project with a pom.xml without defining surefire such as https://github.com/lordofthejars/jaxrs-analyzer.git
  2. Exception is thrown.
@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Jul 25, 2017

Member

The problem is that default surefire plugin used in case user does not set it, uses an old version which has some compatibility issues.

Maybe the solution could be is to get registered surefire version, and if it is not supported log it and throw a controlled exception.

Member

lordofthejars commented Jul 25, 2017

The problem is that default surefire plugin used in case user does not set it, uses an old version which has some compatibility issues.

Maybe the solution could be is to get registered surefire version, and if it is not supported log it and throw a controlled exception.

@bartoszmajsak

This comment has been minimized.

Show comment
Hide comment
@bartoszmajsak

bartoszmajsak Jul 25, 2017

Member

Maybe the solution could be is to get registered surefire version, and if it is not supported log it and throw a controlled exception.

Yes, we have to ensure we are using the compatible version of Surefire. If we could avoid exceptions such as java.lang.NoSuchMethodError, and provide meaningful information not only about the issue but also with a hint for the user on how he could resolve, that would be optimal.

Member

bartoszmajsak commented Jul 25, 2017

Maybe the solution could be is to get registered surefire version, and if it is not supported log it and throw a controlled exception.

Yes, we have to ensure we are using the compatible version of Surefire. If we could avoid exceptions such as java.lang.NoSuchMethodError, and provide meaningful information not only about the issue but also with a hint for the user on how he could resolve, that would be optimal.

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Jul 25, 2017

Member
Member

lordofthejars commented Jul 25, 2017

@MatousJobanek

This comment has been minimized.

Show comment
Hide comment
@MatousJobanek

MatousJobanek Jul 26, 2017

Contributor

I was off when you created the issue yesterday, so sorry for late response. Yeah, the cause is the version of surefire/failsafe. When you update to the 2.19.1, then it should work.

Yes, we have to ensure we are using the compatible version of Surefire. If we could avoid exceptions such as java.lang.NoSuchMethodError, and provide meaningful information not only about the issue but also with a hint for the user on how he could resolve, that would be optimal.

+1 I don't know why I haven't implemented yet, but I'm 100% sure that I had it in my mind... :-)

Contributor

MatousJobanek commented Jul 26, 2017

I was off when you created the issue yesterday, so sorry for late response. Yeah, the cause is the version of surefire/failsafe. When you update to the 2.19.1, then it should work.

Yes, we have to ensure we are using the compatible version of Surefire. If we could avoid exceptions such as java.lang.NoSuchMethodError, and provide meaningful information not only about the issue but also with a hint for the user on how he could resolve, that would be optimal.

+1 I don't know why I haven't implemented yet, but I'm 100% sure that I had it in my mind... :-)

bartoszmajsak added a commit that referenced this issue Jul 27, 2017

fix(#69): Adds check for minimum requirement for plugins and support …
…for registering surefire and failsafe at same time (#72)

Closes #69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment