sbt

Setting value of setting on command line when no default value defined in build?

老子叫甜甜 提交于 2020-01-11 09:36:11
问题 I am writing a plugin that requires a specific setting: configUrl If I specify that setting in my build.conf it would look like this: MyPlugin.configUrl := "http://..../..." I can then use the command line to do this: sbt 'set MyPlugin.configUrl := "http://..../..."' performAction Is there a better way that allows me to not have that setting in build? If I start sbt without that setting I get the following error: [error] Reference to undefined setting: [error] [error] *:config-url from *

Ensime doesn't work with sbt + android-plugin

血红的双手。 提交于 2020-01-11 06:43:28
问题 i created a project by using this: https://github.com/gseitz/android-sbt-project.g8 When i start ensime in emacs to edit src/main/scala/Activity.scala i have red highlights almost everywhere. First highlight says by exemple in "import root .android.whatever" that android is not a member of root . But in sbt everything compile fine. How can i set ensime to work correctly with sbt + android-plugin ? 回答1: Let Ensime know where it can find the android packages. Add a line to your .ensime file

SBT: pre-applying input to inputKeys

你。 提交于 2020-01-11 01:21:22
问题 In SBT: I would like to define an inputKey that reads in command line arguments, changes them slightly and uses the result as input to other inputKeys. I tried: lazy val demo = inputKey[Unit]("A demo input task.") lazy val root = (project in file(".")).settings( libraryDependencies += jUnitInterface ).settings( demo := { val args: Seq[String] = spaceDelimited("<arg>").parsed val one = (run in Compile).fullInput(args(0) + "foo").evaluated } ) But I'm getting error: Illegal dynamic reference:

sbt clear screen command

筅森魡賤 提交于 2020-01-10 08:11:14
问题 I am learning sbt build tool. I use interpreted sbt . I run lot of commands and get lot of output which clutters up the screen. The question is any command for clear screen for sbt interpretive console , like cls in DOS shell or clear in bash My googling skill did not helped update : i am using console2 with windows power shell 回答1: In bash you should be able to use Ctrl+L, on OSX you can also use Cmd+K. 回答2: This specifically helps when you're doing something in continuous mode, ala `compile

sbt clear screen command

徘徊边缘 提交于 2020-01-10 08:10:05
问题 I am learning sbt build tool. I use interpreted sbt . I run lot of commands and get lot of output which clutters up the screen. The question is any command for clear screen for sbt interpretive console , like cls in DOS shell or clear in bash My googling skill did not helped update : i am using console2 with windows power shell 回答1: In bash you should be able to use Ctrl+L, on OSX you can also use Cmd+K. 回答2: This specifically helps when you're doing something in continuous mode, ala `compile

Cross platform build with SBT

我的未来我决定 提交于 2020-01-10 04:21:07
问题 I'm currently testing out SBT Native Packager and my desired result is to have a native installer for each supported platform. Obviously to do this the platform specific SBT tasks will need to run on that platform. The build will either be done with Atlassian's Bamboo or JetBrains' Team City. Ideally I would only do the compilation and tests once and reuse the same artifacts for the packaging tasks. What is a good way to approach this with SBT? One way I can think of is to do the compile and

nginx

假装没事ソ 提交于 2020-01-08 13:45:13
启动tomcat sh ./xx/xx/startup.sh vi /etc/sysconfig/network-scripts/ yum -y install gcc gcc-c++ autoconf automake 依赖第三方库gzip--zlib/rewrite--pcre/ssl---openssl 可以用yum -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel命令下载安装依赖库 安装方式 以此执行tar zxvf nginx-0.x.xx.tar.gz-------cd nginx-xxx-----.configure ---- make --- sudo make install 启动nginx /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 停止nginx 将nginx添加到服务中 直接复制nginx 文件到/etc/init.d/ 加入开机启动 vi /etc/rc.local 在文件加入一行/etc/init.d/nginx start ps -ef|grep nginx kill -quit nginx 主进程号 或kill -term nginx 主进程号(快速) 或kill -ini nginx

Share messages type among two project in Akka

流过昼夜 提交于 2020-01-07 04:44:55
问题 I am developing a reactive library that internally is implemented using Akka actors. Let's call this library server . The library exposes a single type of Actor as its API. This Actor accepts different types of messages, that define its public interface. Let's say that these messages are defined as the followings. sealed trait Request case class Creation(name: String) extends Request sealed trait Response case class CreationAck(name: String) extends Response Now, I have to implement also a

SBT / Good way to override a plugin's setting

。_饼干妹妹 提交于 2020-01-07 02:22:12
问题 I want to change the aspectj version used by this plugin (line 59). Indeed, I want to use aspectj version 1.8.0 and not 1.7.3. I sent a message to the creator but I'm stuck until he could answer since I've got a Spring-Data component that depends on 1.8.0. The current plugin's setting is: lazy val aspectjSettings: Seq[Setting[_]] = inConfig(Aspectj)(defaultAspectjSettings) ++ aspectjDependencySettings def defaultAspectjSettings = Seq( aspectjVersion := "1.7.3", ....... Mu current SBT for my

akka-http not showing metrics in NewRelic

我只是一个虾纸丫 提交于 2020-01-07 01:49:29
问题 I'm trying to monitor my akka-http Rest web-service with NewRelic The application has only one GET url (defined with akka-http) I have the following configuration in the plugins.sbt logLevel := Level.Warn addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.4") addSbtPlugin("com.gilt.sbt" % "sbt-newrelic" % "0.1.4") I have the following configuration in the build.sbt scalaVersion := "2.11.7" name := "recommender-api" ...blablabla... libraryDependencies += "com.typesafe.akka" % "akka