Scalatest Maven Plugin

55 views
Skip to first unread message

jhonig

unread,
Jun 17, 2010, 10:27:57 AM6/17/10
to scalatest-users
Hi all,

I have been struggling for quite a while now to get Scalatest running
from Maven. I have specified version 1.0-SNAPSHOT of the scalatest
plugin.

When trying to execute test I get:

java.lang.IllegalStateException: The plugin descriptor for the plugin
Plugin [org.scalatest:scalatest] was not found.
Please verify that the plugin JAR /home/joho/.m2/repository/org/
scalatest/scalatest/1.1-SNAPSHOT/scalatest-1.1-SNAPSHOT.jar is intact.

I googled for that message, but didn't find anything that helped me.
Obviously, I did check the jar, and obviously,
it doesn't contain a plugin descriptor.

I'm using maven 2.2.1.

Hoping for some advice!

Job Honig

Jon-Anders Teigen

unread,
Jun 17, 2010, 11:40:37 AM6/17/10
to scalate...@googlegroups.com

Unless Bill has published that plugin to a mavenrepository you need to check out and build it yourself.

--
You received this message because you are subscribed to the Google
Groups "scalatest-users" group.
To post to this group, send email to scalate...@googlegroups.com
To unsubscribe from this group, send email to
scalatest-use...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/scalatest-users?hl=en
ScalaTest itself, and documentation, is available here:
http://www.artima.com/scalatest

Bill Venners

unread,
Jun 17, 2010, 11:56:56 AM6/17/10
to scalate...@googlegroups.com
Hi,

Sorry we never have deployed this yet to a maven repo. I didn't
realize people had to build, oh, is the reason he has to build it
himself is because he needs it for 2.8.RC5?

Bill

--
Bill Venners
Artima, Inc.
http://www.artima.com

jhonig

unread,
Jun 17, 2010, 12:10:50 PM6/17/10
to scalatest-users
Hi All,

> Sorry we never have deployed this yet to a maven repo. I didn't
> realize people had to build, oh, is the reason he has to build it
> himself is because he needs it for 2.8.RC5?

Ah, but it *is* in the scala-tools.org Maven repository! (See
http://www.scalatest.org/download). And later versions can
be found in the snapshot repository... It downloads well, but
the jar file misses the plugin.xml file that seems to be required.
I am not a Maven expert, just a user, and I don't want to develop
a plugin. Just trying to acquire some fluency in Scala...

The plugin was developed by Jon-Anders Teigen, who posted
here.

Job Honig

Bill Venners

unread,
Jun 17, 2010, 1:56:48 PM6/17/10
to scalate...@googlegroups.com
Hi Job,

I wonder if we're talking about two different things. What's in the
repository is the ScalaTest release itself. That's what's pointed to
from scalatest.org/download. What we thought you were talking about is
the ScalaTest Maven plugin. Can you verify you're talking about the
plugin? Or are you talking about simply using ScalaTest from within
Maven by including a dependency to ScalaTest from scala-tools.org.

Thanks.

Bill

jhonig

unread,
Jun 17, 2010, 2:52:38 PM6/17/10
to scalatest-users
Hi Bill,

As I said, I'm just a Maven user and I don't know too much about
the inner workings. So I just wanted to use Scalatest from within
Maven and found out there's a scalatest living in the scala-tools
Maven repository...

Usually, when I include a dependency on something in a repos,
it will be downloaded and do what I want :-) Not this time though;
just including the repos and the dependency didn't work. And
that's where I got stuck. I know that everything works through
a plugin mechanism but don't have a clue (yet) about if and why
what to do to make everything working; and for that matter: to
put something in a Maven repository if it depends on things that
are *not* available the same way.

I've been using Maven for years but this never happened... See
the problem?

Thanks for the elaboration though, it did help me to understand
part of the issue at hand.

Best,

job h.

Bill Venners

unread,
Jun 17, 2010, 2:56:10 PM6/17/10
to scalate...@googlegroups.com
Hi Job,

OK. Sorry we misunderstood you and went off on a tangent. You just
want to use ScalaTest from within Maven. You don't need the ScalaTest
Maven Plugin, just the dependency. Lots of people are doing that
without problems. Can you let us know what version of Scala and
ScalaTest you are using, and what exact error message you get? We
should be able to clear it up.

Thanks.

Bill

jhonig

unread,
Jun 17, 2010, 3:37:11 PM6/17/10
to scalatest-users
Hi Bill,

That's what I thought. But the message complains about the plugin.
Here are some details: maven-2.2.1.

In my dependencies I have (among others):

<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest</artifactId>
<version>1.0</version> (also
tried 1.1 and snapshots)
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.7.7</version>
<scope>compile</scope>
</dependency>

Then I have:

<repositories>
<repository>
<id>scala</id>
<name>Scala Tools Repository</name>
<url>http://scala-tools.org/repo-releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repo1.maven.org</id>
<name>Default Maven2 Repository</name>
<url>http://repo1.meaven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

and the same for pluginRepositories.
This is the trace I get when running test:


[INFO] Trace
java.lang.IllegalStateException: The plugin descriptor for the plugin
Plugin [org.scalatest:scalatest] was not found. Please verify that the
plugin JAR /home/joho/.m2/repository/org/scalatest/scalatest/1.0/
scalatest-1.0.jar is intact.
at
org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:
360)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:
224)
at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:
184)
at
org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:
1642)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:
1540)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:
1503)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:
1282)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:
534)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:
387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:
348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:
180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:
60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------

Hope I've included all relevant info...

Job H.

Reply all
Reply to author
Forward
0 new messages