0
votes

I'm trying to get started with the Lift framework using these instructions and installing the sbt-eclipse plugin is giving me problems. First, I did this on my Ubuntu 14.04 computer to install sbt:

  1. wget http://apt.typesafe.com/repo-deb-build-0002.deb
  2. sudo dpkg -i repo-deb-build-0002.deb
  3. sudo apt-get update
  4. sudo apt-get install sbt

The install worked. Then I went to /home/johnmichaelreed/.sbt/0.13 and created a file called "plugins.sbt" and copy-pasted in:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

Now before I created that file, I could run "sbt" in the terminal without errors and exit. But after adding it, I had problems with that dependency.

I downloaded Lift 2.6 TAR and in the sample app lift_basic I opened "/project/" and "build.properties" and inside that file I made it say:

sbt.version=0.13.7
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

When I ran .sbt in the lift_basic app folder or "sbt" (no dot), I got this ugly message...

user@computer:~/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic$ ls
build.sbt            project  sbt-launch-0.13.8.jar
console.devmode.log  sbt      src
lift_proto.db.mv.db  sbt.bat  target

user@computer:~/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic$ ./sbt 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
[info] Loading project definition from /home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/project
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn]  * com.typesafe.sbteclipse:sbteclipse-plugin:3.0.0 -> 4.0.0
[warn] Run 'evicted' to see detailed eviction warnings
[info] Set current project to Lift 2.6 starter template (in build file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/)
[info] Updating {file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/}lift_basic...
[info] Resolving com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0 ...
[warn]  module not found: com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0
[warn] ==== local: tried
[warn]   /home/johnmichaelreed/.ivy2/local/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.11/sbt_0.13/3.0.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[warn] ==== snapshots: tried
[warn]   https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[warn] ==== staging: tried
[warn]   https://oss.sonatype.org/content/repositories/staging/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[warn] ==== releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/3.0.0/sbteclipse-plugin-3.0.0.pom
[info] Resolving org.eclipse.jetty.orbit#javax.transaction;1.1.1.v201105210645 .[info] Resolving org.eclipse.jetty.orbit#javax.mail.glassfish;1.4.1.v20100508202[info] Resolving org.eclipse.jetty.orbit#javax.activation;1.1.0.v201105071233 ..[info] Resolving jline#jline;2.12.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.sbteclipse:sbteclipse-plugin:3.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.typesafe.sbteclipse:sbteclipse-plugin:3.0.0 (scalaVersion=2.11, sbtVersion=0.13) (/home/johnmichaelreed/.sbt/0.13/plugins.sbt#L1-2)
[warn]        +- net.liftweb:lift-2-6-starter-template_2.11:0.0.4
sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:175)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:157)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:128)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
    at sbt.IvySbt$$anon$4.call(Ivy.scala:64)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
    at sbt.IvySbt.withIvy(Ivy.scala:123)
    at sbt.IvySbt.withIvy(Ivy.scala:120)
    at sbt.IvySbt$Module.withModule(Ivy.scala:151)
    at sbt.IvyActions$.updateEither(IvyActions.scala:157)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1318)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1315)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1345)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1343)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1348)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1342)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1300)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1275)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q

user@computer:~/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic$ ./sbt 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
[info] Loading project definition from /home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/project
[info] Updating {file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/project/}lift_basic-build...
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784d[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to Lift 2.6 starter template (in build file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/)
[info] Updating {file:/home/johnmichaelreed/Documents/lift-lift_26_sbt-3c4742e/scala_211/lift_basic/}lift_basic...
[info] Resolving com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0 ...
[warn]  module not found: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0
[warn] ==== local: tried
[warn]   /home/johnmichaelreed/.ivy2/local/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.11/sbt_0.13/4.0.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== snapshots: tried
[warn]   https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== staging: tried
[warn]   https://oss.sonatype.org/content/repositories/staging/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[warn] ==== releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/com/typesafe/sbteclipse/sbteclipse-plugin_2.11_0.13/4.0.0/sbteclipse-plugin-4.0.0.pom
[info] Resolving org.eclipse.jetty.orbit#javax.transaction;1.1.1.v201105210645 .[info] Resolving org.eclipse.jetty.orbit#javax.mail.glassfish;1.4.1.v20100508202[info] Resolving org.eclipse.jetty.orbit#javax.activation;1.1.0.v201105071233 ..[info] Resolving jline#jline;2.12.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13) (/home/johnmichaelreed/.sbt/0.13/plugins.sbt#L1-2)
[warn]        +- net.liftweb:lift-2-6-starter-template_2.11:0.0.4
sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:175)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:157)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:128)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
    at sbt.IvySbt$$anon$4.call(Ivy.scala:64)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
    at sbt.IvySbt.withIvy(Ivy.scala:123)
    at sbt.IvySbt.withIvy(Ivy.scala:120)
    at sbt.IvySbt$Module.withModule(Ivy.scala:151)
    at sbt.IvyActions$.updateEither(IvyActions.scala:157)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1318)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1315)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1345)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1343)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1348)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1342)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1300)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1275)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

And then I tried again...

user@computer:~/Desktop/sbt_home$ sbt eclipse
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
error: error while loading CharSequence, class file '/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
(bad constant pool tag 18 at byte 10)
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
[error] Not a valid command: eclipse (similar: help, alias)
[error] eclipse
[error]        ^
user@computer:~/Desktop/sbt_home$

How do I make my Lift Eclipse sbt-project work?

2

2 Answers

0
votes

You have to add a resolver for this : try using

    resolvers ++= Seq(
 "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)

resolvers += Resolver.sonatypeRepo("releases")

It worked for me.!

0
votes
  1. In the console, I see that sbt is trying to pull two versions of sbt-eclipse. Please make sure you are using only version, check:

    plugins/plugin.sbt
    plugins/project/plugin.sbt
    PROJECT_DIR/plugin.sbt
    

For simplicity you can just use only one plugin.sbt (../plugins/plugin.sbt) and delete others.

com.typesafe.sbteclipse#sbteclipse-plugin;3.0.0: not found

and

com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
  1. Make sure that your sbt-eclipse version is compatible with version of scala and sbt in you machine.


    Eg: sbt-eclipse verion 4.0.0 is compatible with (scalaVersion=2.11, sbtVersion=0.13).