0

I'm trying to run some scala tests (FlatSpec style) using maven, however, when I run mvn test I get the following error.

Could not find artifact org.scalatest:maven-scalatest-plugin:jar:1.0

I'm following the instructions from https://github.com/scalatest/scalatest-maven-plugin and http://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin. I noticed that the last update to this git repository was 2 years ago. Is this plugin still the de facto standard way to run scala tests from maven?

From this site, http://ladstatt.blogspot.com/2012/06/testing-with-maven-scaladin-scalatest.html, it says to add a pluginRepository, but that doesn't help as the error still shows.

I'm using Scala v2.10.6 and Maven 3.3.3.

Jane Wayne
  • 8,205
  • 17
  • 75
  • 120

1 Answers1

1

Your link shows that plugin should be of version 1.0-SNAPSHOT. And indeed, you can see here: https://oss.sonatype.org/content/groups/public/org/scalatest/maven-scalatest-plugin/ that there is only that version. So check you plugin declaration in pom.xml. It should contain <version>1.0-SNAPSHOT</version> and not 1.0

Dzmitry Paulenka
  • 1,879
  • 12
  • 14
  • I changed the version per your advise. It is getting further than previously. However, now I get this message: `Exception in thread "ScalaTest-main" java.lang.IllegalArgumentException: ERROR: -p 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 -p to -R` this happens at `org.scalatest.tools.ArgsParser$.checkArgsForValidity(ArgsParser.scala:51)` any ideas? – Jane Wayne Jan 21 '16 at 15:14
  • nvm, I downgraded from `org.scalatest:scalatest_2.10:3.0.0-M15` to `org.scalatest:scalatest_2.10:2.0.M6-SNAP8` and everything works now. I'm going to try to increment that version slowly and see what happens. – Jane Wayne Jan 21 '16 at 15:55