Available Command Line Options / Functions

Is there a way to find out all the possible activator command line options?

activator -help provides only the minimum available list of options / functions, but all the nice things are hidden and inaccessible even in the online documentation of website types.

So far I know the following commands / functions:

 activator run activator -jvm-debug 9999 run activator compile activator clean activator clean compile dist activator doc //creates a nice documentation of your whole project 

Any idea where this information is available?

(using activator to launch project projects)

+5
source share
2 answers

An activator is not a tool that has several broad capabilities. Seems like it is just a wrapper to run the sbt project. On the activator source page in git:

Activator aims to become a friendly one-stop shop for downloading your Scala, Akka and Play. It can be used as a wrapper script that runs in the traditional sbt command line, but also includes a template and a training system, as well as an additional graphical interface to get started.

You can think of the activator as a traditional sbt (activator shell or activator) plus an additional user interface mode (ui activator), plus a template system (new activator).

It's all. In fact, only four teams:

  • ui - start ui mode
  • new - to create a new project from the template
  • list-templates - show all available templates
  • shell - to start the sbt shell

Look at it in detail.

Source

https://github.com/typesafehub/activator/blob/master/launcher/src/main/scala/activator/ActivatorLauncher.scala

 try configuration.arguments match { case Array("ui") => RebootToUI(configuration, version = checkForUpdatedVersion.getOrElse(APP_VERSION)) case Array("new", _*) => Exit(ActivatorCli(configuration)) case Array("list-templates") => Exit(TemplateHandler()) case Array("shell") => RebootToSbt(configuration, useArguments = false) case _ if Sbt.looksLikeAProject(new File(".")) => RebootToSbt(configuration, useArguments = true) case _ => displayHelp(configuration) } catch { case e: Exception => generateErrorReport(e) } 

You can see that there are only 4 commands: ui, new, list-template, shell and one meta command:

 case _ if Sbt.looksLikeAProject(new File(".")) => RebootToSbt(configuration, useArguments = true) 

This means that if you run the activator command in the project directory (and this is not ui , new , list-template , shell ), the activator will launch sbt with the command and argument that you pass to the activator. Thus, run , compile , stage are not activator commands, but sbt commands.

If you run the activator not in the project directory (and this is not ui , new , list-template , shell ), then it will show you some "help page"

The activator also allows you to pass java arguments that will be used to start the .jar activator - you can see it by checking the "activator.bat" file or the activator shell script.

SBT

You can find the sbt command link here: http://www.scala-sbt.org/0.13/docs/Command-Line-Reference.html

+5
source

I also cannot find a complete list of activator command parameters. The activator itself is not completely open and the official document does not provide much information.

But in order to give you a different angle, the activator was built on the basis of sbt. Therefore, the parameters of the sbt command must also be valid in the activator. See: http://www.scala-sbt.org/0.13/docs/Command-Line-Reference.html .

As you will see, some of the parameters of the activator command come directly from sbt. Besides this, the activator also has some configurable options, such as -jvm-debug and dist , as you list in your question.

Hope this helps you.

0
source

Source: https://habr.com/ru/post/1233227/


All Articles