Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IAM (Eclipse Integration for Apache Maven) » scala support?
scala support? [message #16053] Fri, 09 January 2009 21:53 Go to next message
Erik Putrycz is currently offline Erik PutryczFriend
Messages: 25
Registered: July 2009
Junior Member
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 #16073 is a reply to message #16053] Fri, 09 January 2009 23:18 Go to previous messageGo to next message
Abel Mui is currently offline Abel MuiFriend
Messages: 247
Registered: July 2009
Senior Member
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 #16090 is a reply to message #16073] Fri, 09 January 2009 23:28 Go to previous messageGo to next message
Josh Suereth is currently offline Josh SuerethFriend
Messages: 6
Registered: July 2009
Junior Member
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 #17396 is a reply to message #16090] Mon, 12 January 2009 20:03 Go to previous messageGo to next message
Erik Putrycz is currently offline Erik PutryczFriend
Messages: 25
Registered: July 2009
Junior Member
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 #17402 is a reply to message #16090] Tue, 13 January 2009 23:20 Go to previous messageGo to next message
Erik Putrycz is currently offline Erik PutryczFriend
Messages: 25
Registered: July 2009
Junior Member
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 #17407 is a reply to message #17402] Wed, 21 January 2009 13:46 Go to previous message
Josh Suereth is currently offline Josh SuerethFriend
Messages: 6
Registered: July 2009
Junior Member
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 23:18 Go to previous message
Abel Mui is currently offline Abel MuiFriend
Messages: 247
Registered: July 2009
Senior Member
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 23:28 Go to previous message
Josh Suereth is currently offline Josh SuerethFriend
Messages: 6
Registered: July 2009
Junior Member
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 20:03 Go to previous message
Erik Putrycz is currently offline Erik PutryczFriend
Messages: 25
Registered: July 2009
Junior Member
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 23:20 Go to previous message
Erik Putrycz is currently offline Erik PutryczFriend
Messages: 25
Registered: July 2009
Junior Member
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 13:46 Go to previous message
Josh Suereth is currently offline Josh SuerethFriend
Messages: 6
Registered: July 2009
Junior Member
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
Previous Topic:scala support?
Next Topic:An internal error occurred during: "Enabling/Disabling 1 Maven 2 project".
Goto Forum:
  


Current Time: Fri Apr 19 12:08:29 GMT 2024

Powered by FUDForum. Page generated in 0.02483 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top