Hongwei Liu | 16 Dec 02:03 2015
Picon

set different scala version for projects in dependsOn

hi ,

i have a project which depends on other projects. but each use different scala version:

// build.sbt
name := "app"
scalaVersion := "2.10.4"
lazy val sdk = RootProject(file("./../../sdk"))
lazy val libs = RootProject(file("./../../libs"))
lazy val app = RootProject(file(".")).dependsOn(sdk, libs)


but the scalaVersion in sdk is "2.11.6", in libs is "2.12.0"

so if i build directly "sbt compile" , it will fail as it unable to find the version of "2.10" for sdk and libs.

i tried as below 2 ways, but neither worked:

1. i want to set the versions for the project reference here like this:

lazy val sdk = RootProject(file("./../../sdk")).settings(scalaVersion :="2.11.6")
lazy val libs = RootProject(file("./../../libs")).settings(scalaVersion :="2.12.0")

but the RootProject is a ProjectReference object which does not has "settings" method.

2. set scalaVersion in scope

 scalaVersion in sdk := "2.11.6"
 scalaVersion in libs := "2.12.0"


can someone help me on this? how to correct set the versions to support cross version build?

Thanks
Hongwei



--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at https://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
Maatary Okouya | 3 Dec 20:32 2015
Picon

How to control the sbt scala version

Does the scala version that sbt is actually using to run, matters? Can it be set ?

Best,

M

PS: Not talking of the scala version against which your project is build

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
David Vergnaud | 10 Nov 23:50 2015

Importing a plugin -- sbt-app-assembler

Hi, 

