Note that there are some explanatory texts on larger screens.

plurals
  1. POcan't add custom SBT action
    text
    copied!<p>I just got started with SBT. To add a custom action, I made a following task and add that .scala file to 'project' folder as <a href="http://code.google.com/p/simple-build-tool/wiki/BuildConfiguration" rel="nofollow">SBT wiki</a> guides.</p> <pre><code>//MyProject.scala import sbt._ class HelloWorldProject(info: ProjectInfo) extends DefaultProject(info) { lazy val hi = task { println("Hello World"); None } } </code></pre> <p>after adding the scala src file for configuration, layout of the project folder look like this.</p> <pre> /development/scala/SomeScalaProject/ |~lib/ |~project/ | |~boot/ | | |~scala-2.7.7/ | | | |~lib/ | | | | |-scala-compiler.jar [RO] | | | | `-scala-library.jar [RO] | | | `~org.scala-tools.sbt/ | | | `~sbt/ | | | `+0.7.4/ | | |~scala-2.8.1/ | | | `~lib/ | | | |-scala-compiler.jar [RO] | | | `-scala-library.jar [RO] | | `-sbt.boot.lock | |-build.properties | | | `-MyProject.scala //here | |+src/ </pre> <p>But even after 'reload' or 'update', running the hi task in SBT is not available at all. what am i missing?</p> <pre> D:\development\scala\SBEStudy>java -Xmx512M -jar "D:\development\.common\sbt-la nch-0.7.4.jar" update [info] Building project SomeScalaProject 1.0 against Scala 2.8.1 [info] using sbt.DefaultProject with sbt 0.7.4 and Scala 2.7.7 [info] [info] == update == [warn] No dependency configuration found, using defaults. [info] :: retrieving :: nephilim.practice#scalabyexample_2.8.1 [sync] [info] confs: [default] [info] 0 artifacts copied, 0 already retrieved (0kB/391ms) [info] == update == [success] Successful. [info] [info] Total time: 1 s, completed 2010. 12. 8 오후 7:14:39 [info] [info] Total session time: 2 s, completed 2010. 12. 8 오후 7:14:39 [success] Build completed successfully. </pre> <pre> > reload [info] Building project SomeScalaProject 1.0 against Scala 2.8.1 [info] using sbt.DefaultProject with sbt 0.7.4 and Scala 2.7.7 > hi [error] No action named 'hi' exists. [info] Execute 'help' for a list of commands or 'actions' for a list of availab e project actions and methods. </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload