- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Eclipse plugin with scala-maven-pugin
Fri, 2009-11-06, 20:05
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 !
Fri, 2009-11-06, 20:27
#2
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
Fri, 2009-11-06, 20:37
#3
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 ?
Fri, 2009-11-06, 20:47
#4
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
Fri, 2009-11-06, 20:57
#5
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.
Sat, 2009-11-07, 11:57
#6
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 !
On Fri, Nov 6, 2009 at 2:05 PM, Francois Armand <fanf42@gmail.com> wrote:
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