This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Eclipse plugin with scala-maven-pugin

6 replies
fanf
Joined: 2009-03-17,
User offline. Last seen 2 years 30 weeks ago.

Hello,

I use the Scala eclipse plugin alongs with maven-scala-plugin. Eclipse
plugin brings a classpath container with the Scala library, and I have
in the pom a dependency with Scala-lib - what means that I have to
Scala-lib in the classpath.

As it does not feel good to have two jars of the same lib in the path, I
was wondering what is the standard behaviour for that case. Remove the
Eclipse plugin's scala lib container from the path ?

Thanks !

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
Re: Eclipse plugin with scala-maven-pugin


On Fri, Nov 6, 2009 at 2:05 PM, Francois Armand <fanf42@gmail.com> wrote:
Hello,

I use the Scala eclipse plugin alongs with maven-scala-plugin. Eclipse plugin brings a classpath container with the Scala library, and I have in the pom a dependency with Scala-lib - what means that I have to Scala-lib in the classpath.

As it does not feel good to have two jars of the same lib in the path, I was wondering what is the standard behaviour for that case. Remove the Eclipse plugin's scala lib container from the path ?


In the 2.7.4 verison of the plugin, I get away with this all the time, so yes that would be the ideal.   I'm not sure about other versions, as I haven't tried.

- Josh

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Eclipse plugin with scala-maven-pugin

On Fri, Nov 6, 2009 at 7:05 PM, Francois Armand wrote:
> As it does not feel good to have two jars of the same lib in the path, I was
> wondering what is the standard behaviour for that case. Remove the Eclipse
> plugin's scala lib container from the path ?

If you do that then don't come crying to me when it breaks Eclipse ...

Cheers,

Miles

fanf
Joined: 2009-03-17,
User offline. Last seen 2 years 30 weeks ago.
Re: Eclipse plugin with scala-maven-pugin

Miles Sabin a écrit :
> If you do that then don't come crying to me when it breaks Eclipse ...

That is exactly why I ask before doing it, and was wondering what it is
the normal thing to do : let the two jars in the classpath ? If so, do I
have to put the plugin container higher than the maven container ?

ijuma
Joined: 2008-08-20,
User offline. Last seen 22 weeks 2 days ago.
Re: Eclipse plugin with scala-maven-pugin

On Fri, 2009-11-06 at 20:21 +0100, Francois Armand wrote:
> Miles Sabin a écrit :
> > If you do that then don't come crying to me when it breaks Eclipse ...
>
> That is exactly why I ask before doing it, and was wondering what it is
> the normal thing to do : let the two jars in the classpath ? If so, do I
> have to put the plugin container higher than the maven container ?

I leave them both, but I make sure the versions match. That is the most
important bit, as far as I can tell.

Best,
Ismael

phkoester
Joined: 2009-08-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Eclipse plugin with scala-maven-pugin

> As it does not feel good to have two jars of the same lib in the path, I
> was wondering what is the standard behaviour for that case. Remove the
> Eclipse plugin's scala lib container from the path ?

It's a bit odd to have one Scala lib directly in the project for the SDT
and one other in the Maven dependencies. However, if you use the latest
snapshots of both, they should be compatible.

This is my Maven-plug config and dependency:

org.scala-tools
maven-scala-plugin

UTF-8
UTF-8

-Xms64m
-Xmx1g

src/main/java

`maven-scala-plugin' deduces the Scala-lib and Scala-compiler version
from the `scala-library' dependency, which looks like this:

org.scala-lang
scala-library
${scalaVersion}

where `scalaVersion' is a property:

...
2.8.0-SNAPSHOT
...

These are the relevant repositories:

org.scala-tools.repository.releases
Scala-Tools Releases
http://scala-tools.org/repo-releases

org.scala-tools.repository.snapshots
Scala-Tools Snapshots
http://scala-tools.org/repo-snapshots

This setup works fine for me, both in Eclipse and on the command line
with Maven.

Hope this helps,

---Ph.

fanf
Joined: 2009-03-17,
User offline. Last seen 2 years 30 weeks ago.
Re: Eclipse plugin with scala-maven-pugin

Ismael Juma a écrit :
> I leave them both, but I make sure the versions match. That is the most
> important bit, as far as I can tell.

OK, so I will continue this way, to.

Thanks for answers !

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland