I have two projects using ScalaTest with Maven. One project issues a warning about the -C argument but continues on and completes a successful build.
I copied the plugin settings from that project's POM file into a new project. This project issues an ERROR about the -C and the build fails. I cannot see any difference in the versions or config of ScalaTest between the two projects.
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ nfiClient ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- scalatest-maven-plugin:1.0:test (test) @ nfiClient ---
Exception in thread "ScalaTest-main" java.lang.IllegalArgumentException: ERROR: -c has been deprecated for a very long time and is no longer supported, to prepare for reusing it for a different purpose in the near future. Please change all uses of -c to -P.
at org.scalatest.tools.ArgsParser$.checkArgsForValidity(ArgsParser.scala:46)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:857)
at org.scalatest.tools.Runner$.main(Runner.scala:827)
at org.scalatest.tools.Runner.main(Runner.scala)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.139s
[INFO] Finished at: Fri Oct 02 08:23:42 EDT 2015
[INFO] Final Memory: 27M/547M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scalatest:scalatest-maven-plugin:1.0:test (test) on project nfiClient: There are test failures -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Process finished with exit code 1
Could this be caused by how/what ScalaTest classes are initialized in the code? Does it matter what Spec/Suite is used? What other information can I provide?