In case you're having problems using the Scala IDE for Eclipse with Maven projects, here's what I do:
The plugins I have look like this:

...and it all works very well. The Maven plugin is the m2 one.
Troubleshooting: If that doesn't work first time for you: Project -> Clean... is your friend. If you're still having problems, a Refresh and Close Project followed by an Open project is good. In the worst case, close the project, exit Eclipse, remove the .metadata folder (at your own risk), and restart.
You might also want to check out the Scala IDE for Eclipse wiki pages for how others use Maven.
And for the record, I'm using a Mac (64bit, 10.5.7), with Maven 2.2.0 configured in Eclipse preferences to be an External installation (not the Embedded, but I don't know if that makes a difference or not), JDK 1.5, using Eclipse classic 3.4.2.
- Generate the Eclipse project files from the shell:
mvn eclipse:eclipse. If you already have Eclipse .project files, you'll have to remove them first ormvn eclipse:clean. - In Eclipse, do a File -> Import... and select "General -> Existing Projects into Workspace", navigate to my maven project and select it.
- This gives you a Scala project, but you'll need to enable Maven: right click on the root of the project in the Package Explorer in Eclipse, select Maven menu and enable.
The plugins I have look like this:

...and it all works very well. The Maven plugin is the m2 one.
Troubleshooting: If that doesn't work first time for you: Project -> Clean... is your friend. If you're still having problems, a Refresh and Close Project followed by an Open project is good. In the worst case, close the project, exit Eclipse, remove the .metadata folder (at your own risk), and restart.
You might also want to check out the Scala IDE for Eclipse wiki pages for how others use Maven.
And for the record, I'm using a Mac (64bit, 10.5.7), with Maven 2.2.0 configured in Eclipse preferences to be an External installation (not the Embedded, but I don't know if that makes a difference or not), JDK 1.5, using Eclipse classic 3.4.2.


3 Comments:
Interesting. I didn't have great experiences combining scala IDE + m2eclipse when I tried a few months ago. I'll have to go back to it now and see what happens…
Just out of interest, did you try "Import maven project" from m2eclipse? That's the method I normally use rather than "mvn eclipse:eclipse".
This might be worth trying with Eclipse IAM Maven plug-in as well, and the 3.5 version. Are those incompatible with the Scala IDE?
@happygiraffe - the "import maven project" method was giving us problems. I'd say give this approach a try and see if it makes a difference for you.
@Mojo LA - I don't know about the IAM maven plugin, but I'm hearing that Eclipse 3.5 works just fine with Scala.
Post a Comment
<< Home