Implementing a task docs fails

31 views
Skip to first unread message

Lachlan Deck

unread,
Aug 28, 2013, 10:49:25 PM8/28/13
to simple-b...@googlegroups.com
Hi there,

the following documentation doesn't appear to work:

Is there an example project someone has for sbt 0.13 that works?

i.e., defining a build.sbt with the following contents
----------------------------------------------
lazy val hello = taskKey[Unit]("Prints 'Hello World'")

hello := println("hello world!")
----------------------------------------------
build.sbt:3: error: illegal start of simple expression
lazy val hello = taskKey[Unit]("Prints 'Hello World'")
^
[error] Error parsing expression.  Ensure that there are no blank lines within a setting.
thanks
Lachlan

Paul Phillips

unread,
Aug 28, 2013, 11:56:23 PM8/28/13
to simple-b...@googlegroups.com

On Wed, Aug 28, 2013 at 7:49 PM, Lachlan Deck <lachla...@gmail.com> wrote:
Is there an example project someone has for sbt 0.13 that works?

I get "hello world!".

% cat build.sbt 
lazy val hello = taskKey[Unit]("Prints 'Hello World'")

hello := println("hello world!")

% sbt hello
[info] Set current project to root-353ad73b (in build file:/Users/paulp/scratch/2013-08-28/353AD73B/)
hello world!
[success] Total time: 0 s, completed Aug 28, 2013 8:54:50 PM

% sbt about
[info] Set current project to root-353ad73b (in build file:/Users/paulp/scratch/2013-08-28/353AD73B/)
[info] This is sbt 0.13.0
[info] The current project is {file:/Users/paulp/scratch/2013-08-28/353AD73B/}root-353ad73b 0.1-SNAPSHOT
[info] The current project is built against Scala 2.10.2
[info] 
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.2
Reply all
Reply to author
Forward
0 new messages