惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - evilyzou

scala 的List foldLeft用法 Circumflex Scala中的Either的两个子类(Left,Right)的简单用法 Scala中的一些特殊字符用法 Scala中的PartialFunction在Lift当中的NamedPF应用 Lift当中的AnyVarTrati源码解析 scala的DynamicVariable用法 SBT和IDEA 开发scala web程序 scalatra web框架安装指南 ASP.NET MVC: Do You Know Where Your TempData Is? 使用IntelliJ IDEA, Maven and the jetty plugin调试web应用程序 Scala GraphViz DOT Parser Scala Standard library Scala 一些基本的语法 Scala 相关的资源和Blog Lift2.0发布 Linux 汇编语言开发指南 Linux2.6内核启动流程学习 [导入]C#强化系列文章五:动态代码的使用(反射和动态生成类) [导入]C#强化系列文章七:序列化和反序列化
使用Sbt(一)
evilyzou · 2010-08-15 · via 博客园 - evilyzou
sbt clean complil

当有一个或者多个文件更新时,可以使用

~ compile编译

2.使用不同的scala版本:(使用++)来表示

RB26XPN4BG(R$55FA2V@V$P

Sbt Actions:

clean: 删除所有生产的文件(在target目录下的)

clean-cache:删除所有下载的artifacts和为用户自动管理的依赖库

clean-lib:删除所有的为该项目管理的库(lib_managed)

clean-plugins:删除所有该项目的plugin

(It should generally be followed by reload. This is useful for developing plugins.)

compile:编译项目文件:(src/main/scala目录下的)

console:包括了已经编译好了的scala文件和所有的lib下的jars包,sbt自动管理的库 scala命令行

退出使用quit, Ctrl+D (Unix), or Ctrl+Z (Windows). Runs test-compile first.

console-quick:基本同上,只不过它不需要先运行任何Action

doc:主要为(src/main/scala)目录下的项目文件生产API文档,必须先运行compile Action

doc-test:

主要是src/test/scala的项目文档,必须先运行test-compile Action

doc-all :运行doc 和doc-test

exec:

  • (mixin Exec to your project definition to use this action)
  • Forks the provided arguments as a new process. Examples:
  • exec echo Hi
  • exec find src/main/scala –iname *.scala –exec wc –l {};
  • graph-src:
  • Produces a graphviz dot file for the dependency graph between main sources in target/graph/sources
  • graph-pkg:

Produces a graphviz dot file for the dependency graph between main source directories in target/graph/packages

java <option>* <class-nam>

Runs javap with the given arguments using the runClasspath for the project. Tab completion is provided for main classes generated from the last successful compilation. Examples:

javap your.Clazz

javap –c scala.List

test-javap <option>* <class-name>Runs javap with the given arguments using the testClasspath for the project. Tab completion is provided for test classes generated from the last successful compilation.

jetty-run(只针对web项目)   Starts the Jetty server and serves this project as a web application on http://localhost:8080 by default. This variant of starting Jetty is intended to be run from the interactive prompt.

jetty(只针对web项目)   Starts the Jetty server and serves this project as a web application on http://localhost:8080 by default. This variant of jetty-run is intended to be run batch-style (such as sbt jetty), so it waits for a keypress before completing.

jetty-stop (只针对web项目)  Stops the Jetty server that was started with the jetty-run action.

package  For a normal project, creates a jar file containing classes compiled from src/main/scala and the files in src/main/resources after running compile first. For a web application project, creates a war file after running compile and prepare-webapp first.

package-test

Creates a jar file containing classes compiled from src/test/scala and the files in src/test/resources. Runs test-compile first.

package-docs  Creates a jar file containing API documentation generated from Scala source files in src/main/scala. Runs doc first.

package-all  Runs all package tasks except package-project.

package-project Creates a zip file containing the entire project, excluding generated files.

package-src  Creates a jar file containing all main source files and resources. The packaged paths are relative to src/main/scala andsrc/main/resources.

package-test-src  Creates a jar file containing all test source files and resources. The

packaged paths are relative to src/test/scala andsrc/test/resources.

run <argument>* Runs the main class for the project in the same virtual machine as sbt. The main class is passed the arguments provided. Please seeRunningProjectCode for details on the use of System.exit and multithreading (including GUIs) in code run by this action. Runscompile first.

sh <argument>* (mixin Exec for this action)  Invokes the shell (for unix users) with the command: /bin/sh -c <arguments>. For example:

>sh find src/main/scala –iname *.scala | xargs cat |wc –l

test Runs all tests detected during compilation. Runs test-compile first.

test-failed <test>*  Runs the tests provided as arguments if they have not succeeded (either failed on the previous test run or have not been run yet). * is interpreted as a wildcard in the test name.

test-quick <test>*  Runs the tests provided as arguments if they have not succeeded (either failed on the previous test run or have not been run yet) or their dependencies changed. * is interpreted as a wildcard in the test name.

test-only <test>* Runs the tests provided as arguments. * is interpreted as a wildcard in the test name.

test-compile Compiles the test sources (in the src/test/scala directory). Runs compile first.

test-javap Like javap, but for test classes.

test-run <argument>*  Like run, but for test classes. Runs test-compile first.

update Resolves and retrieves external dependencies as described in LibraryManagement.

编译Action:

exit or quit  End the current interactive session or build.

reloadReloads the current interactive session. If the Scala or sbt version has changed, the requested versions are retrieved and used. The project definition is recompiled and reloaded if it needed.

help  Displays a help message and lists these interactive actions and their descriptions.

actions  List all available actions.

current  Print the current project and logging level.

info  Set the logging level to info. This is the default logging level.

debug  Set the logging level to debug. This logging level is more verbose than info, but does not log stack traces for errors.

trace on | nosbt | off | <integer> 

Configures stack trace logging, which is 'on' by default. 'nosbt' prints stack traces up to the first sbt frame. An integer gives the number of frames to show per exception.

warn  Set the logging level to warn. This logging level only logs warnings and errors.

error  Set the logging level to error. This logging level only logs errors.

set property.name property value  If a user property with name property.name exists for the current project, that property is set to value property value (no quotes are required for values with spaces). Otherwise, the system property with name property.name is set to value property value. (SeeProperties for more on properties)

get property.name  Shows the value of the property (user or system) with name property.name. (See Properties for more on properties)

projects  List all available projects (See SubProjects for more on multiple projects).

project <project name> Change the current project to the project named <project name>. Further operations will be done on the given project. (See SubProjectsfor more on multiple projects)

console-project Enters an interactive session with the project instance bound to the 'current' variable. See ProjectConsole for more information.

~ <command> Executes the project specified action or method whenever source files change. See TriggeredExecution for details.

< filename Executes the commands in the given file. Each command should be on its own line. Empty lines and lines beginning with '#' are ignored

+ <command> Executes the project specified action or method for all versions of Scala defined in the build.scala.versions property.

++<version> <command>  Temporarily changes the version of Scala building the project and executes the provided command. <command> is optional. The specified version of Scala is used until sbt exits or ++ is run again. <version> does not need to be listed in the build.scala.versions property, but it must be defined in localScala or be available in a repository.

; A ; B Execute A and if it succeeds, run B. Note that the leading semicolon is required.

*  Processor management commands. See Processors for details.