All Downloads are FREE. Search and download functionalities are using the official Maven repository.

restx.core.shell.app.man Maven / Gradle / Ivy

There is a newer version: 1.0
Show newest version
## app new

`app new` command let you create a new restx app.

It doesn't take any additional argument, it will ask for parameters to generate the app.

## app compile

Compile current application.

This command uses javac to compile your application classes located in `src/main/java` and put compiled classes in
`target/classes`.
It uses dependencies located in `target/dependency`.

Note: You need to be placed in a restx app root directory to run this command.

## app generate-start-script []

Generate a start script to run your application outside restx shell.

This can be useful for production, it let you avoid to have a jvm running for the shell (which is the case when you use
`app run`).

The command actually generates 2 scripts: `start.sh` for *nix and `start.bat` for windows.

You can optionally provide the fully qualified name of the main class, if you don't provide one restx will try to guess
it.

Note: You need to be placed in a restx app root directory to run this command.


## app run [--quiet] [--fg] [-D=] [--mode=] [|]

Run a restx application.

Running a restx app is simply launching a java process taking all jars from `target/dependency` + classes
from `target/classes` in classpath.

It will run `deps install` if needed (if `md.restx.json` file has changed since last `deps install` call).
If you prefer to use another dependency management mechanism, you just need to fill the `target/dependency` directory
with all your dependencies jars before calling app run.

Your app will be started in different modes depending on your working directory typology :
- If sources are not found (in src/main/java), app will be forced in prod mode (no auto/hot compile).
- If sources are found, main class will be compiled before running the app.
  It compiles only the main class because restx has auto compile feature, except in prod mode where it will compile all
  classes as with `app compile`.

### Options

`--quiet`
  do not show output in console. This is sometimes useful for performance reasons, console writing is synchronous and
  can thus slow down your application, especially if you run through a slow ssh connection.

`--fg`
  by default app run the application in a separate process in the background. and wait for a `stop` command on the
  shell input. Sometimes you may prefer to join the sub process and do not wait for a stop command (eg in situations
  where you don't want to use shell input, like when running a restx app through batch script).

`-D=`
  allow to set system properties for the app, which are simply passed as vm options to the sub process

`--mode=`
  an easy way to set restx mode.
  It has the same effect as running -Drestx.mode=, except that in prod it also influence the way compilation is
  done (see above).

`|`
  Either the fully qualified name of the main class to run,
  or a restx app directory name (restx app are located into your `${restx.home}/apps/` directory).
  Main class will be retrieved :
  - If provided as argument (main.class.Name)
  - By looking into md.restx.json file ("manifest.main.classname" property)
  - By guessing it from source files


## app archive 

Create a restx archive from current working directory.
A restx archive is a standard jar archive, with source (including assets) ressources located in `META-INF/restx/app/`
folder.

Purpose of these archives is to be easily deployable with the `app grab` command.
They embed a restx module descriptor which will be used to provision dependencies before launching the restx app.

``
  Path to generated restx archive vile.

## app grab  []

Grab and unpack a restx archive/project into a directory, then change restx shell to this directory in order
to easily chain this command with `app run` command.

A restx archive is a standard jar archive, with sources (including assets) ressources located in `META-INF/restx/app/`
folder.
Note that a restx archive MUST contain a `META-INF/restx/app/md.restx.json` file in order to be considered valid.

``
  different types of coordinates are available :
  - GIT url (pattern : [#], for instance `[email protected]:foo/bar.git#v1.0`)
    Git repository will be cloned inside `destination` directory.
    Needs git executable to be available in your PATH.
  - Http/https url of a Restx archive.
    Archive classes will be unpacked into `/target/restx/classes/` directory,
    and `META-INF/restx/app/*` (including md.restx.json file) will be chrooted into `destination` directory.
  - GAV coordinates (pattern : ::)
    Archive classes will be unpacked into `/target/restx/classes/` directory,
    and `META-INF/restx/app/*` (including md.restx.json file) will be chrooted into `destination` directory.

``
  destination where will reside your grabbed restx application working directory.
  If not set, `~/.restx/apps//` will be used.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy