sbt - Why does the default run task not pick settings in custom configuration? -
I have been created from the latest sources in the form of sbt 0.13.6-SNAPSHOT
.
This is build.sbt :
lazy wall mock = config "fake") expand lazy wall mock = Input [Unit] ("Run in fake mode") Lazy Val Mock Settings = Incognito (mock) {classpaths.configSettings ++ Seq (unmanagedClasspath + = baseDirectory.value / "Fake-Resource", Fake & Lieutenant;
customcopy
configuration of customRun required
function Why? Configuration (duplicate) .settings (mask settings: _ *)
? Why not unmanagedClasspath
for configuration
duplicate
configuration
See the following session:
& Gt; Counterfeit [info] Hello processing running: File: / User / Jacek / Sandbox / Make-Config / SRC / Mock-Resource / A. Properties [Success] Total Time: 0s, full 27 July 2014 2:26:07 PM> P / Mock: Run [info] Hello processing running: File: / User / Jacek / Sandbox / Make-Config / SRC / Mock-Resource / A Properties [Success] Total Time: 0S, Full 27 July, 2014 2: 26:34 PM & gt; P / Fake: Fake [Info] Hello processing running: File: / User / Jacek / Sandbox / Make-Config / SRC / Mock-Source / A. Properties [Success] Total Time: 0s, full 27 July 2014 2: 27:01 PM
This works fine.
The following line is deleted from build.sbt
:
Run & lt; & Lt; = Defaults.runTask (full classpiece in fake, main class in fake, runner in fake)
This is the only change for build definition, no other file is touched.
& gt; Load Global Plugins from Reload [info] / users / jacek / .sbt / 0.13 / plugins [info] Fake-Configure Current Project (in Build File: / User / Jacek / Sandbox / Mock-Config /) & gt; ; P / Fake: Counterfeit [Info] Running Hello Resources: Zero [Success] Total Time: 0s, Full 27 July 2014 2:28:31 PM> P / Mock: Run [Info] Hello processing running: Zero [Success] Total Time: 0s, full 27 July, 2014 2:28:36 pm> Counterfeit [Info] Running Resources: Zero [Success] Total Time: 0s, Full 27 July 2014 2:28:39 PM
Why Default please use < / P> If you run the This is because the runs
check
command, then it should be clear that you did not define the run
function you run
From build.sbt
:
p & gt; Can remove. Fake Inspection: Run [Info] Input Function: Unit [Information] Description: [Info] Runs a main square to pass along the arguments given on the command line. [Information] provided by: [info] {file: / users / foo / sbt-so-24981062}} p / compile: run [info] defined on: [info] (sbt.Defaults) Defaults.scala: 731
run
work in Classpaths.configSettings
is not included.
Comments
Post a Comment