I've very new to SBT so I hope someone will be willing to help me. I've been 
integrated into a Java/Scala project that uses SBT for building, and I've 
developed a small CLI tool that I would like to give easy access to. I've been 
told about Appassembler, which is a Maven plugin that allows to create 
standalone archives that contain the complete environment required to run 
programs, and found that there is an SBT version of it on Github: 
https://github.com/hamnis/sbt-app-assembler
However, I've tried to follow the instructions and the plugin doesn't work at 
all. It may be obvious, but to me it's obviously a complete mystery. Here's 
what it shows: 
david% sbt assemble 
[info] Loading global plugins from /Users/david/.sbt/0.13/plugins
[info] Loading project definition from /Users/david/git/nlp/project
/Users/david/git/nlp/build.sbt:249: error: not found: value appAssemblerJvmOptio
ns
appAssemblerJvmOptions := Seq(
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

I don't really understand how/where this "assemble" task or the 
appAssemblerJvmOptions 
variable are being declared/defined so I'm definitely missing something. 
Perhaps someone could try and install this plugin and help me with this? 

Thanks!

David

Adam Warski | 27 Aug 17:25 2015
Picon

Re: Sbt equivalent to maven's dependency:tree

That's a very old thread, but if somebody would find that useful, there are two options now:

* SBT plugin for generating textual (and graphical, using an external viewer) representations of the dependency tree: https://github.com/jrudolph/sbt-dependency-graph
* UpdateImpact: graphical, searchable representation of the dependency tree (including all modules from your project, transitive dependencies and eviction information): https://app.updateimpact.com (free service). Disclaimer: I'm one of the developers of the site

Adam

On Friday, January 7, 2011 at 12:54:14 AM UTC+1, Quartz wrote:
Is there a way to find out how is a certain jar is included (it's a
transitive dependency)?

Optimal would be something like maven's dependency:tree...

Best regards,

   Gus

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
Rodrigo Cano | 25 Aug 19:45 2015
Picon

How to start sbt in server mode?

Hi,

I've been meaning to try out sbt in server mode, to try out sbt-core-next and sbt-remote-control but I was not able to do so. I've read the info in those repos, an old wiki there, and watched videos about it (don't remember which one now), I've also read http://www.scala-sbt.org/0.13/docs/Launcher-Getting-Started.html#Servers and tried modified the config of the launcher to see if that works, I wasn't successful.
I'm probably missing the obvious so if anybody could point it out I'd be grateful!.

I'd like to start playing with this for IDE support although my intentions are totally exploratory for now.

Cheers.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
jdamon | 14 Aug 03:43 2015
Gravatar

How do you actually debug what is going on in SBT

Hi,

I am used to Make / CMake or Ant build systems where I can either type "make -n" and see what is going to happen before it happens, or I can generally enable some sort of debug flag that prints out what low commands are being issued.

I find that SBT ( along with every other Java build tool minus Ant ) makes it too difficult to see what commands are being issued.

How can I turn on extremely low level Debug messages that tell me what  are the actual commands to "javac" ?

Now, I've done this inside sbt

set logLevel := Level.Debug
and then run

compile

but looks what happens when I compile Java: ( I'll save you the headache , but essentially this is all that comes up that is important:

[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set(/media/jdamon/Development/Documents/Projects/learning_scala/Foo/src/main/java/com/FooBar/MainAc
tivity.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo/target/android-gen/com/FooBar/R.java, /media/jdamon/Development/Docu
ments/Projects/learning_scala/Foo/target/android-gen/com/FooBar/BuildConfig.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo
/src/androidTest/java/com/FooBar/MainActivityTest.java)
[debug]
[debug] Sources indirectly invalidated by:
[debug]         product: Set()
[debug]         binary dep: Set()
[debug]         external source: Set()
[debug] All initially invalidated sources: Set(/media/jdamon/Development/Documents/Projects/learning_scala/Foo/src/main/java/com/FooBar/MainActiv
ity.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo/target/android-gen/com/FooBar/R.java, /media/jdamon/Development/Documen
ts/Projects/learning_scala/Foo/target/android-gen/com/FooBar/BuildConfig.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo/sr
c/androidTest/java/com/FooBar/MainActivityTest.java)
[debug] Recompiling all 4 sources: invalidated sources (4) exceeded 50.0% of all sources
[info] Compiling 4 Java sources to /media/jdamon/Development/Documents/Projects/learning_scala/Foo/target/android-bin/classes...
[debug] Attempting to call javac directly...
[debug] com.sun.tools.javac.Main not found with appropriate method signature; forking javac instead
[debug] Forking javac: javac <at> /tmp/sbt_11c2da96/argfile


1. How can I make SBT actually show the commands being invoked :  Example, Ant with -verbose will actually show you every single command albeit in a streched out format ( multi-line )


2. Why isn't SBT configured by default so that it shows this information with debug turned on?  To me this is as bad as Eclipse that refuses to show the user the actual compilation steps UNLESS you are an Eclipse super user and no how to enable this ( which I am not and is why I left trying to learn Eclipse ).

An example of a better system is what CMake does where every single compilation phase can be traced to miniature shell scripts that build parts of the design. This way if there are any strange behaviours you can at least get down to the bare metal to explore.

Thanks for any suggestions on how to get into how SBT to list every command it runs explicitly.















[debug] resolving dependencies for configuration 'compile'
[debug] == resolving dependencies for com-foobar#com-foobar;0.1-SNAPSHOT [compile]
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->default(compile)]
[info] Resolving org.scala-lang#scala-library;2.10.4 ...
[debug] sbt-chain: Checking cache for: sbt.ivyint.MergedDescriptors <at> 2c68160c
[debug] sbt-chain: module revision found in cache: org.scala-lang#scala-library;2.10.4
[debug]         found org.scala-lang#scala-library;2.10.4 in sbt-chain
[debug]         [2.10.4] org.scala-lang#scala-library;2.10.4
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->runtime]
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->compile]
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->master]
[debug] resolving dependencies for configuration 'runtime'
[debug] == resolving dependencies for com-foobar#com-foobar;0.1-SNAPSHOT [runtime]
[debug] == resolving dependencies for com-foobar#com-foobar;0.1-SNAPSHOT [compile]
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->default(compile)]
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->runtime]
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->compile]
[debug] == resolving dependencies com-foobar#com-foobar;0.1-SNAPSHOT->org.scala-lang#scala-library;2.10.4 [compile->master]
[debug] resolving dependencies for configuration 'test'
[debug] == resolving dependencies for com-foobar#com-foobar;0.1-SNAPSHOT [test]
[debug] == resolving dependencies for com-foobar#com-foobar;0.1-SNAPSHOT [runtime]
[debug] == resolving dependencies for com-foobar#com-foobar;0.1-SNAPSHOT [compile]
....
[debug] Initial source changes:
[debug]         removed:Set()
[debug]         added: Set(/media/jdamon/Development/Documents/Projects/learning_scala/Foo/src/main/java/com/FooBar/MainActivity.java, /media/jda
mon/Development/Documents/Projects/learning_scala/Foo/target/android-gen/com/FooBar/R.java, /media/jdamon/Development/Documents/Projects/learning
_scala/Foo/target/android-gen/com/FooBar/BuildConfig.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo/src/androidTest/java/c
om/FooBar/MainActivityTest.java)
[debug]         modified: Set()
[debug] Removed products: Set()
[debug] External API changes: API Changes: Set()
[debug] Modified binary dependencies: Set()
[debug] Initial directly invalidated sources: Set(/media/jdamon/Development/Documents/Projects/learning_scala/Foo/src/main/java/com/FooBar/MainAc
tivity.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo/target/android-gen/com/FooBar/R.java, /media/jdamon/Development/Docu
ments/Projects/learning_scala/Foo/target/android-gen/com/FooBar/BuildConfig.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo
/src/androidTest/java/com/FooBar/MainActivityTest.java)
[debug]
[debug] Sources indirectly invalidated by:
[debug]         product: Set()
[debug]         binary dep: Set()
[debug]         external source: Set()
[debug] All initially invalidated sources: Set(/media/jdamon/Development/Documents/Projects/learning_scala/Foo/src/main/java/com/FooBar/MainActiv
ity.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo/target/android-gen/com/FooBar/R.java, /media/jdamon/Development/Documen
ts/Projects/learning_scala/Foo/target/android-gen/com/FooBar/BuildConfig.java, /media/jdamon/Development/Documents/Projects/learning_scala/Foo/sr
c/androidTest/java/com/FooBar/MainActivityTest.java)
[debug] Recompiling all 4 sources: invalidated sources (4) exceeded 50.0% of all sources
[info] Compiling 4 Java sources to /media/jdamon/Development/Documents/Projects/learning_scala/Foo/target/android-bin/classes...
[debug] Attempting to call javac directly...
[debug] com.sun.tools.javac.Main not found with appropriate method signature; forking javac instead
[debug] Forking javac: javac <at> /tmp/sbt_ebe6d072/argfile






