Setting up Eclipse for scala-ide hacking

169 views
Skip to first unread message

Christopher Svanefalk

unread,
Apr 25, 2012, 2:53:35 PM4/25/12
to scala-...@googlegroups.com
Hi all,

I am rather new to large scale Scala projects in general. I would like to explore the scala-ide sources (hoping to contribute somewhere ahead), but I am having troubles getting the initial workspace setup. Cloning the git repo is unproblematic, but when I import the projects into the workspace, I get close to 2000 broken dependencies. Most of them seem related to jars that should be in the  org.scala-ide.sbt.full.library/lib directory. However, this directory is not present.

What am I missing? I know I could symlink to some of these deps locally, but is there no way to pull all dependencies directly somehow? After all the project is clearly expecting them to be present.

Sorry if I missed something obvious, still getting my bearings.

Best,

Chris

michael holzer

unread,
Apr 25, 2012, 3:47:53 PM4/25/12
to scala-...@googlegroups.com
Hi,

On 04/25/2012 08:53 PM, Christopher Svanefalk wrote:
> Hi all,
>
> I am rather new to large scale Scala projects in general. I would like
> to explore the scala-ide sources (hoping to contribute somewhere
> ahead), but I am having troubles getting the initial workspace setup.
> Cloning the git repo is unproblematic, but when I import the projects
> into the workspace, I get close to 2000 broken dependencies. Most of
> them seem related to jars that should be in
> the org.scala-ide.sbt.full.library/lib directory. However, this
> directory is not present.
>
> What am I missing? I know I could symlink to some of these deps
> locally, but is there no way to pull all dependencies directly
> somehow? After all the project is clearly expecting them to be present.

Did you follow the instructions on the ScalaIDE website? Worked quite
fine for me:
http://scala-ide.org/docs/dev/setup/setup.html

hope that helps,
michael

Mirko Stocker

unread,
Apr 25, 2012, 4:01:24 PM4/25/12
to scala-...@googlegroups.com
On Wed, Apr 25, 2012 at 21:47, michael holzer <michi_ho...@gmx.at> wrote:
> Hi,
>
> On 04/25/2012 08:53 PM, Christopher Svanefalk wrote:
>> Hi all,
>>
>> I am rather new to large scale Scala projects in general. I would like
>> to explore the scala-ide sources (hoping to contribute somewhere
>> ahead), but I am having troubles getting the initial workspace setup.
>> Cloning the git repo is unproblematic, but when I import the projects
>> into the workspace, I get close to 2000 broken dependencies. Most of
>> them seem related to jars that should be in
>> the  org.scala-ide.sbt.full.library/lib directory. However, this
>> directory is not present.

As Michael said, please follow the setup guide. The
org.scala-ide.sbt.full.library/lib directory will be populated with
the following step:

$ ./build-toolchain-2.9.x.sh

Cheers,

Mirko

--
Mirko Stocker | m...@misto.ch
Work: http://ifs.hsr.ch | http://infoq.com
Personal: http://misto.ch | http://twitter.com/m_st

Christopher Svanefalk

unread,
Apr 25, 2012, 4:13:28 PM4/25/12
to scala-...@googlegroups.com
Thanks for the help, both of you! Running the build script as indicated in the guide fails with the following output...I have tried both Java 6 and 7 with the same result. All prereqs should be accounted for (both Maven 2 and 3 installed).

/usr/lib/jvm/java
---------------------------------------------------
constituent[0]: file:/usr/share/maven/lib/ext/xml-commons-apis.jar
constituent[1]: file:/usr/share/maven/lib/sisu_sisu-inject-plexus.jar
constituent[2]: file:/usr/share/maven/lib/plexus_containers-component-annotations.jar
constituent[3]: file:/usr/share/maven/lib/sisu_sisu-inject-bean.jar
constituent[4]: file:/usr/share/maven/lib/plexus_interpolation.jar
constituent[5]: file:/usr/share/maven/lib/aether_api.jar
constituent[6]: file:/usr/share/maven/lib/atinject.jar
constituent[7]: file:/usr/share/maven/lib/maven-artifact.jar
constituent[8]: file:/usr/share/maven/lib/maven-core.jar
constituent[9]: file:/usr/share/maven/lib/maven-embedder.jar
constituent[10]: file:/usr/share/maven/lib/maven-wagon_provider-api.jar
constituent[11]: file:/usr/share/maven/lib/commons-cli.jar
constituent[12]: file:/usr/share/maven/lib/aether_connector-wagon.jar
constituent[13]: file:/usr/share/maven/lib/maven-plugin-api.jar
constituent[14]: file:/usr/share/maven/lib/plexus_utils.jar
constituent[15]: file:/usr/share/maven/lib/xbean_xbean-reflect.jar
constituent[16]: file:/usr/share/maven/lib/aether_spi.jar
constituent[17]: file:/usr/share/maven/lib/plexus_plexus-sec-dispatcher.jar
constituent[18]: file:/usr/share/maven/lib/aether_impl.jar
constituent[19]: file:/usr/share/maven/lib/xerces-j2.jar
constituent[20]: file:/usr/share/maven/lib/maven-model.jar
constituent[21]: file:/usr/share/maven/lib/maven-compat.jar
constituent[22]: file:/usr/share/maven/lib/maven-wagon_http-lightweight.jar
constituent[23]: file:/usr/share/maven/lib/maven-model-builder.jar
constituent[24]: file:/usr/share/maven/lib/nekohtml.jar
constituent[25]: file:/usr/share/maven/lib/aether_util.jar
constituent[26]: file:/usr/share/maven/lib/maven-settings-builder.jar
constituent[27]: file:/usr/share/maven/lib/maven-wagon_http-shared.jar
constituent[28]: file:/usr/share/maven/lib/plexus_plexus-cipher.jar
constituent[29]: file:/usr/share/maven/lib/guava.jar
constituent[30]: file:/usr/share/maven/lib/maven-settings.jar
constituent[31]: file:/usr/share/maven/lib/google-guice.jar
constituent[32]: file:/usr/share/maven/lib/maven-repository-metadata.jar
constituent[33]: file:/usr/share/maven/lib/maven-wagon_file.jar
constituent[34]: file:/usr/share/maven/lib/maven-aether-provider.jar
---------------------------------------------------
Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/inject/Provider : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
/usr/lib/jvm/java
---------------------------------------------------
constituent[0]: file:/usr/share/maven/lib/ext/xml-commons-apis.jar
constituent[1]: file:/usr/share/maven/lib/sisu_sisu-inject-plexus.jar
constituent[2]: file:/usr/share/maven/lib/plexus_containers-component-annotations.jar
constituent[3]: file:/usr/share/maven/lib/sisu_sisu-inject-bean.jar
constituent[4]: file:/usr/share/maven/lib/plexus_interpolation.jar
constituent[5]: file:/usr/share/maven/lib/aether_api.jar
constituent[6]: file:/usr/share/maven/lib/atinject.jar
constituent[7]: file:/usr/share/maven/lib/maven-artifact.jar
constituent[8]: file:/usr/share/maven/lib/maven-core.jar
constituent[9]: file:/usr/share/maven/lib/maven-embedder.jar
constituent[10]: file:/usr/share/maven/lib/maven-wagon_provider-api.jar
constituent[11]: file:/usr/share/maven/lib/commons-cli.jar
constituent[12]: file:/usr/share/maven/lib/aether_connector-wagon.jar
constituent[13]: file:/usr/share/maven/lib/maven-plugin-api.jar
constituent[14]: file:/usr/share/maven/lib/plexus_utils.jar
constituent[15]: file:/usr/share/maven/lib/xbean_xbean-reflect.jar
constituent[16]: file:/usr/share/maven/lib/aether_spi.jar
constituent[17]: file:/usr/share/maven/lib/plexus_plexus-sec-dispatcher.jar
constituent[18]: file:/usr/share/maven/lib/aether_impl.jar
constituent[19]: file:/usr/share/maven/lib/xerces-j2.jar
constituent[20]: file:/usr/share/maven/lib/maven-model.jar
constituent[21]: file:/usr/share/maven/lib/maven-compat.jar
constituent[22]: file:/usr/share/maven/lib/maven-wagon_http-lightweight.jar
constituent[23]: file:/usr/share/maven/lib/maven-model-builder.jar
constituent[24]: file:/usr/share/maven/lib/nekohtml.jar
constituent[25]: file:/usr/share/maven/lib/aether_util.jar
constituent[26]: file:/usr/share/maven/lib/maven-settings-builder.jar
constituent[27]: file:/usr/share/maven/lib/maven-wagon_http-shared.jar
constituent[28]: file:/usr/share/maven/lib/plexus_plexus-cipher.jar
constituent[29]: file:/usr/share/maven/lib/guava.jar
constituent[30]: file:/usr/share/maven/lib/maven-settings.jar
constituent[31]: file:/usr/share/maven/lib/google-guice.jar
constituent[32]: file:/usr/share/maven/lib/maven-repository-metadata.jar
constituent[33]: file:/usr/share/maven/lib/maven-wagon_file.jar
constituent[34]: file:/usr/share/maven/lib/maven-aether-provider.jar
---------------------------------------------------
Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/inject/Provider : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
/usr/lib/jvm/java
---------------------------------------------------
constituent[0]: file:/usr/share/maven/lib/ext/xml-commons-apis.jar
constituent[1]: file:/usr/share/maven/lib/sisu_sisu-inject-plexus.jar
constituent[2]: file:/usr/share/maven/lib/plexus_containers-component-annotations.jar
constituent[3]: file:/usr/share/maven/lib/sisu_sisu-inject-bean.jar
constituent[4]: file:/usr/share/maven/lib/plexus_interpolation.jar
constituent[5]: file:/usr/share/maven/lib/aether_api.jar
constituent[6]: file:/usr/share/maven/lib/atinject.jar
constituent[7]: file:/usr/share/maven/lib/maven-artifact.jar
constituent[8]: file:/usr/share/maven/lib/maven-core.jar
constituent[9]: file:/usr/share/maven/lib/maven-embedder.jar
constituent[10]: file:/usr/share/maven/lib/maven-wagon_provider-api.jar
constituent[11]: file:/usr/share/maven/lib/commons-cli.jar
constituent[12]: file:/usr/share/maven/lib/aether_connector-wagon.jar
constituent[13]: file:/usr/share/maven/lib/maven-plugin-api.jar
constituent[14]: file:/usr/share/maven/lib/plexus_utils.jar
constituent[15]: file:/usr/share/maven/lib/xbean_xbean-reflect.jar
constituent[16]: file:/usr/share/maven/lib/aether_spi.jar
constituent[17]: file:/usr/share/maven/lib/plexus_plexus-sec-dispatcher.jar
constituent[18]: file:/usr/share/maven/lib/aether_impl.jar
constituent[19]: file:/usr/share/maven/lib/xerces-j2.jar
constituent[20]: file:/usr/share/maven/lib/maven-model.jar
constituent[21]: file:/usr/share/maven/lib/maven-compat.jar
constituent[22]: file:/usr/share/maven/lib/maven-wagon_http-lightweight.jar
constituent[23]: file:/usr/share/maven/lib/maven-model-builder.jar
constituent[24]: file:/usr/share/maven/lib/nekohtml.jar
constituent[25]: file:/usr/share/maven/lib/aether_util.jar
constituent[26]: file:/usr/share/maven/lib/maven-settings-builder.jar
constituent[27]: file:/usr/share/maven/lib/maven-wagon_http-shared.jar
constituent[28]: file:/usr/share/maven/lib/plexus_plexus-cipher.jar
constituent[29]: file:/usr/share/maven/lib/guava.jar
constituent[30]: file:/usr/share/maven/lib/maven-settings.jar
constituent[31]: file:/usr/share/maven/lib/google-guice.jar
constituent[32]: file:/usr/share/maven/lib/maven-repository-metadata.jar
constituent[33]: file:/usr/share/maven/lib/maven-wagon_file.jar
constituent[34]: file:/usr/share/maven/lib/maven-aether-provider.jar
---------------------------------------------------
Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/inject/Provider : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
at org.apache.maven.cli.MavenCli.container(MavenCli.java:375)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:191)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
--
Best,

