次のようにproject/Build.scala を編集する。
object ApplicationBuild extends Build {
// ...
val appDependencies = Seq(
"commons-daemon" % "commons-daemon" % "1.0.10"
)
// ...
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>net.manish</groupId> | |
| <artifactId>scala-simple</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| <name>${project.artifactId}</name> | |
| <description>My wonderfull scala app</description> | |
| <inceptionYear>2010</inceptionYear> | |
| <licenses> | |
| <license> |
| services: | |
| foo.logger: | |
| class: Monolog\Logger | |
| arguments: | |
| - foo_log | |
| calls: | |
| - [ pushHandler, [ @foo.logger.handler ] ] | |
| foo.logger.handler: | |
| class: Monolog\Handler\StreamHandler |
| #!/usr/bin/env escript | |
| % -*- mode: erlang -*- | |
| main([BeamFile]) -> | |
| {ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]), | |
| io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]). |
$ play ideascala: Output path ???-api/project/target/scala_2.9.2 is shared between: Module '???-domain-build' production, Module '???-infrastructure-build' production, Module '???-api-build' production, Module '???-domain-build' tests, Module '???-infrastructure-build' tests, Module '???-api-build' tests
Currently external Scala compiler prohibits output path sharing.
Either disable the external build mode or configure separate output paths.
Rails4だとscript/runnerがないので、今のところ(2013/5時点)wheneverのrunnerジョブが使えない。
そこで次のような感じで独自のjob_typeを定義すればok。
job_type :rails4_runner, "cd :path && bin/rails runner -e :environment :task.execute :output"
every 1.day, at: '01:00' do
rails4_runner 'Tasks::HogeTask'
end