Taylor Leese | 17 Apr 03:08 2014
Picon

test:doc Could not find any member to link

Hi All,

I'm running across a scenario where I'm attempting to generate test docs (sbt test:doc), but I'm getting errors like the following:

[warn] /Users/tleese/code/my/project/src/test/scala/com/my/stuff/common/tests/util/NumberExtractorsSpecs.scala:9: Could not find any member to link for "com.my.stuff.common.util.IntExtractor".

Basically, the scenario is the scaladocs generated for test classes can't seem to link to the classes in the main sources. To be clear, the references I'm talking about are classes within the same sbt project and not external dependencies. I was able to resolve warnings on external classes via "-external-urls" so that is not what is going on with the issue I'm mentioning above. The scaladocs for the main sources also generate without any warnings so this is an issue specific to scaladocs for test sources. Any idea what I might be doing wrong or need to configure?

The relevant sections of my Build.scala are below:

  val docScalacOptions = Seq(
    "-groups",
    "-implicits",
    "-external-urls:" +
      s"scala=http://www.scala-lang.org/api/$scalaVsn}/," +
      s"akka=http://doc.akka.io/api/akka/$akkaVersion/," +
      "java=http://docs.oracle.com/javase/6/docs/api/," +
      // this is the only scaladoc location listed on the spray site
      "spray=http://spray.io/documentation/1.1-SNAPSHOT/api/," +
      "org.slf4j=http://www.slf4j.org/api/,"+
      s"com.fasterxml.jackson=http://fasterxml.github.io/jackson-core/javadoc/$jacksonVersion/," +
      "com.typesafe=http://typesafehub.github.io/config/latest/api/," +
      s"org.specs2=http://etorreborre.github.io/specs2/api/SPECS2-$specs2Version/"
  )

    scalacOptions in (Compile, doc) ++= docScalacOptions,
    scalacOptions in (Test, doc) ++= docScalacOptions,
    autoAPIMappings := true,

- Taylor

--
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.
ruoya.sheng | 8 Apr 11:48 2014

How to publish the jars in "lib" folder to the Artifactory using sbt

Hello, everyone
I was new in SBT and I try to use sbt+IVY+Artifactory to manage the jars in my project, in my test little project, I had architecture like this 
and I write build.sbt like this:

name := "myfirstproject" 

 

version := "0.0.0" 

 

scalaVersion := "2.9.2" 


resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"


libraryDependencies += "org.apache.derby" % "derby" % "10.4.1.3"


publishTo := Some("artifactory" at "http://ifarmpro:8081/artifactory/test-snapshot-local")


credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")


And credentials like this: 

realm=Artifactory Realm

host=ifarmpro

user=admin

password=password            

but it only upload some jars that I do not want, I want to upload the two jars in the lib folder ---findbugs_annotations.jar and guava.jar 
how could I write my build.sbt or build.scala so that I can upload the jars I want. 
Thank you so much, If any one can give me an answer. 

--
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.
Viktor Hedefalk | 2 Apr 22:56 2014
Picon

Plugins in submodules not working?

Hi,

I'm trying to convert a single module project into two modules with a
root aggregate. Feels like a normal thing to do.

So, to simplify I have removed the second project that I added, but I
do something like:

cd myproject
mkdir core
mv * core

and then add a build.sbt in root like

lazy val root = project.in( file(".") )
   .aggregate(core)
lazy val core = project in file("core")

However, trying to build core I get:

[myproject]/core/build.sbt:22: error: not found: value lessSettings
seq(lessSettings:_*)

which is the settings for a plugin added in project/plugins.sbt of the
original project now in

[myproject]/core/project/plugins.sbt

How come this is not picked up? Can't I have plugins living only in
submodules? cd:ing into core and running sbt it's just fine. Do I have
to move my plugins to root/project? Seems weird and dirty?

Thanks,
Viktor

Brian Hsu | 3 Apr 09:09 2014
Picon

How to set output directory of ScalaDoc in SBT 0.13

It seems docDirectory in Compile is deprecated u in SBT 0.13.x.

So I'm wondering how to set scaladoc output directory in SBT 0.13.x, I would like the output file is located at 'api/' folder under my project folder. For example, if I have a SBT project under /home/brianhsu/MyProject, I would like the documentation go to /home/brianhsu/MyProject/api.

I have tried the following option in my build.sbt file

    scalacOptions in (Compile, doc) ++= Seq("-d", "api")
 
But it has no effects, the API documentation is still generate to MyProject/target/scala-2.10/api, not MyProject/api

--
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.
Dima Golubets | 1 Apr 21:50 2014
Picon

SBT code generation and fork

Hi!

I'm trying to generate code in SBT build for Slick like in the example. However if I have

fork:=true

setting in the project - build fails with:

java.lang.NoClassDefFoundError: scala/reflect/runtime/package$

I want to keep that option to prevent memory leaks in my unit tests. If I get it right - there is no scala-reflect.jar loaded in forked jvm. But I have no idea how to load it.

Any ideas?

--
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.
Marco Ordonez | 20 Mar 08:42 2014
Picon

How can I add modules to a sub-subproject

Hi guys, I have spent so much time trying to solve this but I can't solve til now. The problem is that I have a root sbt project, inside a have a play framework project(called web) and the play project has sub modules. When I start the project inside the playmodule (web) the submodules are added to the classpath and everything work as expected (http://www.playframework.com/documentation/2.2.x/SBTSubProjects) but when I start it from the command line using play "project web" "shell" then run it do not take the sub modules, I am not sure why... any ideas?


--
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.
Markus Klink | 22 Mar 12:33 2014
Picon

Classpath of sbt plugins

Hi all,

I am currently struggling with writing a sbt plugin.
I released a BETA version here: https://github.com/oose/sbt-javaapi-gen

The purpose of the plugin is that I want to automatically create implicit classes around Java classes on the classpath, so that I can invoke getters and setters in scala style instead of writing it in java. Kind of the opposite of the bean property annotation.

Only after I tidied all the code I discovered that plugin code cannot access the project classpath and in order to analyse the configured java classes I do something like:
val clazzes = classes.map(className => JavaClass(Class.forName(className)))

That will of course fail as the sbt doc (only discovered afterwards) states:
Note: At runtime, all plugins for all builds are loaded in a separate, parent class loader of the class loaders for builds. This means that plugins will not see classes or resources from build definitions.
and as a current work around I need to define my dependencies in the project/build.sbt file as well, which is very annoying.

So - can I somehow change that? My actual plugin code can be found here:
https://github.com/oose/sbt-javaapi-gen/blob/master/src/main/scala/oose/sbtjavaapigen/JavaApi.scala
and I tried to keep the sbt stuff seperate from the Generator itself.

Thanks,
Markus
P.S.: All answers are welcome, but please note that I am a total newbie with sbt internals.

--
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.
shawnxiaoqq | 21 Mar 11:53 2014
Picon

how to ignore error source file,continue to compile next source file?

when some source files have errors, "sbt compile" is be  interrupted,and can't produce .class file in the target directory.
how to let "sbt compile to go on compile the other right source files,and get the .class file in the target directory?

--
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.
benmccann | 7 Mar 03:47 2014
Picon

How to do "override def rootProject" in build.sbt?


In my Build.scala, I have:

override def rootProject = Some(frontendProject)

I'm trying to convert to the newer build.sbt format, but don't know the equivalent of this line. How do I set the project for sbt to load by default when using build.sbt?

Thanks,

-Ben


--
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.
Oliver Kinderknecht | 6 Mar 17:13 2014

How to exclude unnecessary unmanaged dependencies from packaging?

Hello,

I want to create a standalone version of my play! 2.2.2 application and was wondering how i could exclude 
an unmanaged *.jar file to be packaged(play dist). It's the "mariaDB4j-2.0-SNAPSHOT.jar" file I solely 
use in tests which is about 56MB huge. 

I tried to put the jar file into a custom lib folder. Unfortunately, this did not exclude mariaDB4j from packaging.

unmanagedBase <<= baseDirectory { base => base / "lib_test" }

unmanagedJars 
in Test <<= unmanagedBase  map { base => (base ** "mariaDB4j-2.0-SNAPSHOT.jar").classpath }

Any thoughts on this?

Cheers 
Oliver

--
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/groups/opt_out.
Mike Rivera | 5 Mar 21:36 2014
Picon

ScalaTest, SBT, and Selenium Grid

Hi there,

Trying to setup a proof of concept and I need a bit of help. Has anyone setup ScalaTest, SBT, and Selenium Grid?

I have selenium working in ScalaTest, and the code talks to the node, but I can't get the grid to limit the number of browsers open.

I opened this in the Selenium and ScalaTest list as well, but wondered if anyone was able to get this working here at all.

Thanks!
Mike

--
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/groups/opt_out.

Gmane