Christopher Svanefalk

Mirko Stocker

unread,
Apr 25, 2012, 4:21:12 PM4/25/12
to scala-...@googlegroups.com
On Wed, Apr 25, 2012 at 22:13, Christopher Svanefalk
<christophe...@gmail.com> wrote:
> java.lang.UnsupportedClassVersionError: javax/inject/Provider

Interesting, I have no idea.. you definitely need to use Maven 3 and
Java 6, that's the combination that works. Maybe deleting your
.m2/repository could help?

Christopher Svanefalk

unread,
Apr 25, 2012, 5:04:39 PM4/25/12
to scala-...@googlegroups.com
No luck :-/

It seems this exception is linked to JRE incompatibility, however, since I am on OpenJDK 1.6 that should not be an issue.

http://support.embarcadero.com/article/35846
--
Best,

Christopher Svanefalk

Christopher Svanefalk

unread,
Apr 25, 2012, 5:11:31 PM4/25/12
to scala-...@googlegroups.com
Looking at the stack, it just might be an issue of JDK1.7 anyway (see the Maven calls). Further, I tried purging JDK1.7 from the system only to find a huge stack of packages depending on it, including most Maven packages, so I am guessing it runs a little deeper.
--
Best,

Christopher Svanefalk

Rafał Krzewski

unread,
May 11, 2012, 4:50:30 AM5/11/12
to scala-...@googlegroups.com
Exception says that you are trying to load a class javax.inject.Provider compiled for JDK 7 (class version 51.0) into a lower level VM.

Have you tried installing Sun JDK 7 from a binary tarball, bypassing Linux package mechanism and using it instead?

cheers,
Rafał


W dniu środa, 25 kwietnia 2012 23:11:31 UTC+2 użytkownik Christopher Svanefalk napisał:
Looking at the stack, it just might be an issue of JDK1.7 anyway (see the Maven calls). Further, I tried purging JDK1.7 from the system only to find a huge stack of packages depending on it, including most Maven packages, so I am guessing it runs a little deeper.

On Wed, Apr 25, 2012 at 11:04 PM, Christopher Svanefalk <christopher.svanefalk@...> wrote:
No luck :-/

It seems this exception is linked to JRE incompatibility, however, since I am on OpenJDK 1.6 that should not be an issue.

http://support.embarcadero.com/article/35846
On Wed, Apr 25, 2012 at 10:21 PM, Mirko Stocker <me@...> wrote:
On Wed, Apr 25, 2012 at 22:13, Christopher Svanefalk
<christopher.svanefalk@...> wrote:
> java.lang.UnsupportedClassVersionError: javax/inject/Provider

Interesting, I have no idea.. you definitely need to use Maven 3 and
Java 6, that's the combination that works. Maybe deleting your
.m2/repository could help?

--
Mirko Stocker | me@...



--
Best,

Christopher Svanefalk




--
Best,

Christopher Svanefalk

Reply all
Reply to author
Forward
0 new messages