scala support? [message #16053] |
Fri, 09 January 2009 16:53  |
Eclipse User |
|
|
|
Is there any support for mixing java and scala sources in a maven
project using IAM?
Or at least, is it possible to enable the scala nature somehow?
Erik.
|
|
|
|
|
|
|
Re: scala support? [message #17407 is a reply to message #17402] |
Wed, 21 January 2009 08:46  |
Eclipse User |
|
|
|
Hey, sorry for the delay getting back. I need to start checking this
newsgroup more frequently.
My guess would be that you have the Java Builder + Scala builder enabled
for the project, *or* that you're seeing issues in the maven build itself.
If it's the maven build system, what you need to do is move the
scala:compile goal into the process-resources phase. The issue here is
that we can't guarantee scala's compiler is run before the java compiler
(as we do in eclipse). Similarly you should make sure the
scala:testCompile goal is executed in the process-test-resources phase.
We're working on a scala lifecycle that will automatically bind to
appropriate phases for mixed java-scala compilation. Hopefully when Maven
3.0 is out, the lifecycle improvement will remove the need as well.
You can look at our integration test projects to see what we support
[ http://github.com/davidB/maven-scala-plugin/tree/ee4bc8f5189 986da2f5db4961e9093bcf60ca238/src/it]
Hope that helps
-Josh
|
|
|
Re: scala support? [message #568323 is a reply to message #16053] |
Fri, 09 January 2009 18:18  |
Eclipse User |
|
|
|
There is the ESMI project which integrates Scala into Eclipse using IAM.
You can check it out on http://code.google.com/p/esmi/
Erik Putrycz wrote:
> Is there any support for mixing java and scala sources in a maven
> project using IAM?
> Or at least, is it possible to enable the scala nature somehow?
> Erik.There is the ESMI project which provides
|
|
|
Re: scala support? [message #568336 is a reply to message #16073] |
Fri, 09 January 2009 18:28  |
Eclipse User |
|
|
|
As the creator of ESMi, I'm going to recommend against using it currently.
It was developed against a rather stale version of the scala plugin.
Since then, a few plugin patches have made the following viable:
1) import/create a java project (or a maven-java project)
2) Add maven dependency management as required (from IAM)
3) Add Scala Nature (right click on project, see scala menu)
4) Remove "scala-library" from the classpath (it should show up in your
maven classpath container).
Step 4 can cause some flakes, but the above works. I'm re-implementing
the ESMi plugin to do the above steps correctly. I have a few other
maven-scala-plugin issues that have been higher priority recently.
Hope that helps!
-Josh
|
|
|
Re: scala support? [message #568352 is a reply to message #16090] |
Mon, 12 January 2009 15:03  |
Eclipse User |
|
|
|
Josh Suereth wrote:
> As the creator of ESMi, I'm going to recommend against using it currently.
>
> It was developed against a rather stale version of the scala plugin.
> Since then, a few plugin patches have made the following viable:
>
> 1) import/create a java project (or a maven-java project)
> 2) Add maven dependency management as required (from IAM)
> 3) Add Scala Nature (right click on project, see scala menu)
> 4) Remove "scala-library" from the classpath (it should show up in your
> maven classpath container).
>
>
> Step 4 can cause some flakes, but the above works. I'm re-implementing
> the ESMi plugin to do the above steps correctly. I have a few other
> maven-scala-plugin issues that have been higher priority recently.
>
>
> Hope that helps!
Thanks alot. Scala, maven and eclipse integration are much better than I
thought. Let me know if I can help, this is an important feature for me.
Erik.
|
|
|
Re: scala support? [message #568382 is a reply to message #16090] |
Tue, 13 January 2009 18:20  |
Eclipse User |
|
|
|
Josh Suereth wrote:
> As the creator of ESMi, I'm going to recommend against using it currently.
>
> It was developed against a rather stale version of the scala plugin.
> Since then, a few plugin patches have made the following viable:
>
> 1) import/create a java project (or a maven-java project)
> 2) Add maven dependency management as required (from IAM)
> 3) Add Scala Nature (right click on project, see scala menu)
> 4) Remove "scala-library" from the classpath (it should show up in your
> maven classpath container).
I got scala sources to compile, step 4 wasn't necessary, there was no
scala-library in the classpath but my java classes don't seem to see the
scala compiled stuff.
Any clues?
Erik.
|
|
|
Re: scala support? [message #568401 is a reply to message #17402] |
Wed, 21 January 2009 08:46  |
Eclipse User |
|
|
|
Hey, sorry for the delay getting back. I need to start checking this
newsgroup more frequently.
My guess would be that you have the Java Builder + Scala builder enabled
for the project, *or* that you're seeing issues in the maven build itself.
If it's the maven build system, what you need to do is move the
scala:compile goal into the process-resources phase. The issue here is
that we can't guarantee scala's compiler is run before the java compiler
(as we do in eclipse). Similarly you should make sure the
scala:testCompile goal is executed in the process-test-resources phase.
We're working on a scala lifecycle that will automatically bind to
appropriate phases for mixed java-scala compilation. Hopefully when Maven
3.0 is out, the lifecycle improvement will remove the need as well.
You can look at our integration test projects to see what we support
[ http://github.com/davidB/maven-scala-plugin/tree/ee4bc8f5189 986da2f5db4961e9093bcf60ca238/src/it]
Hope that helps
-Josh
|
|
|
Powered by
FUDForum. Page generated in 0.04879 seconds