sbt

play2 calling controllers, models, views in submodule

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 02:34:43
问题 Trying to split my project to few submodules. I've created submodules: /modules/common /modules/shopping Now I am trying convert name spaces to new one including new structure. my controller: package controllers.common; public class Index extends Controller {} my model: package models.common; @Entity public class AppMode {} my view: @(AppModeForm: Form[models.common.AppMode], CurrentMode: Boolean) @helper.form(common.routes.CMS.appModeSubmit, 'id -> "form") {} And I am getting errors all the

default configuration change for SBT

一曲冷凌霜 提交于 2019-12-25 02:06:07
问题 I integrated SBT in my existing application and able to run the application with sbt enabled. I deployed in my test server and it works fine but when I moved to the production, Since the context path of the application is different it breaks. Ex: in test server my application url is https://somedomian/SampleSbt In production htt....somedomain/serve/meth/SampleSbt I'm getting error in firebug as htt.....domain/sbt/js/sdk/sbt/ErrorTransport.js -> Forbidden I tried changing the context path /my

sbt about gives 0.13.15 while i have installed sbt 1.0.4

China☆狼群 提交于 2019-12-25 01:32:39
问题 Hi new to sbt i have installed sbt form here https://www.scala-sbt.org/download.html (windows sbt-1.0.4.msi) and then i do sbt about it yields C:\Users\rajnish.kumar>sbt about "C:\Users\rajnish.kumar\.sbt\preloaded\org.scala-sbt\sbt\"1.0.4"\jars\sbt.jar" Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 [warn] Executing in batch mode. [warn] For better performance, hit [ENTER] to switch to interactive mode, or [warn] consider launching sbt

How to turn on assert statements in junit4 runned with sbt?

老子叫甜甜 提交于 2019-12-25 00:35:39
问题 I use sbt for development routines in my java project and junit-interface for running tests. But by default it ignores assert statements(assert for checking some invariant in underlying code). For example this test passes: @Test public void test() { // this is example; In reality assertion somewhere in code under test assert false; // not assertTrue(or whatever) from junit } My build.sbt file is fairly simple: organization := "Kharandziuk" name := "Some alg project" version := "1.0-SNAPSHOT"

How to change sbt version for project

情到浓时终转凉″ 提交于 2019-12-24 23:56:50
问题 I have build.properties file in the project with the following line: sbt.version=1.2.8 build.properties file is in the same folder as build.sbt file. But when I enter the command "sbt about", it reports 1.0.3. Following is the actual output of the command: /Users/kale> sbt about [info] Loading settings from idea.sbt ... [info] Loading global plugins from /Users/kale/.sbt/1.0/plugins [info] Loading settings from plugins.sbt ... [info] Loading project definition from /Users/kale/workspace

How to get project information from build in Scala project code?

一个人想着一个人 提交于 2019-12-24 22:24:49
问题 I have a Scala/sbt project. The project's version is in the sbt Build.scala file. I need to have an "about" feature that gives the product version to the user. How do I read from the SBT build file from within the Scala source? For example, given project/Build.scala : import sbt._ object ApplicationBuild extends Build { val appName = "foo-product" val appVersion = "1.1.0" } What I'd really like is to just be able to do ApplicationBuild.appVersion , but that doesn't seem possible. How can this

sbt publish (or publishLocal) VS sbt assembly for distribution purposes and dependency conflicts resolution

北慕城南 提交于 2019-12-24 18:29:14
问题 Bottom line is that I want to distribute a library that can be integrated using SBT or Maven and whose dependencies won't conflict with the integrating project's dependencies or transitive dependencies. Currently I am distributing my library through SBT using the publish command which is configured to publish the artifacts to my private JFrog Artifactory . It is working as expected in the sense that it will publish the library to artifactory and that I can easily integrate the resulting

Building paths in SBT for the packageMappings of the sbt-native-packager

纵然是瞬间 提交于 2019-12-24 17:46:23
问题 I am very new to SBT and need to create a RPM package for one of my project. The RPM contains only 1 file, which is a one-jar created by the sbt-onejar plugin). I want to use sbt-native-packager plugin and have created a Packagin.scala file under the /project directory like this: object Packaging { val settings: Seq[Setting[_]] = packagerSettings ++ deploymentSettings ++ mapGenericFilesToLinux ++ Seq( maintainer := "Team", packageSummary := "Summary", packageDescription := """Description""",

How can I exclude sub-dependencies from unmanaged dependencies?

随声附和 提交于 2019-12-24 17:14:59
问题 I know in sbt you can do something like this to exclude specific sub-dependencies of dependencies for some lib your project uses: val kafka = "org.apache.kafka" % "kafka-clients" % "0.9.0.1" excludeAll( ExclusionRule(organization = "com.sun.jdmk"), ExclusionRule(organization = "com.sun.jmx") ) How can I do this for an unmanaged jar? I put an unmanaged library jar 'something.jar' in my project's lib directory but sbt is giving me errors for some dependencies of something.jar that I don't care

sbt cannot resolve ensime-sbt-cmd in a Play2-Scala project

南楼画角 提交于 2019-12-24 16:34:16
问题 I'm trying to configure Sublime Text 2 to better support working with Scala and Play! 2 Framework by following instructions from http://engineering.panaxiom.co.uk/post/34631917299/sublime-text-2-with-sbt-and-play-2. (I made just one change: I updated the plugin version to 0.1.1.) I was able to almost complete the steps given in the tutorial but the second one always fails (generate ensime config file) simply because sbt is unable to resolve ensime-sbt-cmd plugin (when I enter a project