The Artima Developer Community
Sponsored Link

ScalaTest/ScalaUtils Forum
java.lang.IllegalArgumentException: ERROR: -c has been deprecated

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Gregg Sirrine

Posts: 2
Nickname: gsirrine
Registered: Apr, 2015

java.lang.IllegalArgumentException: ERROR: -c has been deprecated Posted: Oct 2, 2015 5:27 AM
Reply to this message Reply
Advertisement
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.

POM File plugins...
  <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
 
            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <parallel>true</parallel>
                    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
                    <junitxml>.</junitxml>
                    <filereports>TestSuite.txt</filereports>
                    <htmlreporters>${project.build.directory}/html/scalatest</htmlreporters>
                    <testFailureIgnore>false</testFailureIgnore>
                </configuration>
                <executions>
                    <execution>
                        <id>test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
 
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.12</version>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


Stack Trace...
[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?

Any help is appreciated.

Topic: ScalaTest not executing before all Previous Topic   Next Topic Topic: ScalaTest check parameters override

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use