Skip to content
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

Plugin Not Running When Java Test Fails #94

Open
DWiechert opened this issue Apr 16, 2015 · 5 comments
Open

Plugin Not Running When Java Test Fails #94

DWiechert opened this issue Apr 16, 2015 · 5 comments

Comments

@DWiechert
Copy link

I have a Java, Scala, Clojure project and am using this plugin in that project. When running mvn test, if a Java or Scala test should fail, the Clojure tests never get ran.

Is this the intended behavior? I would think that the Clojure tests should be ran at the same time as the Java and Scala ones so ALL test failures can be reported at once. Whereas now, I have to fix the Java and Scala ones before seeing if I have failures in the Clojure code (or explicitly run `mvn clojure:test-with-junit).

@Phinneas
Copy link

Could your problem be here:
<junit.version>4.12</junit.version>
<scalatest.version>3.0.0-SNAP4</scalatest.version>
You are not listing a clojure test unit.

@Phinneas
Copy link

In your POM.xml you list Junit, and Scalatest, but I do not find clojuretest.version.

@DWiechert
Copy link
Author

I can add that but I didn't see it in the doc anywhere that the clojure test dependency was necessary.

I actually think this is happening (not 100% sure) because the standard maven junit plugin is running on the test phase, it sees a Java or Scala error, and then maven errors out. This doesn't allow maven to pickup the clojure plugin on the test phase.

Is it possible to implement something along the lines of how the scala maven plugin handles this? Instead of having a test goal, they have a testCompile goal where it compiles the tests. Then it appears that the standard maven junit plugin picks up those tests and runs them at the same time as the Java ones - instead of after like the Clojure ones.

@Phinneas
Copy link

Have you followed this link: http://alexott.net/en/clojure/ClojureMaven.html
Is this what you are following?

@talios
Copy link
Owner

talios commented Jun 9, 2015

I see the problem here being that the java/scala tests are probably all being picked up by maven-surefire-plugin and being run, and are failing fast - which prevents the clojure test goal from running. I know that surefire now has an API for plugging in additional test runners, so we should be able to implement that and integrate with surefire, and then have the common reporting of errors.

See https://maven.apache.org/surefire/surefire-api/ for details if anyone wants to submit a PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants