scalastuff / esbt Goto Github PK
View Code? Open in Web Editor NEWEclipse SBT Plugin
Eclipse SBT Plugin
Esbt could be able to download source jars for dependencies when required.
ctrl + click in editor to open class in jar file, should automatically download sources and link it to jar.
Maven integration has functionality as described.
For me this is missing to fully switch to sbt.
Thanks
As I understand sbt uses internally scala 2.8.1.
I am trying to setup project in eclipse using scala 2.9.0.1 with web project support using sbt-web-plugin (https://github.com/siasia/xsbt-web-plugin).
Esbt has an issues with downloading the correct version of plugin. It insists on using the older version of sbt 0.10.0 instead of 0.10.1 and uses the 2.8.1 scala as well
sbt -web-plugin is setup as described on the page. scalaVersion is set to 2.9.0.1
Error in eclipse console is:
unresolved dependency: com.github.siasia#xsbt-web-plugin_2.8.1;0.1.1-0.10.0: not found
Thanks in advance.
Currently it seems esbt is only activated for projects with a build.sbt file. It would be good if it worked also for projects using full configuration.
Also, currently if I make an empty build.sbt file, will esbt still get the correct dependencies from project/Build.scala?
Thanks.
Per the below, we cannot use this tool on today's Eclipse. Is that true? I haven't tried to make it work myself yet due to the remark and seeing the repo is ~2yrs old.
Thank you!
http://stackoverflow.com/questions/11345534/using-sbt-from-scala-ide
It seems to require Eclipse version <= 3.7.
//AnneTheAgile
Simple lift project based on sbt-0.10. From console everything ok. Esbt fails to discover the myprj/project/plugins/build.sbt.
This results in following error in main build.sbt file
.metadata/sbt-plugin/tmpprj/build.sbt:9: error: not found: value webSettings
seq(webSettings: _*)
^
[error] Type error in expression
Checking .metadata directory shows that plugins/build.sbt is not taken in account.
When running SBT Update Dependencies I get:
------ Processing project: ------
[info] Compiling 2 Scala sources to /home/naftoli/.sbt/plugins/project/target/scala_2.8.1/classes...
[info] Set current project to root (in build file:/home/naftoli/.sbt/plugins/)
[info] Updating...
[info] Updating...
[info] Done updating.
[info] Compiling 1 Scala source to /home/naftoli/.sbt/staging/1375c2d4ab8153e18523/target/scala-2.8.1.final/classes...
[info] Done updating.
java.lang.NoClassDefFoundError: sbt/JettyConfiguration
at com.github.siasia.WebPlugin$.(WebPlugin.scala:27)
at com.github.siasia.WebPlugin$.(WebPlugin.scala)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at sbt.ModuleUtilities$.getObject(ModuleUtilities.scala:10)
at sbt.Load$.loadPlugin(Load.scala:393)
at sbt.Load$$anonfun$loadPlugins$1.apply(Load.scala:390)
at sbt.Load$$anonfun$loadPlugins$1.apply(Load.scala:390)
at scala.collection.immutable.Stream$$anonfun$flatMap$1.apply(Stream.scala:196)
at scala.collection.immutable.Stream$$anonfun$flatMap$1.apply(Stream.scala:196)
at scala.collection.immutable.Stream.append(Stream.scala:81)
at scala.collection.immutable.Stream$$anonfun$append$1.apply(Stream.scala:81)
at scala.collection.immutable.Stream$$anonfun$append$1.apply(Stream.scala:81)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:565)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:557)
at scala.collection.immutable.Stream.filter(Stream.scala:210)
at scala.collection.immutable.Stream.filter(Stream.scala:48)
at scala.collection.TraversableLike$class.filterNot(TraversableLike.scala:250)
at scala.collection.immutable.Stream.filterNot(Stream.scala:48)
at scala.collection.immutable.Stream.partition(Stream.scala:280)
at sbt.Load$$anonfun$buildConfigurations$1.apply(Load.scala:136)
at sbt.Load$$anonfun$buildConfigurations$1.apply(Load.scala:133)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:227)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:227)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:227)
at scala.collection.immutable.List.flatMap(List.scala:45)
at sbt.Load$.buildConfigurations(Load.scala:133)
at sbt.Load$.apply(Load.scala:86)
at sbt.Load$.buildPluginDefinition(Load.scala:345)
at sbt.Load$.buildPlugins(Load.scala:335)
at sbt.Load$.plugins(Load.scala:332)
at sbt.Load$.loadUnit(Load.scala:318)
at sbt.Load$$anonfun$5.apply(Load.scala:172)
at sbt.Load$$anonfun$5.apply(Load.scala:172)
at sbt.BuildLoader.apply(BuildLoader.scala:17)
at sbt.Load$.loadAll(Load.scala:224)
at sbt.Load$.loadURI(Load.scala:181)
at sbt.Load$.load(Load.scala:177)
at sbt.Load$.load(Load.scala:175)
at sbt.Load$.apply(Load.scala:83)
at sbt.Load$.defaultLoad(Load.scala:41)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:371)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:368)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:61)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:61)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:63)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:63)
at sbt.Command$.process(Command.scala:91)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(Main.scala:72)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(Main.scala:72)
at sbt.State$$anon$1.process(State.scala:54)
at sbt.MainLoop$$anonfun$next$1.apply(Main.scala:72)
at sbt.MainLoop$$anonfun$next$1.apply(Main.scala:72)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:13)
at sbt.MainLoop$.next(Main.scala:72)
at sbt.MainLoop$.run(Main.scala:63)
at sbt.xMain.run(Main.scala:33)
at xsbt.boot.Launch$.run(Launch.scala:54)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: sbt.JettyConfiguration
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at com.github.siasia.WebPlugin$.(WebPlugin.scala:27)
at com.github.siasia.WebPlugin$.(WebPlugin.scala)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at sbt.ModuleUtilities$.getObject(ModuleUtilities.scala:10)
at sbt.Load$.loadPlugin(Load.scala:393)
at sbt.Load$$anonfun$loadPlugins$1.apply(Load.scala:390)
at sbt.Load$$anonfun$loadPlugins$1.apply(Load.scala:390)
at scala.collection.immutable.Stream$$anonfun$flatMap$1.apply(Stream.scala:196)
at scala.collection.immutable.Stream$$anonfun$flatMap$1.apply(Stream.scala:196)
at scala.collection.immutable.Stream.append(Stream.scala:81)
at scala.collection.immutable.Stream$$anonfun$append$1.apply(Stream.scala:81)
at scala.collection.immutable.Stream$$anonfun$append$1.apply(Stream.scala:81)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:565)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:557)
at scala.collection.immutable.Stream.filter(Stream.scala:210)
at scala.collection.immutable.Stream.filter(Stream.scala:48)
at scala.collection.TraversableLike$class.filterNot(TraversableLike.scala:250)
at scala.collection.immutable.Stream.filterNot(Stream.scala:48)
at scala.collection.immutable.Stream.partition(Stream.scala:280)
at sbt.Load$$anonfun$buildConfigurations$1.apply(Load.scala:136)
at sbt.Load$$anonfun$buildConfigurations$1.apply(Load.scala:133)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:227)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:227)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:227)
at scala.collection.immutable.List.flatMap(List.scala:45)
at sbt.Load$.buildConfigurations(Load.scala:133)
at sbt.Load$.apply(Load.scala:86)
at sbt.Load$.buildPluginDefinition(Load.scala:345)
at sbt.Load$.buildPlugins(Load.scala:335)
at sbt.Load$.plugins(Load.scala:332)
at sbt.Load$.loadUnit(Load.scala:318)
at sbt.Load$$anonfun$5.apply(Load.scala:172)
at sbt.Load$$anonfun$5.apply(Load.scala:172)
at sbt.BuildLoader.apply(BuildLoader.scala:17)
at sbt.Load$.loadAll(Load.scala:224)
at sbt.Load$.loadURI(Load.scala:181)
at sbt.Load$.load(Load.scala:177)
at sbt.Load$.load(Load.scala:175)
at sbt.Load$.apply(Load.scala:83)
at sbt.Load$.defaultLoad(Load.scala:41)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:371)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:368)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:61)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:61)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:63)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:63)
at sbt.Command$.process(Command.scala:91)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(Main.scala:72)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(Main.scala:72)
at sbt.State$$anon$1.process(State.scala:54)
at sbt.MainLoop$$anonfun$next$1.apply(Main.scala:72)
at sbt.MainLoop$$anonfun$next$1.apply(Main.scala:72)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:13)
at sbt.MainLoop$.next(Main.scala:72)
at sbt.MainLoop$.run(Main.scala:63)
at sbt.xMain.run(Main.scala:33)
at xsbt.boot.Launch$.run(Launch.scala:54)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.NoClassDefFoundError: sbt/JettyConfiguration
[error] Use 'last' for the full log.
----- Done (75006 ms)------
Any idea?
On windows at least update dependencies is not working as eclipse appears to lock the jar file.
We've been having to close eclipse, delete the jar from ivy cache, and then re-run update.
esbt is creating a broken eclipse classpath entry pointing to a pom file instead of pointing to the corresponding jar.
Here's my build.sbt:
organization := "plalloni"
name := "sutil"
version := "0.1"
scalaVersion := "2.9.1"
libraryDependencies ++= Seq(
"org.clapper" %% "grizzled-slf4j" % "0.6.5",
"org.scalaz" %% "scalaz-core" % "6.0.3",
"org.scalaquery" %% "scalaquery" % "0.9.5-plalloni1",
"ch.qos.logback" % "logback-classic" % "0.9.29" % "test")
esbt creates the following ".classpath" file:
<classpath>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry from="sbt" kind="lib" path="/home/plalloni/.esbt/jars/org.clapper-grizzled-slf4j_2.9.1-0.6.5.jar"/>
<classpathentry from="sbt" kind="lib" path="/home/plalloni/.esbt/jars/ch.qos.logback-logback-classic-0.9.29.jar"/>
<classpathentry from="sbt" kind="lib" path="/home/plalloni/.esbt/jars/ch.qos.logback-logback-core-0.9.29.jar"/>
<classpathentry from="sbt" kind="lib" path="/home/plalloni/.esbt/jars/org.scalaquery-scalaquery_2.9.1.pom" sourcepath="/home/plalloni/.esbt/jars/org.scalaquery-scalaquery_2.9.1-sources.jar"/>
<classpathentry from="sbt" kind="lib" path="/home/plalloni/.esbt/jars/org.scalaz-scalaz-core_2.9.1-6.0.3.jar"/>
<classpathentry from="sbt" kind="lib" path="/home/plalloni/.esbt/jars/org.slf4j-slf4j-api-1.6.2.jar"/>
<classpathentry from="sbt" kind="src" path="src/main/scala/"/>
<classpathentry from="sbt" kind="src" path="src/main/resources/"/>
<classpathentry from="sbt" kind="src" path="src/test/scala/"/>
<classpathentry from="sbt" kind="src" path="src/test/resources/"/>
</classpath>
Where the entry pointing to the pom "/home/plalloni/.esbt/jars/org.scalaquery-scalaquery_2.9.1.pom" should be pointing to the jar file instead.
On plain sbt from the command line sbt-0.10.1 compiles and packages the project just fine.
I don't know if this is relevant, but the wrongly added dependency is an sbt-0.7 locally installed (~/.ivy2) project which you can have with a plain clone of git://github.com/plalloni/scala-query.git and doing "sbt publish-local" with sbt-0.7.7.
esbt should run sbt on the parent folder, and get the classpath of the correct subproject.
Keep up the excellent work!
I get the following error:
Cannot complete the install because of a conflicting dependency.
Software being installed: esbt 0.10.3 (esbt.feature.group 0.10.3)
Software currently installed: Eclipse IDE for SOA Developers 1.3.0.20100617-0520 (epp.package.soa 1.3.0.20100617-0520)
Only one of the following can be installed at once:
Core Resource Management 3.6.0.v20100526-0737 (org.eclipse.core.resources 3.6.0.v20100526-0737)
Core Resource Management 3.6.1.R36x_v20110131-1630 (org.eclipse.core.resources 3.6.1.R36x_v20110131-1630)
Core Resource Management 3.6.0.R36x_v20100825-0600 (org.eclipse.core.resources 3.6.0.R36x_v20100825-0600)
Cannot satisfy dependency:
From: Eclipse IDE for SOA Developers 1.3.0.20100617-0520 (epp.package.soa 1.3.0.20100617-0520)
To: org.eclipse.epp.package.soa.feature.feature.group [1.3.0.20100617-0520]
Cannot satisfy dependency:
From: esbt 0.10.3 (esbt.feature.group 0.10.3)
To: org.eclipse.core.resources 3.6.1
Cannot satisfy dependency:
From: EPP SOA Feature 1.3.0.20100617-0520 (org.eclipse.epp.package.soa.feature.feature.group 1.3.0.20100617-0520)
To: org.eclipse.platform.feature.group [3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY]
Cannot satisfy dependency:
From: Eclipse Platform 3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY (org.eclipse.platform.feature.group 3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY)
To: org.eclipse.core.resources [3.6.0.v20100526-0737]
Not sure of the specifics of when it happens --- it could very well it happens every time esbt updates the project.
The result, though, is that (I think all) source folders in the project appear in duplicate entries. The strange thing is that removing one seems to remove that folder completely as a source folder (2 - 1 = 0?). That could be just the way removing source folders works though...
Adding
unmanagedClasspath in Compile += Attributed.blank(new java.io.File("doesnotexist"))
to my project doesn't work (show unmanaged-classpath returns an empty sequence).
Renaming ~/.sbt/plugins/SbtEclipsePlugin.scala to *.bak fixes it.
Anyway, it seems like esbt is dead. Is anything happening with it any more?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.