Leon Maia | 3 Mar 15:17 2016
Gravatar

Extend trait from another module failing

Hello everyone,

I have a multi-module project and one of my modules dependsOn a utils project which contains some `traits`. When I run my tests on IntelliJ IDEA all tests work, but when running from the terminal with `sbt moduleName/test` it appears to be unable to import the traits, everything else get imported (gives a not member package error Any ideas? I've made a simple project that reproduces the error: https://github.com/leonmaia/multi-module-failing-trait

Thanks!

--
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.
Priya R | 18 Feb 01:51 2016
Picon

Why is the multi-project build.sbt failing?

I have the below build.sbt. I am using sbt 0.13.9.

name := "myproject" organization := "myproject" version := "0.1" lazy val myproject = project in file(".") aggregate(common, myservice) lazy val common = (project in file("common")) .settings(commonSettings: _*) lazy val myservice = (project in file("myservice")) dependsOn(common) lazy val commonSettings = Seq( scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8"), scalaVersion := "2.11.7", resolvers ++= Seq("Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/") )

When I run sbt compile it fails with the below error:

[warn] module not found: common#common_2.10;0.1-SNAPSHOT [warn] ==== local: tried [warn] /home/priyar/.ivy2/local/common/common_2.10/0.1-SNAPSHOT/ivys/ivy.xml [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/common/common_2.10/0.1-SNAPSHOT/common_2.10-0.1-SNAPSHOT.pom [info] Resolving org.fusesource.jansi#jansi;1.4 ... [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: common#common_2.10;0.1-SNAPSHOT: not found [warn] ::::::::::::::::::::::::::::::::::::::::::::::

If I remove line 10 (.settings(commonSettings: _*)) it runs fine. But I need that line.

I copied the idea from https://github.com/theiterators/reactive-microservices/blob/master/build.sbt

What am I doing wrong?

--
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.
Robson Peixoto | 1 Mar 23:13 2016
Picon
Gravatar

Equivalent to `mvn versions:use-latest-versions`

Hi!

I'm googling about something similar to `mvn versions:use-latest-versions` on sbt.

Are there a plugin, command or configuration equivalent to it?

--
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.
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
Gravatar

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.

Gmane