WARNING - This e-mail or its attachments may contain controlled technical data or controlled technology within the definition of the International Traffic in Arms Regulations (ITAR) or Export Administration Regulations (EAR), and are subject to the export control laws of the U.S. Government. Transfer of this data or technology by any means to a foreign person, whether in the United States or abroad, without an export license or other approval from the U.S. Government, is prohibited. The information contained in this document is CONFIDENTIAL and property of ACCES I/O Products, Inc. Any unauthorized review, use, disclosure or distribution is prohibited without express written consent of ACCES I/O Products, Inc. If you are not the intended recipient, please contact the sender and destroy all copies of the original message and enclosed attachments.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
Tim Harper | 23 Jul 21:06 2015
Picon
Gravatar

Work around for cert issues

Posting this where someone else can find it:

Today repo.scala-sbt.org is having cert configuration issues. The error message is as follows:

Server access Error: java.security.cert.CertificateException: No subject alternative DNS name matching repo.scala-sbt.org found. url=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.google.code.findbugs/jsr305/2.0.1/jars/jsr305.jar

It looks like the cert installed for repo.scala-sbt.org is actually the cert for repo.typesafe.com.

This causes sbt installation to fail miserably.

As a workaround, you can add this to ~/.sbt/0.13/plugins/temp-workaround.scala:

resolvers += Resolver.url("Scala SBT non-https", new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

Tim

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
杨博 | 10 Jul 21:23 2015
Picon

sbt-api-mappings, a sbt plugin that resolve external links in ScalaDoc, has been released

Hi, all,
I just released a new sbt plugin, sbt-api-mappings.
This plugin fills apiMappings for common Scala libraries, avoiding the annoying Could not find any member to link for SomeExternalDocumentation errors. I hope this plugin helps for you guys.
Feel free to create Pull Requests if you found any common Scala library is not supported.
Thank you!
--
杨博 (Yang Bo)

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
Maatary Okouya | 5 Jun 23:20 2015
Picon

Sbt do not update local maven repo with new snapshot

Hi i have a project that is based on maven, and in which i am integrating some lib that i am developing in scala using SBT. 

Currently the sbt project in which i am developing the Lib is in snapshot version.

While, the snapshot jar is well updated in Ivy it is not the case in Maven when i use PublishM2.

I have to delete the previous one to get to have the new version that i would publish with PublishM2.

Is there a way to ensure that my publishM2 update the local Maven repository properly (meaning with a new snapshot) ?



Many thanks,


M

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
Lian Jiang | 21 May 08:42 2015

how to make an All-In-One docker using sbt-docker and sbt-assembly

Due to the size of each docker image (about 800M), I want to create an All-In-One docker image for my multi-module project. So that I can spin up one machine in cloud hosting this docker container for some sanity check (but more realistic than testing on my dev box). I am using sbt-docker and sbt-assembly.

Suppose my project has module root, mod1, mod2 where sbt-assembly creates a fat jar for each of them. I want the root module to use sbt-docker to create a docker image having mod1.jar and mod2.jar deployed so that I can use a script to run all the jars on this container. I have already made root aggregates and depends (compile->IntegrationTest) on mod1 and mod2. However, I always got dependency issue (e.g. root cannot find mod1 fat jar). Also I parse the root module's jar path and artifact name, replace the module name to get the mod1/mod2's artifact path which is ugly.

Is there a naturally supported way/plugin to create such All-in-One docker? Appreciate!  
 

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.
Dan Dong | 9 May 00:09 2015
Picon

How to specify additional jar files when "sbt package"

Hi,
  When I tried to "sbt package" of my project, I got problem of:

[error] /home/ubuntu/wordcount/src/main/scala/wordcount.scala:4: object abc is not a member of package com
[error] import com.abc._
...

The program failed to import the com.abc._, seems it could not find the correct path to it.
But the program compiled and run without problem in scala directly when you set CLASSPATH env to include the jar ball of com.abc.
So how can I specify the -classpath to include this jar ball in "sbt package"? Thanks.

Cheers,
Dan

 


--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-tool+unsubscribe <at> googlegroups.com.
To post to this group, send email to simple-build-tool <at> googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/d/optout.

Gmane