Skip to main content

Install Command

A part from URL and path based executions, an artifact should be installed to be run. Installation can be auto fired when you first execute the artifact (you will be prompted to install the artifact) or manually using the install command. Note that when you run directly a jar file as a path or url, the artifact will not be installed! to install an application just type

nuts install <your-artifact-query-here>

For example

nuts install net.thevpc.app:netbeans-launcher#1.2.2

you may use any artifact query (see search command section) to install a command.

nuts install net.thevpc.app:netbeans-*

if the artifact is already installed, you should use the force flag (--force)

nuts install net.thevpc.app:netbeans-launcher#1.2.2
#this second time we have to force install
nuts install -- force net.thevpc.app:netbeans-launcher#1.2.2

One exception is when you want to switch between multiple versions installed to set the default one, you can omit the --force flag. Actually, when multiple version of the same artifact are installed all of them are executable directly by specifying the right version. When you specify no version, the default one is selected for you. And to make is simple, the default one is the last one you ran an install command for it.

me@linux:~> nuts install net.thevpc.app:netbeans-launcher#1.2.2
me@linux:~> nuts netbeans-launcher
1.2.2
me@linux:~> nuts install net.thevpc.app:netbeans-launcher#1.2.1
me@linux:~> nuts netbeans-launcher
1.2.1
me@linux:~> nuts install net.thevpc.app:netbeans-launcher#1.2.2
1.2.2

You can find all installed artifacts using 'nuts search --installed' command

Purpose

The install command is used to install or reinstall packages.

  • A+B : read A main package and B dependencies
  • A+B? : ask, if confirmed, read A main package and B dependencies.
  • require : deploy package as 'required'
  • install : deploy package as 'installed'
  • nothing : do nothing

The available strategies are

  • require : install the package and all of its dependencies as required class installed package
  • install : install the package and all of its dependencies as first class installed package
  • reinstall : re-install or re-required the package and all of its dependencies
  • repair : repair (re-install or re-required) the given dependency

"required class installed package" can be removed (uninstalled automatically by nuts when none of the depending package is nomore installed.

Status/Strategy -> StatusREQUIREINSTALLREINSTALLREPAIR
NOT_INSTALLEDREQUIREDINSTALLEDINSTALLED?ERROR
INSTALLEDINSTALLED REQUIREDINSTALLED?INSTALLEDINSTALLED
INSTALLED REQUIREDINSTALLED REQUIREDINSTALLED REQUIREDINSTALLED REQUIREDINSTALLED REQUIRED
REQUIREDREQUIREDINSTALLED REQUIREDREQUIREDREQUIRED
INSTALLED OBSOLETEINSTALLED REQUIRED OBSOLETEINSTALLEDINSTALLEDINSTALLED
INSTALLED REQUIRED OBSOLETEINSTALLED REQUIREDINSTALLED REQUIREDINSTALLED REQUIREDINSTALLED REQUIRED
REQUIRED OBSOLETEREQUIRED OBSOLETEINSTALLED REQUIREDREQUIREDREQUIRED
Status/Strategy -> actionREQUIREINSTALLREINSTALLREPAIR
NOT_INSTALLEDrequire+requireinstall+requireinstall+require?error
INSTALLEDnothing+nothinginstall+require?install+requireinstall+nothing
INSTALLED REQUIREDnothing+nothinginstall+require?install+requireinstall+nothing
REQUIREDnothing+nothinginstall+nothingrequire+requirerequire+nothing
INSTALLED OBSOLETEinstall+requireinstall+requireinstall+requireinstall+nothing
INSTALLED REQUIRED OBSOLETEinstall+requireinstall+requireinstall+requireinstall+nothing
REQUIRED OBSOLETErequire+requireinstall+requirerequire+requirerequire+nothing