Local Maven repository is added to SBT but still not used - sbt
Weird problem with SBT 0.13.13:
I explicitly add local Maven repository to the build (that's where the last dependency below should come from):
resolvers in ThisBuild += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository"
lazy val lostchildDataImpl = project("lostchild-data-impl")
.settings(
//resolvers += Resolver.mavenLocal,
version := "1.0-SNAPSHOT"
, libraryDependencies ++= Seq(
lagomJavadslApi,
lagomJavadslJackson,
lagomJavadslPersistenceCassandra,
lagomJavadslTestKit,
lagomJavadslPubSub
, lagomJavadslKafkaBroker
)
, libraryDependencies += "com.huawei.aspen" % "lagom" % "1.0-SNAPSHOT"
)
I can see it's added correctly:
> show lostchild-data-impl/resolvers
[info] * Local Maven Repository: file:///home/aromanov/.m2/repository
> show lostchild-data-impl/externalResolvers
[info] * FileRepository(local,FileConfiguration(true,None),Patterns(ivyPatterns=List(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=List(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false))
[info] * URLRepository(ivy-proxy,Patterns(ivyPatterns=List(http://10.122.85.159:9081/nexus/content/groups/sbt-plugins/[organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=List(http://10.122.85.159:9081/nexus/content/groups/sbt-plugins/[organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false))
[info] * maven-proxy: http://10.122.85.159:9081/nexus/content/groups/public
[info] * Local Maven Repository: file:///home/aromanov/.m2/repository
But the repository isn't accessed. On debug level I see:
> lostchild-data-impl/update
... lots of output for other dependencies
[debug] == resolving dependencies com.huawei.cloud#lostchild-data-impl_2.11;1.0-SNAPSHOT->com.huawei.aspen#lagom;1.0-SNAPSHOT [compile->default(compile)]
[debug] dependency descriptor has been mediated: dependency: org.scala-lang#scala-compiler;2.11.8 {scala-tool=[default, optional(default)]} => dependency: org.scala-lang#scala-compiler;2.11.8 {scala-tool=[default, optional(default)]}
[debug] dependency descriptor has been mediated: MergedDescriptors(dependency: org.scala-lang#scala-library;2.11.8 {scala-tool=[default, optional(default)]},dependency: org.scala-lang#scala-library;2.11.8 {compile=[default(compile)]}) => dependency: org.scala-lang#scala-library;2.11.8 {scala-tool=[default, optional(default)], compile=[default(compile)]}
[info] Resolving com.huawei.aspen#lagom;1.0-SNAPSHOT ...
[debug] sbt-chain: Checking cache for: dependency: com.huawei.aspen#lagom;1.0-SNAPSHOT {compile=[default(compile)]}
[debug] don't use cache for com.huawei.aspen#lagom;1.0-SNAPSHOT: changing=true
[info] Resolving com.huawei.aspen#lagom;1.0-SNAPSHOT ...
[debug] sbt-chain-delegate is changing. Checking all resolvers on the chain
[debug] sbt-chain-delegate: Checking cache for: dependency: com.huawei.aspen#lagom;1.0-SNAPSHOT {compile=[default(compile)]}
[debug] don't use cache for com.huawei.aspen#lagom;1.0-SNAPSHOT: changing=true
[debug] don't use cache for com.huawei.aspen#lagom;1.0-SNAPSHOT: changing=true
[debug] tried /home/aromanov/.ivy2/local/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
[debug] local: no ivy file found for com.huawei.aspen#lagom;1.0-SNAPSHOT
[debug] don't use cache for com.huawei.aspen#lagom;1.0-SNAPSHOT: changing=true
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/com/huawei/aspen/lagom/1.0-SNAPSHOT/maven-metadata.xml
[debug] maven-metadata not available: https://repo1.maven.org/maven2/com/huawei/aspen/lagom/1.0-SNAPSHOT/maven-metadata.xml
[debug] tried https://repo1.maven.org/maven2/com/huawei/aspen/lagom/1.0-SNAPSHOT/lagom-1.0-SNAPSHOT.pom
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/com/huawei/aspen/lagom/1.0-SNAPSHOT/lagom-1.0-SNAPSHOT.pom
[debug] public: no ivy file found for com.huawei.aspen#lagom;1.0-SNAPSHOT
[debug] don't use cache for com.huawei.aspen#lagom;1.0-SNAPSHOT: changing=true
[debug] tried https://repo.typesafe.com/typesafe/ivy-releases/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
[debug] CLIENT ERROR: Not Found url=https://repo.typesafe.com/typesafe/ivy-releases/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
[debug] typesafe-ivy-releases: no ivy file found for com.huawei.aspen#lagom;1.0-SNAPSHOT
[debug] don't use cache for com.huawei.aspen#lagom;1.0-SNAPSHOT: changing=true
[debug] tried https://repo.scala-sbt.org/scalasbt/ivy-snapshots/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
[debug] CLIENT ERROR: Not Found url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
[debug] sbt-ivy-snapshots: no ivy file found for com.huawei.aspen#lagom;1.0-SNAPSHOT
[warn] module not found: com.huawei.aspen#lagom;1.0-SNAPSHOT
[warn] ==== local: tried
[warn] /home/aromanov/.ivy2/local/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/huawei/aspen/lagom/1.0-SNAPSHOT/lagom-1.0-SNAPSHOT.pom
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== sbt-ivy-snapshots: tried
[warn] https://repo.scala-sbt.org/scalasbt/ivy-snapshots/com.huawei.aspen/lagom/1.0-SNAPSHOT/ivys/ivy.xml
I've also tried moving resolvers into the project's settings or using Resolver.mavenLocal instead of specifying the path explicitly. In a similar question, adding directly to externalResolvers instead of resolvers worked for someone. Neither helps in my case.
Related
Unit test timeout when testing Firestore
I have several unit tests to test different Repositories of collections in Firestore. If I run the entire unit tests, the first two of the Firestore unit tests run fine without timeout, but the subsequent ones get timeout all the time. If I run the failing ones each on its own (i.e. using describe.only()) then it runs just fine without getting any timeout. In the firestore-debug.log, I see the following entries: ---------------------------------------------------------------------- [debug] [2019-12-25T04:29:17.643Z] Command: /usr/local/bin/node /usr/local/bin/firebase emulators:exec mocha --recursive [debug] [2019-12-25T04:29:17.643Z] CLI Version: 7.9.0 [debug] [2019-12-25T04:29:17.643Z] Platform: darwin [debug] [2019-12-25T04:29:17.643Z] Node Version: v12.13.1 [debug] [2019-12-25T04:29:17.647Z] ---------------------------------------------------------------------- [debug] [2019-12-25T04:29:17.647Z] [debug] [2019-12-25T04:29:17.658Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] [debug] [2019-12-25T04:29:17.658Z] > authorizing via signed-in user [info] i emulators: Starting emulators: functions, firestore, hosting [warn] ⚠ Your requested "node" version "8" doesn't match your global version "12" [info] ✔ functions: Emulator started at http://localhost:5001 [info] i firestore: Serving ALL traffic (including WebChannel) on http://localhost:5002 [warn] ⚠ firestore: Support for WebChannel on a separate port (5003) is DEPRECATED and will go away soon. Please use port above instead. [debug] [2019-12-25T04:29:17.994Z] Ignoring unsupported arg: projectId [debug] [2019-12-25T04:29:17.994Z] Ignoring unsupported arg: auto_download [debug] [2019-12-25T04:29:17.994Z] Starting emulator firestore with command {"binary":"java","args":["-Duser.language=en","-jar","/Users/yoda/.cache/firebase/emulators/cloud-firestore-emulator-v1.10.2.jar","--host","localhost","--port",5002,"--rules","/Users/yoda/Projects/p0rnhub/service/firestore.rules","--functions_emulator","localhost:5001","--webchannel_port",5003],"optionalArgs":["port","webchannel_port","host","rules","functions_emulator"],"joinArgs":false} [info] i firestore: Emulator logging to firestore-debug.log [debug] [2019-12-25T04:29:19.869Z] API endpoint: http:// [debug] [2019-12-25T04:29:19.869Z] localhost:5002 If you are using a library that supports the FIRESTORE_EMULATOR_HOST environment variable, run: export FIRESTORE_EMULATOR_HOST=localhost: [debug] [2019-12-25T04:29:19.869Z] 5002 Dev App Server is now running. [info] ✔ firestore: Emulator started at http://localhost:5002 [info] i firestore: For testing set FIRESTORE_EMULATOR_HOST=localhost:5002 [debug] [2019-12-25T04:29:20.035Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"] [debug] [2019-12-25T04:29:20.036Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token <request body omitted> [debug] [2019-12-25T04:29:20.185Z] <<< HTTP RESPONSE 200 [debug] [2019-12-25T04:29:20.200Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/p0rnhub/webApps/-/config [debug] [2019-12-25T04:29:21.157Z] <<< HTTP RESPONSE 200 [info] i hosting: Serving hosting files from: public [info] ✔ hosting: Local server: http://localhost:5000 [info] ✔ hosting: Emulator started at http://localhost:5000 [info] i functions: Watching "/Users/yoda/Projects/p0rnhub/service/functions" for Cloud Functions... [debug] [2019-12-25T04:29:21.435Z] [worker-~diagnostic~-8c5a2752-d4c3-408b-b55c-df1aba3f5987]: Assigning socketPath: /var/folders/h5/x3f6g38d1n5_wd1mrk8_ckm00000gn/T/fire_emu_67092.sock [debug] [2019-12-25T04:29:21.435Z] [worker-~diagnostic~-8c5a2752-d4c3-408b-b55c-df1aba3f5987]: BUSY [debug] [2019-12-25T04:29:21.804Z] [runtime-status] [67092] Functions runtime initialized. {"cwd":"/Users/yoda/Projects/p0rnhub/service/functions","node_version":"12.13.1"} [debug] [2019-12-25T04:29:21.806Z] [runtime-status] [67092] Disabled runtime features: undefined [debug] [2019-12-25T04:29:21.810Z] [runtime-status] [67092] Resolved module firebase-admin {"declared":true,"installed":true,"version":"8.8.0","resolution":"/Users/yoda/Projects/p0rnhub/service/functions/node_modules/firebase-admin/lib/index.js"} [debug] [2019-12-25T04:29:21.812Z] [runtime-status] [67092] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.3.0","resolution":"/Users/yoda/Projects/p0rnhub/service/functions/node_modules/firebase-functions/lib/index.js"} [debug] [2019-12-25T04:29:22.124Z] [runtime-status] [67092] Found google-gax at /Users/yoda/Projects/p0rnhub/service/functions/node_modules/google-gax/build/src/index.js [debug] [2019-12-25T04:29:22.124Z] [runtime-status] [67092] Outgoing network have been stubbed. [{"name":"http","status":"mocked"},{"name":"http","status":"mocked"},{"name":"https","status":"mocked"},{"name":"https","status":"mocked"},{"name":"net","status":"mocked"},{"name":"google-gax","status":"mocked"}] [debug] [2019-12-25T04:29:22.178Z] [runtime-status] [67092] Checked functions.config() {"config":{}} [debug] [2019-12-25T04:29:22.179Z] [runtime-status] [67092] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.3.0","resolution":"/Users/yoda/Projects/p0rnhub/service/functions/node_modules/firebase-functions/lib/index.js"} [debug] [2019-12-25T04:29:22.180Z] [runtime-status] [67092] Resolved module firebase-admin {"declared":true,"installed":true,"version":"8.8.0","resolution":"/Users/yoda/Projects/p0rnhub/service/functions/node_modules/firebase-admin/lib/index.js"} [debug] [2019-12-25T04:29:22.180Z] [runtime-status] [67092] Resolved module firebase-functions {"declared":true,"installed":true,"version":"3.3.0","resolution":"/Users/yoda/Projects/p0rnhub/service/functions/node_modules/firebase-functions/lib/index.js"} [debug] [2019-12-25T04:29:22.232Z] [runtime-status] [67092] firebase-admin has been stubbed. {"adminResolution":{"declared":true,"installed":true,"version":"8.8.0","resolution":"/Users/yoda/Projects/p0rnhub/service/functions/node_modules/firebase-admin/lib/index.js"}} [info] ✔ functions[auth]: http function initialized (http://localhost:5001/p0rnhub/us-central1/auth). [info] ✔ functions[token]: http function initialized (http://localhost:5001/p0rnhub/us-central1/token). [info] ✔ functions[login]: http function initialized (http://localhost:5001/p0rnhub/us-central1/login). [info] ✔ functions[start]: http function initialized (http://localhost:5001/p0rnhub/us-central1/start). [info] ✔ functions[stop]: http function initialized (http://localhost:5001/p0rnhub/us-central1/stop). [info] ✔ functions[list]: http function initialized (http://localhost:5001/p0rnhub/us-central1/list). [info] i Running script: mocha --recursive [debug] [2019-12-25T04:29:22.252Z] Running mocha --recursive with environment {"npm_config_save_dev":"","npm_config_legacy_bundling":"","npm_config_dry_run":"","npm_config_viewer":"man","npm_config_only":"","npm_config_commit_hooks":"true","npm_config_browser":"","npm_config_also":"","npm_config_sign_git_commit":"","npm_config_rollback":"true","TERM_PROGRAM":"Apple_Terminal","NODE":"/usr/local/bin/node","npm_config_usage":"","npm_config_audit":"true","INIT_CWD":"/Users/yoda/Projects/p0rnhub/service/functions","npm_package_devDependencies_sinon":"^7.5.0","npm_config_globalignorefile":"/usr/local/etc/npmignore","npm_package_devDependencies_mocha":"^6.2.2","TERM":"xterm-256color","SHELL":"/bin/zsh","npm_config_shell":"/bin/zsh","npm_config_maxsockets":"50","npm_config_init_author_url":"","npm_config_shrinkwrap":"true","npm_config_parseable":"","npm_config_metrics_registry":"https://registry.npmjs.org/","TMPDIR":"/var/folders/h5/x3f6g38d1n5_wd1mrk8_ckm00000gn/T/","npm_config_timing":"","npm_config_init_license":"ISC","npm_config_if_present":"","TERM_PROGRAM_VERSION":"433","npm_config_sign_git_tag":"","npm_config_init_author_email":"","npm_config_cache_max":"Infinity","npm_package_dependencies_uuid":"^3.3.3","npm_config_preid":"","npm_config_long":"","npm_config_local_address":"","npm_config_git_tag_version":"true","npm_config_cert":"","TERM_SESSION_ID":"AD305AB7-88B6-4E8E-9681-273EEB25429A","npm_config_registry":"https://registry.npmjs.org/","npm_config_noproxy":"","npm_config_fetch_retries":"2","npm_package_private":"true","npm_config_versions":"","npm_config_message":"%s","npm_config_key":"","npm_package_description":"Cloud Functions for Firebase","USER":"yoda","npm_package_scripts_deploy":"firebase deploy --only functions","npm_config_globalconfig":"/usr/local/etc/npmrc","npm_package_scripts_shell":"firebase functions:shell","npm_config_prefer_online":"","npm_config_logs_max":"10","npm_config_always_auth":"","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.sLVgtsWI6z/Listeners","__CF_USER_TEXT_ENCODING":"0x1F5:0x0:0x0","npm_execpath":"/usr/local/lib/node_modules/npm/bin/npm-cli.js","npm_config_global_style":"","npm_config_cache_lock_retries":"10","npm_package_dependencies_firebase_functions":"^3.3.0","npm_config_update_notifier":"true","npm_config_cafile":"","npm_config_heading":"npm","npm_config_audit_level":"low","npm_config_searchlimit":"20","npm_config_read_only":"","npm_config_offline":"","npm_config_fetch_retry_mintimeout":"10000","npm_config_json":"","npm_config_access":"","npm_config_argv":"{\"remain\":[],\"cooked\":[\"test\"],\"original\":[\"test\"]}","PATH":"/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/yoda/Projects/p0rnhub/service/functions/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin","npm_config_allow_same_version":"","npm_config_https_proxy":"","npm_config_engine_strict":"","npm_config_description":"true","_":"/usr/local/bin/firebase","LaunchInstanceID":"486CA774-9DDE-42B4-A90D-EB3553FE7181","npm_config_userconfig":"/Users/yoda/.npmrc","npm_config_init_module":"/Users/yoda/.npm-init.js","npm_config_cidr":"","PWD":"/Users/yoda/Projects/p0rnhub/service/functions","npm_config_user":"","npm_config_node_version":"12.13.1","npm_lifecycle_event":"test","npm_config_save":"true","npm_config_ignore_prepublish":"","npm_config_editor":"vi","npm_config_auth_type":"legacy","npm_package_name":"functions","npm_config_tag":"latest","npm_config_script_shell":"","npm_config_progress":"true","npm_config_global":"","npm_config_before":"","npm_package_scripts_start":"npm run shell","npm_config_searchstaleness":"900","npm_config_optional":"true","npm_config_ham_it_up":"","XPC_FLAGS":"0x0","npm_config_save_prod":"","npm_config_force":"","npm_config_bin_links":"true","npm_config_searchopts":"","npm_package_engines_node":"8","npm_config_node_gyp":"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js","npm_config_depth":"Infinity","npm_config_sso_poll_frequency":"500","npm_config_rebuild_bundle":"true","npm_package_version":"","XPC_SERVICE_NAME":"0","npm_config_unicode":"true","HOME":"/Users/yoda","SHLVL":"2","npm_config_fetch_retry_maxtimeout":"60000","npm_package_scripts_test":"firebase emulators:exec \"mocha --recursive\"","npm_config_tag_version_prefix":"v","npm_config_strict_ssl":"true","npm_config_sso_type":"oauth","npm_config_scripts_prepend_node_path":"warn-only","npm_config_save_prefix":"^","npm_config_loglevel":"notice","npm_config_ca":"","npm_package_scripts_serve":"firebase serve --only functions","npm_config_save_exact":"","npm_config_group":"20","npm_config_fetch_retry_factor":"10","npm_config_dev":"","npm_package_devDependencies_firebase_functions_test":"^0.1.7","npm_config_version":"","npm_config_prefer_offline":"","npm_config_cache_lock_stale":"60000","npm_package_devDependencies__firebase_testing":"^0.12.3","npm_config_otp":"","npm_config_cache_min":"10","npm_config_searchexclude":"","npm_config_cache":"/Users/yoda/.npm","npm_package_dependencies_base64url":"^3.0.1","npm_package_scripts_logs":"firebase functions:log","LOGNAME":"yoda","npm_lifecycle_script":"firebase emulators:exec \"mocha --recursive\"","npm_config_color":"true","npm_config_proxy":"","npm_config_package_lock":"true","npm_package_dependencies_build_url":"^1.3.3","LC_CTYPE":"UTF-8","npm_config_package_lock_only":"","npm_config_fund":"true","npm_config_save_optional":"","npm_config_ignore_scripts":"","npm_config_user_agent":"npm/6.13.4 node/v12.13.1 darwin x64","npm_config_cache_lock_wait":"10000","npm_config_production":"","npm_config_send_metrics":"","npm_config_save_bundle":"","npm_config_umask":"0022","npm_config_node_options":"","npm_config_init_version":"1.0.0","npm_config_init_author_name":"","npm_config_git":"git","npm_config_scope":"","SECURITYSESSIONID":"186a8","npm_config_unsafe_perm":"true","npm_config_tmp":"/var/folders/h5/x3f6g38d1n5_wd1mrk8_ckm00000gn/T","npm_config_onload_script":"","npm_package_dependencies_firebase_admin":"^8.8.0","npm_node_execpath":"/usr/local/bin/node","npm_config_prefix":"/usr/local","npm_config_link":"","npm_config_format_package_lock":"true","FIRESTORE_EMULATOR_HOST":"localhost:5002","FIREBASE_FIRESTORE_EMULATOR_ADDRESS":"localhost:5002"} [debug] [2019-12-25T04:29:22.263Z] [worker-~diagnostic~-8c5a2752-d4c3-408b-b55c-df1aba3f5987]: exited [debug] [2019-12-25T04:29:22.263Z] [worker-~diagnostic~-8c5a2752-d4c3-408b-b55c-df1aba3f5987]: FINISHED [debug] [2019-12-25T04:29:23.385Z] Dec 25, 2019 11:29:23 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead INFO: Detected HTTP/2 connection. [debug] [2019-12-25T04:29:24.429Z] Dec 25, 2019 11:29:24 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead INFO: Detected HTTP/2 connection. [warn] ⚠ Script exited unsuccessfully (code 4) [info] i Shutting down emulators. [info] i Stopping functions emulator [info] i Stopping firestore emulator [debug] [2019-12-25T04:29:34.479Z] *** shutting down gRPC server since JVM is shutting down [debug] [2019-12-25T04:29:34.482Z] *** server shut down [info] i Stopping hosting emulator [error] [error] Error: Script "mocha --recursive" exited with code 4 Here's how I setup each Firestore unit test: const assert = require("assert") const firebase = require("#firebase/testing") const { SampleRepository } = require("./SampleRepository") const projectId = "a-project-id" const app = firebase.initializeAdminApp({ projectId }) describe("SampleRepository", () => { var db var repository before(async () => { db = app.firestore() repository = new SampleRepository(db) }) afterEach(async () => { await firebase.clearFirestoreData({ projectId }) }) after(async () => { await db.terminate() }) describe("firstMethod", () => { it("use case 1", async () => { // Do some testing here. }) it("use case 2", async () => { // Do some testing here. }) }) describe("secondMethod", () => { it("use case 1", async () => { // Do some testing here. }) }) }) I setup the npm test command to invoke this: firebase emulators:exec \"mocha --recursive\". At this point, I am pretty clueless what causes this but I suspect it's a problem in the Firestore emulator or something? And I don't know what code 4 means in: Script exited unsuccessfully (code 4). Any help is appreciated. UPDATE 1: Now I know what the code 4 means. It means that I have 4 failing tests.
Error 405 PUT | How to publish to nexus through sbt?
I'm testing the locally deployed Nexus using a Demo Project. I've created this repo: com.example on Nexus using create Repository. The URL of the repository on local Nexus is: http://localhost:8081/repository/com.example/. The configuration in build.sbt goes like: name := "data-models" version := "0.1" scalaVersion := "2.12.7" organization := "com.example" val snapshotsName = "Repository Snapshots" val snapshotsUrl = new java.net.URL("http://localhost:8081/repository/com.example/") val snapshotsPattern = "[organisation]/[module]/[revision]-SNAPSHOT/[artifact]-[revision](-[timestamp]).[ext]" val snapshots = Resolver.url(snapshotsName, snapshotsUrl)(Patterns(snapshotsPattern)) credentials += Credentials(Path.userHome / ".ivy2" / ".credentials") publishTo := Some("Sonatype Nexus Repository Manager" at "http://localhost:8081/repository/com.example/") The Credentials conf goes like: realm=Sonatype Nexus Repository Manager host=localhost:8081 user=admin password=qwerty123#345ty Then I try to run sbt publish. I get this error: [info] Loading project definition from /home/yash/IdeaProjects/data-models/project [info] Loading settings for project data-models from build.sbt ... [info] Set current project to data-models (in build file:/home/yash/IdeaProjects/data-models/) [info] Packaging /home/yash/IdeaProjects/data-models/target/scala-2.12/data-models_2.12-0.1-sources.jar ... [info] Updating ... [info] Done packaging. [info] Done updating. [info] Wrote /home/yash/IdeaProjects/data-models/target/scala-2.12/data-models_2.12-0.1.pom [info] Packaging /home/yash/IdeaProjects/data-models/target/scala-2.12/data-models_2.12-0.1.jar ... [info] Done packaging. [error] java.io.IOException: PUT operation to URL http://localhost:8081/com/example/data-models_2.12/0.1/data-models_2.12-0.1.pom failed with status code 405: HTTP method PUT is not supported by this URL [error] at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:82) [error] at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.upload(GigahorseUrlHandler.scala:191) [error] at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82) [error] at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150) [error] at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84) [error] at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:366) [error] at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130) [error] at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:118) [error] at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:105) [error] at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:165) [error] at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216) [error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:497) [error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:496) [error] at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:788) [error] at scala.collection.Iterator.foreach(Iterator.scala:937) [error] at scala.collection.Iterator.foreach$(Iterator.scala:937) [error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1425) [error] at scala.collection.IterableLike.foreach(IterableLike.scala:70) [error] at scala.collection.IterableLike.foreach$(IterableLike.scala:69) [error] at scala.collection.AbstractIterable.foreach(Iterable.scala:54) [error] at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:787) [error] at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:496) [error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$3(IvyActions.scala:144) [error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) [error] at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:157) [error] at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:151) [error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1(IvyActions.scala:144) [error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1$adapted(IvyActions.scala:134) [error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239) [error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204) [error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70) [error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77) [error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95) [error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80) [error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99) [error] at xsbt.boot.Using$.withResource(Using.scala:10) [error] at xsbt.boot.Using$.apply(Using.scala:9) [error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60) [error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50) [error] at xsbt.boot.Locks$.apply0(Locks.scala:31) [error] at xsbt.boot.Locks$.apply(Locks.scala:28) [error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77) [error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199) [error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196) [error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238) [error] at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:134) [error] at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2411) [error] at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2411) [error] at scala.Function1.$anonfun$compose$1(Function1.scala:44) [error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40) [error] at sbt.std.Transform$$anon$4.work(System.scala:67) [error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269) [error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16) [error] at sbt.Execute.work(Execute.scala:278) [error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269) [error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178) [error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37) [error] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [error] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [error] at java.lang.Thread.run(Thread.java:748) [error] (publish) java.io.IOException: PUT operation to URL http://localhost:8081/com/example/data-models_2.12/0.1/data-models_2.12-0.1.pom failed with status code 405: HTTP method PUT is not supported by this URL I'm not able to understand what's wrong. Is it the correct way to do it? What is the correct way? Thanks in Advance. Attaching a Screenshot of the Nexus repo.
I think I found the issue, actually I think it requires a SNAPSHOT type repo and a -snapshot keyword in the binary bundle which we want to deploy. As soon as I configured it like: name := "data-models" version := "1.0.0-SNAPSHOT" scalaVersion := "2.11.7" organization := "com.example" val snapshotsName = "Repository Snapshots" val snapshotsUrl = new java.net.URL("http://localhost:8081/repository/example-snapshot/") val snapshotsPattern = "[organisation]/[module]/[revision]-SNAPSHOT/[artifact]-[revision](-[timestamp]).[ext]" val snapshots = Resolver.url(snapshotsName, snapshotsUrl)(Patterns(snapshotsPattern)) credentials += Credentials(Path.userHome / ".ivy2" / ".credentials") //credentials += Credentials("Sonatype Nexus Repository Manager", "localhost", "admin", "qwerty123#") publishTo := Some("Sonatype Nexus Repository Manager" at "http://localhost:8081/repository/example-snapshot/") It started to deploy.
Why does sbt 1.02 not suppress debug logging messages?
Install details: SBT 1.02 Scala 2.12.3 Java 8 Ubuntu Linux 16.04 on a ThinkPad & Mac OS X Sierra (10.12.6) Steps I took: Installed SBT on both Linux and Mac using instructions here: http://www.scala-sbt.org/1.x/docs/ Created the Hello World example. Tried to run the sample program, both within SBT and on the bash command line. Observed that regardless of what settings I tried, I would still see the debug messages: Here's a sample: Osiris:hello Noel$ sbt [info] Loading project definition from /Users/Noel/src/scala/sandbox/hello/project [info] Loading settings from build.sbt ... [info] Set current project to Hello (in build file:/Users/Noel/src/scala/sandbox/hello/) [info] sbt server started at 127.0.0.1:5256 sbt:Hello> logLevel [info] warn sbt:Hello> run [info] Running example.Hello hello [debug] Waiting for threads to exit or System.exit to be called. [debug] Classpath: [debug] <abbreviated>.../hello_2.12-0.1.0-SNAPSHOT.jar [debug] <abbreviated>.../scala-library.jar [debug] Waiting for thread run-main-0 to terminate. [debug] Thread run-main-0 exited. [debug] Interrupting remaining threads (should be all daemons). [debug] Sandboxed run complete.. [debug] Exited with code 0 [success] Total time: 0 s, completed Oct 15, 2017 9:44:13 PM sbt:Hello> What I tried: From the command line: sbt warn run From within SBT: warn run Modify build.sbt to contain the line: logLevel := Level.Warn Here is what build.sbt looks like: import Dependencies._ logLevel := Level.Warn lazy val root = (project in file(".")). settings( inThisBuild(List( organization := "com.example", scalaVersion := "2.12.3", version := "0.1.0-SNAPSHOT", )), name := "Hello", libraryDependencies += scalaTest % Test ) I've also searched on this forum, but this question was asked 4 years ago and those answers don't work for me. What am I missing? Thanks in advance.
This is a known bug in sbt 1.0.1 and 1.0.2. See https://github.com/sbt/sbt/issues/3655
Why does build fail with sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-pgp;0.8.2: not found?
We are suddenly getting failures on the build server (typesafe and maven repos are proxied through our internal Nexus repo) for a project that successfully built with sbt 0.13.5 (tried upgrading to 0.13.6, still not working) Any ideas? EDIT: note, works fine when run locally [warn] module not found: com.typesafe.sbt#sbt-pgp;0.8.2 [warn] ==== local: tried [warn] /home/bisonadm/.ivy2/local/com.typesafe.sbt/sbt-pgp/scala_2.10/sbt_0.13/0.8.2/ivys/ivy.xml [warn] ==== typesafe-ivy-releases: tried [warn] https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-pgp/0.8.2/ivys/ivy.xml [warn] ==== public: tried [warn] https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-pgp_2.10_0.13/0.8.2/sbt-pgp-0.8.2.pom [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: com.typesafe.sbt#sbt-pgp;0.8.2: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. [warn] com.typesafe.sbt:sbt-pgp:0.8.2 (sbtVersion=0.13, scalaVersion=2.10) [warn] [warn] Note: Unresolved dependencies path: [warn] com.typesafe.sbt:sbt-pgp:0.8.2 (sbtVersion=0.13, scalaVersion=2.10) [warn] +- org.scalastyle:scalastyle-sbt-plugin:0.5.0 (sbtVersion=0.13, scalaVersion=2.10) (/ahp_agents/ec/workspace/T_COMMON_master_full_CI_J4350527/common/project/plugins.sbt#L5-6) [warn] +- default:common-build:0.1-SNAPSHOT (sbtVersion=0.13, scalaVersion=2.10) sbt.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-pgp;0.8.2: not found at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:243) at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:158) at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:156) at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:147) at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:147) at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:124) at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56) at sbt.IvySbt$$anon$3.call(Ivy.scala:64) at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93) at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78) at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97) at xsbt.boot.Using$.withResource(Using.scala:10) at xsbt.boot.Using$.apply(Using.scala:9) at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58) at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48) at xsbt.boot.Locks$.apply0(Locks.scala:31) at xsbt.boot.Locks$.apply(Locks.scala:28) at sbt.IvySbt.withDefaultLogger(Ivy.scala:64) at sbt.IvySbt.withIvy(Ivy.scala:119) at sbt.IvySbt.withIvy(Ivy.scala:116) at sbt.IvySbt$Module.withModule(Ivy.scala:147) at sbt.IvyActions$.updateEither(IvyActions.scala:156) at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1282) at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1279) at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$84.apply(Defaults.scala:1309) at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$84.apply(Defaults.scala:1307) at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35) at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1312) at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1306) at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45) at sbt.Classpaths$.cachedUpdate(Defaults.scala:1324) at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1264) at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1242) at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40) at sbt.std.Transform$$anon$4.work(System.scala:63) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17) at sbt.Execute.work(Execute.scala:235) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159) at sbt.CompletionService$$anon$2.call(CompletionService.scala:28) 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.sbt#sbt-pgp;0.8.2: not found
It appears they've moved to Bintray recently (and perhaps cleaning up other locations?). With the recent release of sbt-pgp 1.0-M1 I can find the plugin's binaries at https://bintray.com/sbt/sbt-plugin-releases/sbt-pgp/1.0-M1/view. As you can read in Improvements in 0.13.6 Release Notes: Adds Resolver.jcenterRepo and Resolver.bintrayRepo(owner, repo) to add Bintray easier. With all that said, the following worked for me (mind I haven't worked with the plugin before): project/sbt-pgp.sbt resolvers += Resolver.jcenterRepo addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "1.0-M1") project/build.properties sbt.version=0.13.6 No other files were needed to boot sbt shell (with sbt) and query for available plugins: > plugins In file:/Users/jacek/sandbox/sbt-pgp/ sbt.plugins.IvyPlugin: enabled in sbt-pgp sbt.plugins.JvmPlugin: enabled in sbt-pgp sbt.plugins.CorePlugin: enabled in sbt-pgp sbt.plugins.JUnitXmlReportPlugin: enabled in sbt-pgp com.typesafe.sbt.SbtPgp: enabled in sbt-pgp
How to display classpath used for run task?
How can the classpath used for run task be displayed under SBT 0.13? I have found some info here https://groups.google.com/forum/#!msg/simple-build-tool/0rhVRPnjyZU/DOYAd14gh1wJ: I was dumping my classpaths as a way to troubleshoot my build recently and maybe this task can help you too: lazy val printClasspath = task { this.runClasspath.getPaths.foreach(println); None } runClasspath is a PathFinder [1] instance and you can interrogate it even further. I guess building a ':'-separated list of those paths will be easy. I don't understand where and how I should use this tip. Please advise.
If I type this in the sbt shell: inspect run I see, among other output: [info] Dependencies: [info] runtime:fullClasspath So then if I type: show runtime:fullClasspath I get output like: List( Attributed(/Users/tisue/Dropbox/repos/euler/target/scala-2.10/classes), Attributed(/Users/tisue/.sbt/boot/scala-2.10.3/lib/scala-library.jar)) Which is probably what you were looking for? You can also get it in a colon-separated form suitable for use with java -classpath on the command line: export runtime:fullClasspath which prints e.g.: /Users/tisue/Dropbox/repos/euler/target/scala-2.10/classes:/Users/tisue/.sbt/boot/scala-2.10.3/lib/scala-library.jar
tl;dr Use last run or write a custom task. last run With last run you should be presented with the entire classpath: [info] Running main.Main [debug] Waiting for threads to exit or System.exit to be called. [debug] Classpath: [debug] /Users/jacek/work/ingrifo/dictionary-spray/target/scala-2.11/classes [debug] /Users/jacek/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.4.jar [debug] /Users/jacek/.ivy2/cache/io.spray/spray-can_2.11/bundles/spray-can_2.11-1.3.2.jar [debug] /Users/jacek/.ivy2/cache/io.spray/spray-io_2.11/bundles/spray-io_2.11-1.3.2.jar [debug] /Users/jacek/.ivy2/cache/io.spray/spray-util_2.11/bundles/spray-util_2.11-1.3.2.jar [debug] /Users/jacek/.ivy2/cache/io.spray/spray-http_2.11/bundles/spray-http_2.11-1.3.2.jar [debug] /Users/jacek/.ivy2/cache/org.parboiled/parboiled-scala_2.11/bundles/parboiled-scala_2.11-1.1.6.jar [debug] /Users/jacek/.ivy2/cache/org.parboiled/parboiled-core/bundles/parboiled-core-1.1.6.jar [debug] /Users/jacek/.ivy2/cache/io.spray/spray-routing_2.11/bundles/spray-routing_2.11-1.3.2.jar [debug] /Users/jacek/.ivy2/cache/io.spray/spray-httpx_2.11/bundles/spray-httpx_2.11-1.3.2.jar [debug] /Users/jacek/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.2.jar [debug] /Users/jacek/.ivy2/cache/org.jvnet.mimepull/mimepull/jars/mimepull-1.9.4.jar [debug] /Users/jacek/.ivy2/cache/com.chuusai/shapeless_2.11/jars/shapeless_2.11-1.2.4.jar [debug] /Users/jacek/.ivy2/cache/io.spray/spray-json_2.11/bundles/spray-json_2.11-1.3.1.jar [debug] /Users/jacek/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.6.jar [debug] /Users/jacek/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar [debug] Waiting for thread run-main-0 to terminate. [debug] Thread run-main-0 exited. [debug] Waiting for thread default-akka.actor.default-dispatcher-4 to terminate. Custom task to dump CLASSPATH If you need to see what the run task depends on, use inspect. [fullclasspath]> inspect run [info] Input task: Unit [info] Description: [info] Runs a main class, passing along arguments provided on the command line. [info] Provided by: [info] {file:/Users/jacek/sandbox/so/fullClasspath/}fullclasspath/compile:run [info] Defined at: [info] (sbt.Defaults) Defaults.scala:704 [info] Dependencies: [info] compile:run::streams [info] runtime:fullClasspath [info] compile:run::runner [info] compile:run::mainClass [info] Delegates: [info] compile:run [info] *:run [info] {.}/compile:run [info] {.}/*:run [info] */compile:run [info] */*:run [info] Related: [info] test:run In Dependencies there's the runtime:fullClasspath setting which means that run depends on its value. According to SBT help, fullClasspath is... [fullclasspath]> help fullClasspath The exported classpath, consisting of build products and unmanaged and managed, internal and external dependencies. You simply need to parse the value of the runtime:fullClasspath setting. [fullclasspath]> show runtime:fullClasspath [info] Updating {file:/Users/jacek/sandbox/so/fullClasspath/}fullclasspath... [info] Resolving org.fusesource.jansi#jansi;1.4 ... [info] Done updating. [info] List(Attributed(/Users/jacek/sandbox/so/fullClasspath/target/scala-2.10/classes), Attributed(/Users/jacek/.sbt/boot/scala-2.10.3/lib/scala-library.jar)) [success] Total time: 0 s, completed Feb 13, 2014 1:27:38 AM To have a more parsable output, use the following task that reads fullClasspath as defined for the runtime scope (Runtime in Scala/SBT code): lazy val printClasspath = taskKey[Unit]("Dump classpath") printClasspath := { (fullClasspath in Runtime value) foreach { e => println(e.data) } } Unfortunatelly, the Runtime configuration is hardcoded and think an input task to accept a configuration would make it so much better.
or directly from the bash , dash , sh or whatever shell: sbt 'inspect run' 'show runtime:fullClasspath' and sbt "inspect run" "show runtime:fullClasspath" for Windows command line.
Add the line lazy val printClasspath ... in your build.sbt file. Then at the command line run: sbt printClasspath