GithubHelp home page GithubHelp logo

sbt-in-action-examples's Introduction

sbt in Action Example code

This project contains the example code for sbt in Action. The code takes the form of a series of sbt builds for a sophisticated website called preowned-kittens.com that handles the resale of pet kittens. The website attempts to find ideal owners by matching buyer survey questions to known statistics of happy pet owners, and behavior characteristics of the kittens.

The project is split into directories by chapter, and then optionally by section. The final build is located under a directory called final for those who wish to see/use the completed product.

While the website and analysis code itself is rather simplistic and silly, the sbt build should be self-explantory (to those who know sbt) and well documented.

If you're following along in the book, feel free to run your sbt directly against the chapter / section directory you're currently reading, and try things out.

MIT License

Copyright (c) 2012-2013 Josh Suereth, Matthew Farwell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

sbt-in-action-examples's People

Contributors

dusank avatar ericsebesta avatar evverx avatar jsuereth avatar matthewfarwell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbt-in-action-examples's Issues

CH4: Object specs2 is not a member of package org

> test
[info] Compiling 1 Scala source to D:\ws\sbt-in-action-examples\chapter4\target\scala-2.10\test-classes...
[error] D:\ws\sbt-in-action-examples\chapter4\src\test\scala\LogicSpec.scala:1: object specs2 is not a member of package org
[error] import org.specs2.mutable.Specification
[error]            ^
[error] D:\ws\sbt-in-action-examples\chapter4\src\test\scala\LogicSpec.scala:3: not found: type Specification
[error] object LogicSpec extends Specification {
[error]                          ^
[error] D:\ws\sbt-in-action-examples\chapter4\src\test\scala\LogicSpec.scala:4: value should is not a member of String
[error]   "The 'matchLikelihood' method" should {
[error]                                  ^
[error] three errors found
[error] (chapter4/test:compile) Compilation failed

CH5: JUnitListener not run by SBT on test phase, junit.html not generated

> show javaOptions
[debug] > show javaOptions
[debug] Evaluating tasks: analytics/test:javaOptions
[debug] Running task... Cancel: sbt.TaskCancellationStrategy$Null$@4db33a1e, check cycles: false
[info] List(-Dspecs2.outDir=D:\ws\sbt-in-action-examples\chapter5\analytics\target\generated\test-reports, -Djunit.output.file=D:\ws\sbt-in-action-examples\chapter5\analytics\target\generated\junit.html)
[success] Total time: 0 s, completed Oct 13, 2014 6:27:24 PM
[debug] > shell

> show testOptions
[debug] > show testOptions
[debug] Evaluating tasks: analytics/*:testOptions
[debug] Running task... Cancel: sbt.TaskCancellationStrategy$Null$@4db33a1e, check cycles: false
[info] List(Argument(Some(TestFramework(WrappedArray(org.specs2.runner.Specs2Framework, org.specs2.runner.SpecsFramework))),List(html)), Argument(Some(TestFramework(WrappedArray(org.scalacheck.ScalaCheckFramework))),List(-s, 500)), Argument(Some(TestFramework(WrappedArray(com.novocode.junit.JUnitFramework))),List (--run-listener=com.preownedkittens.sbt.JUnitListener)))

> test
[info] + Logic.matchLikelihood: OK, passed 500 tests.
[info] + Logic.matchLikelihood: OK, passed 500 tests.
[error] Test org.preownedkittens.LogicJavaTest.testKitten failed: expected:<1> but was:<0>
[error] Failed: Total 4, Failed 1, Errors 0, Passed 3
[error] Failed tests:
[error] org.preownedkittens.LogicJavaTest
[error] (analytics/test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 5 s, completed Oct 13, 2014 6:43:55 PM

CH2: Test compilation is failed

[error]  found   : Int(1)
[error]  required: String
[error]       val tabby = Kitten(1, Set("male", "tabby"))
[error]                          ^
[error] one error found
[error] (test:compile) Compilation failed
[error] Total time: 11 s, completed Oct 30, 2014 12:49:02 PM

Selenium problems

Hello i got the boot, and following your examples, i had one problem on chapter 5 , Selenium test's.

this is the error that i had:

Starting ChromeDriver 2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4) on port 3483
Only local connections are allowed.
[info] SeleniumSpec:
[info] Home page
[info] - should redirect to kitten list *** FAILED ***
[info]   "http://localhost:4444/" did not start with substring "http://localhost:4444/kittens" (SeleniumSpec.scala:22)
[info] - should show three dropdown lists of attributes in sorted order *** FAILED ***
[info]   0 was not equal to 20 (SeleniumSpec.scala:28)
[info] Run completed in 5 seconds, 995 milliseconds.
[info] Total number of tests run: 2
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 0, failed 2, canceled 0, ignored 0, pending 0
[info] *** 2 TESTS FAILED ***

I have Selenium running also and working on port 4444 with 👍
selenium-server -port 4444

What is wrong ?

Thanks

CH12: sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-link;2.2.3: not found

[info] Loading project definition from D:\ws\sbt-in-action-examples\chapter12\project
[info] Updating {file:/D:/ws/sbt-in-action-examples/chapter12/project/}chapter12-build...
[info] Resolving org.scalastyle#scalastyle-sbt-plugin;0.4.0 ...

�M[info] Resolving org.scalastyle#scalastyle_2.10;0.4.0 ...

�M[info] Resolving org.scalariform#scalariform_2.10;0.1.4 ...

�M[info] Resolving org.scala-lang#scala-library;2.10.0 ...

�M[info] Resolving com.github.scopt#scopt_2.10;3.2.0 ...

�M[info] Resolving org.scala-lang#scala-library;2.10.3 ...

�M[info] Resolving com.typesafe.play#sbt-plugin;2.2.3 ...

�M[info] Resolving com.typesafe.play#sbt-link;2.2.3 ...
[warn]  module not found: com.typesafe.play#sbt-link;2.2.3
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-link/2.2.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-link/2.2.3/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\.ivy2\local\com.typesafe.play\sbt-link\2.2.3\ivys\ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/play/sbt-link/2.2.3/sbt-link-2.2.3.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/com/typesafe/play/sbt-link/2.2.3/sbt-link-2.2.3.pom
[info] Resolving com.typesafe.play#play-exceptions;2.2.3 ...
[warn]  module not found: com.typesafe.play#play-exceptions;2.2.3
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/play-exceptions/2.2.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/play-exceptions/2.2.3/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\.ivy2\local\com.typesafe.play\play-exceptions\2.2.3\ivys\ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/play/play-exceptions/2.2.3/play-exceptions-2.2.3.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/com/typesafe/play/play-exceptions/2.2.3/play-exceptions-2.2.3.pom
[info] Resolving com.typesafe.play#routes-compiler_2.10;2.2.3 ...
[warn]  module not found: com.typesafe.play#routes-compiler_2.10;2.2.3
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/routes-compiler_2.10/2.2.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/routes-compiler_2.10/2.2.3/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\.ivy2\local\com.typesafe.play\routes-compiler_2.10\2.2.3\ivys\ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/play/routes-compiler_2.10/2.2.3/routes-compiler_2.10-2.2.3.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/com/typesafe/play/routes-compiler_2.10/2.2.3/routes-compiler_2.10-2.2.3.pom
[info] Resolving com.typesafe.play#templates-compiler_2.10;2.2.3 ...
[warn]  module not found: com.typesafe.play#templates-compiler_2.10;2.2.3
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/templates-compiler_2.10/2.2.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/templates-compiler_2.10/2.2.3/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\.ivy2\local\com.typesafe.play\templates-compiler_2.10\2.2.3\ivys\ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/play/templates-compiler_2.10/2.2.3/templates-compiler_2.10-2.2.3.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/com/typesafe/play/templates-compiler_2.10/2.2.3/templates-compiler_2.10-2.2.3.pom
[info] Resolving com.typesafe.play#console_2.10;2.2.3 ...
[warn]  module not found: com.typesafe.play#console_2.10;2.2.3
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/console_2.10/2.2.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/console_2.10/2.2.3/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\.ivy2\local\com.typesafe.play\console_2.10\2.2.3\ivys\ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/play/console_2.10/2.2.3/console_2.10-2.2.3.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/com/typesafe/play/console_2.10/2.2.3/console_2.10-2.2.3.pom
[info] Resolving com.typesafe#config;1.0.2 ...

�M[info] Resolving org.mozilla#rhino;1.7R4 ...

�M[info] Resolving com.google.javascript#closure-compiler;v20130603 ...

�M[info] Resolving com.google.guava#guava;14.0.1 ...

�M[info] Resolving org.json#json;20090211 ...

�M[info] Resolving com.github.scala-incubator.io#scala-io-file_2.10;0.4.2 ...

�M[info] Resolving com.github.scala-incubator.io#scala-io-core_2.10;0.4.2 ...

�M[info] Resolving com.jsuereth#scala-arm_2.10;1.3 ...

�M[info] Resolving org.avaje.ebeanorm#avaje-ebeanorm-agent;3.2.1 ...

�M[info] Resolving com.h2database#h2;1.3.172 ...

�M[info] Resolving org.javassist#javassist;3.18.0-GA ...

�M[info] Resolving net.contentobjects.jnotify#jnotify;0.94 ...
[warn]  module not found: net.contentobjects.jnotify#jnotify;0.94
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/net.contentobjects.jnotify/jnotify/0.94/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/net.contentobjects.jnotify/jnotify/0.94/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\.ivy2\local\net.contentobjects.jnotify\jnotify\0.94\ivys\ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/net/contentobjects/jnotify/jnotify/0.94/jnotify-0.94.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/net/contentobjects/jnotify/jnotify/0.94/jnotify-0.94.pom
[info] Resolving com.typesafe.sbteclipse#sbteclipse-plugin;2.4.0 ...

�M[info] Resolving com.typesafe.sbteclipse#sbteclipse-core;2.4.0 ...

�M[info] Resolving org.scalaz#scalaz-core_2.10;7.0.2 ...

�M[info] Resolving org.scalaz#scalaz-effect_2.10;7.0.2 ...

�M[info] Resolving org.specs2#specs2_2.10;2.1.1 ...

�M[info] Resolving org.scalaz#scalaz-concurrent_2.10;7.0.2 ...

�M[info] Resolving com.eed3si9n#sbt-assembly;0.11.2 ...

�M[info] Resolving org.apache.velocity#velocity;1.7 ...

�M[info] Resolving commons-collections#commons-collections;3.2.1 ...

�M[info] Resolving commons-lang#commons-lang;2.4 ...

�M[info] Resolving com.typesafe.sbt#sbt-git;0.6.2 ...

�M[info] Resolving org.eclipse.jgit#org.eclipse.jgit.pgm;2.2.0.201212191850-r ...

�M[info] Resolving args4j#args4j;2.0.12 ...

�M[info] Resolving org.apache.commons#commons-compress;1.3 ...

�M[info] Resolving org.eclipse.jgit#org.eclipse.jgit;2.2.0.201212191850-r ...

�M[info] Resolving com.jcraft#jsch;0.1.44-1 ...

�M[info] Resolving org.eclipse.jgit#org.eclipse.jgit.iplog;2.2.0.201212191850-r ...

�M[info] Resolving org.eclipse.jgit#org.eclipse.jgit.ui;2.2.0.201212191850-r ...

�M[info] Resolving com.typesafe.sbt#sbt-native-packager;0.7.1 ...

�M[info] Resolving org.apache.commons#commons-compress;1.4.1 ...

�M[info] Resolving org.tukaani#xz;1.0 ...

�M[info] Resolving com.github.mpeltonen#sbt-idea;1.6.0 ...

�M[info] Resolving commons-io#commons-io;2.0.1 ...

�M[info] Resolving org.scala-lang#scala-library;2.10.4 ...

�M[info] Resolving org.scala-sbt#sbt;0.13.5 ...

�M[info] Resolving org.scala-sbt#main;0.13.5 ...

�M[info] Resolving org.scala-sbt#actions;0.13.5 ...

�M[info] Resolving org.scala-sbt#classpath;0.13.5 ...

�M[info] Resolving org.scala-lang#scala-compiler;2.10.4 ...

�M[info] Resolving org.scala-lang#scala-reflect;2.10.4 ...

�M[info] Resolving org.scala-sbt#launcher-interface;0.13.5 ...

�M[info] Resolving org.scala-sbt#interface;0.13.5 ...

�M[info] Resolving org.scala-sbt#io;0.13.5 ...

�M[info] Resolving org.scala-sbt#control;0.13.5 ...

�M[info] Resolving org.scala-sbt#completion;0.13.5 ...

�M[info] Resolving org.scala-sbt#collections;0.13.5 ...

�M[info] Resolving jline#jline;2.11 ...

�M[info] Resolving org.scala-sbt#api;0.13.5 ...

�M[info] Resolving org.scala-sbt#compiler-integration;0.13.5 ...

�M[info] Resolving org.scala-sbt#incremental-compiler;0.13.5 ...

�M[info] Resolving org.scala-sbt#logging;0.13.5 ...

�M[info] Resolving org.scala-sbt#process;0.13.5 ...

�M[info] Resolving org.scala-sbt#relation;0.13.5 ...

�M[info] Resolving org.scala-sbt#compile;0.13.5 ...

�M[info] Resolving org.scala-sbt#persist;0.13.5 ...

�M[info] Resolving org.scala-tools.sbinary#sbinary_2.10;0.4.2 ...

�M[info] Resolving org.scala-sbt#classfile;0.13.5 ...

�M[info] Resolving org.scala-sbt#compiler-ivy-integration;0.13.5 ...

�M[info] Resolving org.scala-sbt#ivy;0.13.5 ...

�M[info] Resolving org.scala-sbt#cross;0.13.5 ...

�M[info] Resolving org.apache.ivy#ivy;2.3.0 ...

�M[info] Resolving com.jcraft#jsch;0.1.46 ...

�M[info] Resolving org.scala-sbt#run;0.13.5 ...

�M[info] Resolving org.scala-sbt#task-system;0.13.5 ...

�M[info] Resolving org.scala-sbt#tasks;0.13.5 ...

�M[info] Resolving org.scala-sbt#tracking;0.13.5 ...

�M[info] Resolving org.scala-sbt#cache;0.13.5 ...

�M[info] Resolving org.scala-sbt#testing;0.13.5 ...

�M[info] Resolving org.scala-sbt#test-agent;0.13.5 ...

�M[info] Resolving org.scala-sbt#test-interface;1.0 ...

�M[info] Resolving org.scala-sbt#main-settings;0.13.5 ...

�M[info] Resolving org.scala-sbt#apply-macro;0.13.5 ...

�M[info] Resolving org.scala-sbt#command;0.13.5 ...

�M[info] Resolving org.scala-sbt#logic;0.13.5 ...

�M[info] Resolving org.scala-sbt#compiler-interface;0.13.5 ...

�M[info] Resolving org.scala-sbt#precompiled-2_8_2;0.13.5 ...

�M[info] Resolving org.scala-sbt#precompiled-2_9_2;0.13.5 ...

�M[info] Resolving org.scala-sbt#precompiled-2_9_3;0.13.5 ...

�M[info] Resolving org.scala-lang#jline;2.10.4 ...

�M[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#sbt-link;2.2.3: not found
[warn]  :: com.typesafe.play#play-exceptions;2.2.3: not found
[warn]  :: com.typesafe.play#routes-compiler_2.10;2.2.3: not found
[warn]  :: com.typesafe.play#templates-compiler_2.10;2.2.3: not found
[warn]  :: com.typesafe.play#console_2.10;2.2.3: not found
[warn]  :: net.contentobjects.jnotify#jnotify;0.94: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-link;2.2.3: not found
unresolved dependency: com.typesafe.play#play-exceptions;2.2.3: not found
unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.2.3: not found
unresolved dependency: com.typesafe.play#templates-compiler_2.10;2.2.3: not found
unresolved dependency: com.typesafe.play#console_2.10;2.2.3: not found
unresolved dependency: net.contentobjects.jnotify#jnotify;0.94: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:125)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:115)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:103)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:48)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:57)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:57)
    at sbt.IvySbt.withIvy(Ivy.scala:98)
    at sbt.IvySbt.withIvy(Ivy.scala:94)
    at sbt.IvySbt$Module.withModule(Ivy.scala:115)
    at sbt.IvyActions$.update(IvyActions.scala:125)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1223)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1221)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1244)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$74.apply(Defaults.scala:1242)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1246)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1241)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1249)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1214)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1192)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#sbt-link;2.2.3: not found
[error] unresolved dependency: com.typesafe.play#play-exceptions;2.2.3: not found
[error] unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.2.3: not found
[error] unresolved dependency: com.typesafe.play#templates-compiler_2.10;2.2.3: not found
[error] unresolved dependency: com.typesafe.play#console_2.10;2.2.3: not found
[error] unresolved dependency: net.contentobjects.jnotify#jnotify;0.94: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q

Versioning problems - sbt-git plugin's versionWithGit & git.baseVersion does not work

Looks like some of the examples are a bit broken in Ch12 (also ch10).

We have git.baseVersion := "0.1"

Then in our def PreownedKittenProject we have .settings(versionWithGit:_*)

This does not work, when running sbt version we see something like 1.0-gitSha... Not 0.1-gitSha...

Also the version.properties file val content = "version=%s" format (gitHeadCommitSha.value) is just using the gitHeadCommitSha not the value from the sbt-git plugin... This gives inconsistent versions. I will agree that it makes it nicer as you dont need to reload the project on each commit to get the version.properties file updated but its a big inconsistency.

versionWithGit seems to be the way to go, so it would be nice to have this working consistently...

I think git.baseVersion := "0.1" should be a part of the settings block in the def PreownedKittenProject(name: String) block (where organization is defined)...

How to use this in the version.properties file I'm not sure... Changing to val content = "version=%s" format (version.value) will work but it wont pickup changes when committing without doing a sbt reload which is a hassle... We need some taskKey to update the version value... I'm not that far through the book so not sure where to start on this one...

CH3, CH4, CH5, CH6, CH7, CH8, CH10, CH12: Setting the root project version in multi-project build.

The subproject versions are consistently set to 1.0 but the root project version is implicitly set to 0.1-SNAPSHOT (by default) at the build level while it should be IMHO consistently set to 1.0 as well.

Ideally the root project should have version := "1.0" set and the PreownedKittenProject version should (somehow) reference the root projects setting.

This is also inconsistent with the books observation/recommendation:

"Like organization, version is typically defined at the build level, such that all projects in a multi-module build have the same version value" (4.4.1).

=Dusan

Samples for chapter2

Hi, @jsuereth and @matthewfarwell !

Thanks for book.

Maybe, code snippets with lambdas change to versions with _?
For example:

scala> prefs.attributes.map(attribute => tabby.attributes.contains(attribute))

to

scala> prefs.attributes.map(tabby.attributes contains _)

It's, for my opinion, shorter (make sense for command prompt examples) and more readable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.