views:

59

answers:

2

I have

  • Eclipse 3.5.2
  • Scala 2.8.0 final (inc latest Scala IDE for Eclipse)
  • Maven integration for Eclipse
  • Maven 2.2.1
  • .project and .classpath files generated by maven-eclipse-plugin

I'm using Scala to write Specs BDD tests for my Java code and the setup above is working very nicely so far. However, I have one puzzling problem and I would like to know whether anyone knows how to resolve it.

The Scala libraries are appearing in my project twice.

  1. in the M2 ClassPath (as a Maven Dependency)
  2. as an Eclipse System Library (in the same manner as the JRE System Libraries)

Consequently, when I Ctrl-Shft-T every Scala class appears twice.

Can this be avoided without breaking my Scala project in either the command line or the Workspace?

+3  A: 

The best place for questions like this is the Scala IDE user mailing list.

The most up to date documentation on using the Scala tooling for Eclipse with Maven via m2eclipse can be found here.

Miles Sabin
Thanks Miles, you're very helpful as ever. Unfortunately nearly all websites are better indexed than any guidance you might have previously given in the mailing list. I was sent in the wrong direction by the following two links, http://scala-tools.org/mvnsites-snapshots/maven-scala-plugin/faq.htmlhttp://lampsvn.epfl.ch/trac/scala/wiki/ScalaEclipseMaven
Caoilte
A: 

To answer my own question,

it appears (as hinted at by all above) that maven-eclipse-plugin is essentially obsolete. When I

  • deleted my old eclipse project
  • removed all eclipse files (ie .settings and .project from my project directory)
  • removed all references to maven-eclipse-plugin from my pom
  • installed the m2eclipse-scala plugin
  • re-imported the project as a maven project

all settings were detected correctly and I no longer saw the double entry of scala classes in my classpath.

Caoilte
The most accurate information and the latest developments on using the Scala IDE for Eclipse with m2eclipse can be found at http://scala-ide.assembla.com/wiki/show/scala-ide/With_M2Eclipse ... which is where you'd have been pointed if you'd followed my advice earlier ;-)
Miles Sabin
Thanks Miles, I did follow your advice and it was very useful. However because I still had the maven-eclipse-plugin generated metadata messing up my project configuration I first had to remove that.
Caoilte