Devon CLI

The devonfw-ide is shipped with a central command devon. The setup will automatically register this command so it is available in any shell on your system. This page describes the Command Line Interface (CLI) of this command.

Devon

Without any argument the devon command will determine your DEVON_IDE_HOME and setup your environment variables automatically. In case you are not inside of a devonfw-ide folder the command will echo a message and do nothing.

[/]$ devon
You are not inside a devon IDE installation: /
[/]$ cd /projects/my-project/workspaces/test/my-git-repo
[my-git-repo]$ devon
devonfw-ide has environment variables have been set for /projects/my-project in workspace main
[my-git-repo]$ echo $DEVON_IDE_HOME
/projects/devon
[my-git-repo]$ echo $JAVA_HOME
/projects/my-project/software/java

Commandlets

The devon command supports a pluggable set of commandlets. Such commandlet is provided as first argument to the devon command and may take additional arguments:

devon «commandlet» [«arg»]*

Technically, a commandlet is a bash script located in $DEVON_IDE_HOME/scripts/command. So if you want to integrate another tool with devonfw-ide we are awaiting your pull-request. Every commandlet takes the following generic arguments:

Table 2. Generic arguments of every commandlet
Argument(s) Meaning

-b or --batch

run in non-interactive mode (do not ask any questions).

-q or --quiet

be quiet and avoid output.

Command-wrapper

For many commandlets the devon command acts as a wrapper. Similar to mvnw or gradlew you can use it as a proxy command. Therefore devon mvn clean install will be the same as mvn clean install. The benefit when using devon as wrapper is that it will even work when the command (mvn, node, npm, etc.) is not on your PATH variable or even not yet installed. We see the main benefit in this for writing portable scripts that you may commit to your git repository and that will then run everywhere and will lazily install the required tools on the fly. In your daily usage you can and surely should avoid to always type devon as prefix to every command. However, when you automate and want to avoid "command not found" errors, you can simply prefix the command with devon.

Commandlet overview

The following commandlets are currently available:

build

The build commandlet is an abstraction of build systems like maven, gradle, yarn, npm, etc. It will auto-detect your build-system (via existence of files like pom.xml, package.json, etc.). According to this detection it will simply delegate to the according commandlet of the specific build system. If that build-system is not yet available it will be downloaded and installed automatically.

So devon build allows users to build any project without bothering about the build-system. Further specific build options can be configured per project. This makes devon build a universal part of every definition of done. Before pushing your changes, please always run the following command to verify the build:

devon build

You may also supply additional arguments as devon build «args». This will simply delegate these arguments to the detected build command (e.g. call mvn «args»).

docker

The docker commandlet allows to install and use docker. On Windows WSL 2(Windows Subsystem for Linux) has to be installed properly as a prerequisite.

ATTENTION: Currently this feature is new and therefore experimental. It may change in incompatible ways in the next releases until we reach a stable state. We hope that all is working fine for you. However, do not expect everything to work out of the box. In case you are facing issues (e.g. network problems with Cisco AnyConnect, etc.) please give us feedback so we can improve.

The arguments (devon docker «args») are explained by the following table:

Table 3. Usage of devon docker
Argument(s) Meaning

setup

setup Docker (install and verify) as per above flow.

«args»

call docker with the specified arguments. Call docker help for details or use docker directly as preferred." («args»)

setup

The docker commandlet will install docker automatically. Please note that besides the sandbox concept of devonfw-ide this is a global installation on your system. When uninstalling devonfw-ide, you may have to manually uninstall docker and kubernetes if you do not need it anymore.

requirements

Running docker and especially kubernetes on your machine in the background will require quite some resources. This will allocate at least 2GB of additional RAM.

You will need at least 8GB of total RAM while we recommend to use 16GB+.

You may also tune and scale it to your needs. When using Docker Desktop (Windows or MacOS) simply go to the resources tab in the settings. It will depend on your usage frequency if you want to have it running in the background all the time. This is a balance between resource utilization and convenience. If you use docker and kubernetes on your local machine on a daily basis this makes sense.

In case you only use docker rarely, you can save resources by stopping it when not needed after it has been installed.

Windows and Mac

To enable or disable autostart, you can launch Docker Desktop on Windows or MacOS got to the Preferences (gear icon in the title bar). Then in the General tab you can check or uncheck the option Start Docker Desktop when you login (see also here). When autostart is disabled and you launch Docker Desktop it will notice and ask your to start the service or do this automatically for you. On Windows you can also manually tweak this:

  • Hit [windows][r]

  • Enter services.msc

  • Confirm with OK

  • In the services app search for the Docker Desktop Service in the list and select it.

  • Now you can start or stop the service by clicking on the according link text.

  • Also when right clicking on Docker Desktop Service and selecting Options from the context-menu, you can change the start type to automatic or manual.

Mac A1

In case you have a new Mac with A1 CPU, we automatically download and install the according ARM version of Docker Desktop for Mac. However, if you use docker and search for images you may end up with errors like:

docker: no matching manifest for linux/arm64/v8 in the manifest list entries.

So with A1 CPU you may need to add --platform linux/x86_64 as option to your docker command to find the expected container image.

Linux

There is no Docker Desktop for Linux. As docker initially comes from the Linux world, it is easy to set it up on a Linux machine and use it from the commandline. Therefore we do not install a GUI for you in case you are a Linux user. In case you need a GUI for docker and kubernetes on Linux you can choose from the following options:

usage

Once installed via setup, you can run docker directly from any shell of your OS directly. Run docker help to get started and use the online documentations and resources on the web to get familiar with docker. It is not our intention to repeat this here.

Please note that the docker commandlet is a command wrapper.

eclipse

The eclipse commandlet allows to install, configure, and launch the Eclipse IDE. To launch Eclipse for your current workspace and devonfw-ide installation simply run: devon eclipse

You may also supply additional arguments as devon eclipse «args». These are explained by the following table:

Table 4. Usage of devon eclipse
Argument(s) Meaning

--all

if provided as first arg then to command will be invoked for each workspace

setup

setup Eclipse (install or update)

add-plugin «id» [«url»]

install an additional plugin

run

launch Eclipse (default if no argument is given)

start

same as run

ws-up[date]

update workspace

ws-re[verse]

reverse merge changes from workspace into settings

ws-reverse-add

reverse merge adding new properties

create-script

create launch script for this IDE, your current workspace and your OS

There are variables that can be used for Eclipse. These are explained by the following table:

Table 5. Variables of devonfw-ide for Eclipse
Variable Default-Value Meaning

ECLIPSE_VERSION

2020-12

The version of the tool Eclipse to install and use.

ECLIPSE_EDITION_TYPE

java

The edition of the tool Eclipse to install and use. You can choose betwenn 'java' for standard edition or 'jee' for enterprise edition.

plugins

To be productive with Eclipse you need plugins. Of course devonfw-ide can automate this for your: In your settings git repository create a folder eclipse/plugins (click on this link to see more examples and see which plugins come by default). Here you can create a properties file for each plugin. This is an example tmterminal.properties:

plugin_url=http://download.eclipse.org/tm/terminal/marketplace
plugin_id=org.eclipse.tm.terminal.feature.feature.group,org.eclipse.tm.terminal.view.feature.feature.group,org.eclipse.tm.terminal.control.feature.feature.group,org.eclipse.tm.terminal.connector.ssh.feature.feature.group,org.eclipse.tm.terminal.connector.telnet.feature.feature.group
plugin_active=true

The variables are defined as follows:

  • plugin_url defines the URL of the Eclipse update site of the plugin

  • plugin_id defines the feature group ID(s) to install. To install multiple features/plugins provide a coma-separated list of IDs. If you want to customize devonfw-ide with new plugins you can first install them manually and then go to About Eclipse > Installation Details then you can filter for your newly installed plugin and find the values in the Id column. Copy & paste them from here to make up your own custom config.

  • plugin_active is an optional parameter. If it is true (default) the plugin will be installed automatically during the project setup for all developers in your team. Otherwise, developers can still install the plugin manually via devon eclipse add-plugin «plugin-name» from the config file settings/eclipse/plugins/«plugin-name».properties. See the settings/eclipse/plugins folder for possible values of «plugin-name».

In general you should try to stick with the configuration pre-defined by your project. But some plugins may be considered as personal flavor and are typically not predefined by the project config. This e.g. applies for devstyle that allows a real dark mode for eclipse and tunes the theming and layout of Eclipse in general. Such plugins should be shipped with your settings as described above with plugin_active=false allowing you to easily install it manually.

As the maintainer of the settings for your project you should avoid to ship too many plugins that may waste resources but are not used by every developer. By configuring additional plugins with plugin_active=false you can give your developers the freedom to install some additional plugins easily.

legacy plugin config

For downward compatibility we still support the deprecated legacy configuration if the folder settings/eclipse/plugins does not exist: The project configuration typically defines the plugins that will be installed via ECLIPSE_PLUGINS variable. Otherwise defaults from this eclipse commandlet will apply. Be aware that this comes at your own risk and sometimes plugins can conflict and break your IDE.

Here is an example how a project can configure the plugins in its devon.properties inside the settings:

ECLIPSE_PLUGINS=("AnyEditTools.feature.group" "https://raw.githubusercontent.com/iloveeclipse/plugins/latest/" "com.ess.regexutil.feature.group" "http://regex-util.sourceforge.net/update/")

For the above listed plugins you can also use the short form:

ECLIPSE_PLUGINS=("anyedit" "" "regexutil" "")

Of course you may also mix plugin IDs with fully qualified plugins.

dictionary

Eclipse already comes with a buid-in spellchecker. This is very helpful when writing comments. The default settings of devonfw-ide ship with a project specific dictionary file and according configurations to enable spellchecking and configuring this dictionary. When typing JavaDoc, inline comments or other texts the spellchecker will underline unknown words in red. If your cursor is located at such a word you can hit [Ctrl][1] to get a context menu with additional options. There you can either choose similar correct words to correct a typo or you may even add the word (maybe a new buisness term) to your local dictionary.

"Eclipse spellchecker”

In the latter case, you should commit the changes to your settings so that it will be available to your entire team. For further details about comitting changes to the settings please consult the admin usage.

non-english dictionary

In case your project has to write documentation or text in languages other than English, you might want to prefill your project dictionary for that language. Here we collect a list of such dictionaries that you can download and merge into your project dictionary:

gradle

The gradle commandlet allows to install, configure, and launch gradle. It is similar to gradle-wrapper. So calling devon gradle «args» is more or less the same as calling gradle «args» but with the benefit that the version of gradle preferred by your project is used (and will be installed if not yet available).

The arguments (devon gradle «args») are explained by the following table:

Table 6. Usage of devon gradle
Argument(s) Meaning

setup

setup gradle (install and verify), configurable via GRADLE_VERSION

«args»

run gradle with the given arguments («args»)

help

The help commandlet provides help for the CLI.

Table 7. Usage of devon help
Argument(s) Meaning

Print general help

«command»

Print help for the commandlet «command».

Please note that devon help «command» will do the same as devon «command» help.

ide

The ide commandlet manages your devonfw-ide. You need to supply additional arguments as devon ide «args». These are explained by the following table:

Table 8. Usage of devon ide
Argument(s) Meaning

setup [«SETTINGS_URL»]

setup devonfw-ide (cloning the settings from the given URL, optionally from specific branch URL#branch)

update [«package»]

update devonfw-ide

update scripts [to «version»]

update devonfw-ide

uninstall

uninstall devonfw-ide (if you want remote it entirely from your system)

setup

Run devon ide setup to initially setup your devonfw-ide. It is recommended to run the setup script in the top-level directory ($DEVON_IDE_HOME). However, in case you want to skip some system specific integrations, you may also run this command directly instead. The setup only needs to be called once after a new devonfw-ide instance has been created. It will follow this process:

  • install the devon command on your system (if not already installed).

  • clone the settings (you may provide a git URL directly as argument or you will be prompted for it).

  • install all required software from DEVON_IDE_TOOLS variable (if not already installed).

  • configure all these tools

  • create IDE launch scripts

  • perform OS specific system integration such as WindowsExplorer integration (only done from setup script and not from devon ide setup)

update

Run devon ide update to update your devonfw-ide. This will check for updates and install them automatically. The optinal extra argument («package») behaves as follows:

  • scripts: check if a new version of devonfw-ide-scripts is available. If so it will be downloaded and installed. As Windows is using file-locks, it is tricky to update a script while it is executed. Therefore, we update the scripts folder as an async background task and have to abort further processing at this point on windows as a workaround.

  • settings: update the settings (git pull).

  • software: update the software (e.g. if versions have changed via scripts or settings update).

  • projects: update the projects (checkout and import repositories into workspace/IDEs).

  • all: do all the above sequentially.

  • none: settings and software are updated by default if no extra argument is given. This is the regular usage for project developers. Only perform an update of scripts when you are requested to do so by your technical lead. Bigger projects especially need to test updates before rolling them out to the entire team. If developers always updated the latest release of the scripts which is released globally, some project functionality would break causing problems and extra efforts in the teams.

In order to update to a specific version of scripts an explicit version can be specified after the additional to argument:

devon ide update scripts to 3.1.99

The above example will update to the exact version 3.1.99 no matter if this is an upgrade or a downgrade of your current installed version. If you just use devon ide update scripts then the latest available version will be installed. In larger teams it is recommended to communicate exact version updates to avoid that a new release can interfere and break anything. Therefore, some pilot user will test a new version for the entire team and, only after a successful test, they will communicate to the team to update to that exact version by providing the complete command as in the above example.

uninstall

We hope you love devonfw-ide. However, if you don’t and want to get rid of it entirely and completely remove all integrations, you can use this command:

devon ide uninstall

This will remove devonfw-ide from all central places of your OS (user home directory such as scripts, .devon, .bashrc, as well as windows registry, etc.). However, it will not remove your current installations (or shared software folder). So after running this uninstall, simply remove your DEVON_IDE_HOME directory of all devonfw-ide installations and potential shared software folder. You may also want to clean up your ~/Downloads directory from files downloaded by devonfw-ide. We do not automate this as deleting a directory is a very simple manual step and we do not want to take responsibility for severe data loss if your workspaces contained valuable work.

intellij

The intellij commandlet allows to install, configure, and launch IntelliJ. To launch IntelliJ for your current workspace and devonfw-ide installation, simply run: devon intellij

You may also supply additional arguments as devon intellij «args». These are explained by the following table:

Table 9. Usage of devon intellij
Argument(s) Meaning

--all

if provided as first arg then to command will be invoked for each workspace

setup

setup IntelliJ (install or update)

add-plugin «id»

install an additional plugin

run

launch IntelliJ (default if no argument is given)

start

same as run

ws-up[date]

update workspace

ws-re[verse]

reverse merge changes from workspace into settings

ws-reverse-add

reverse merge adding new properties

create-script

create launch script for this IDE, your current workspace and your OS

There are variables that can be used for IntelliJ. These are explained by the following table:

Table 10. Variables of devonfw-ide for intelliJ
Variable Default-Value Meaning

INTELLIJ_VERSION

latest_tested_version

The version of the tool IntelliJ to install and use.

INTELLIJ_EDITION_TYPE

C

The edition of the tool IntelliJ to install and use. The value C mean Community edition and the value U mean Ultimate edition. The Ultimate edition requires a license. The user has to buy the license separately and it is not part of devonfw-ide. The devonfw-ide only supports download and installation.

plugins

To be productive with IntelliJ you need plugins. Of course devonfw-ide can automate this for your: In your settings git repository create a folder intellij/plugins (click this link to see more examples and see which plugins come by default). Here you can create a properties file for each plugin. This is an example scala.properties:

plugin_id=org.intellij.scala
plugin_active=false

The variables are defined as following:

  • plugin_id defines the unique ID of the plugin to install. If you want to customize devonfw-ide with new plugins use the search on https://plugins.jetbrains.com/idea_ce to find the plugin of your choice. Select the tab Versions and click on a version in the list. The plugin ID is displayed in the upper right corner. Copy & paste the ID from here to make up your own custom config.

  • plugin_active is an optional parameter. If it is true (default) the plugin will be installed automatically during the project setup for all developers in your team. Otherwise developers can still install the plugin manually via devon intellij add-plugin «plugin_id».

In general you should try to stick with the configuration pre-defined by your project. But some plugins may be considered as personal flavor and are typically not predefined by the project config. Such plugins should be shipped with your settings as described above with plugin_active=false allowing you to easily install it manually. Surely, you can easily add plugins via the UI of IntelliJ. However, be aware that some plugins may collect sensitive data or could introduce other vulnerabilities. So consider the governance of your project and talk to your technical lead before installing additional plugins that are not pre-defined in your settings.

As maintainer of the settings for your project you should avoid to ship too many plugins that may waste resources but are not used by every developer. By configuring additional plugins with plugin_active=false you can give your developers the freedom to install some additional plugins easily.

ionic

The ionic commandlet allows to install, configure, and launch ionic (ionic-cli). Calling devon ionic «args» is more or less the same as calling ionic «args» but with some advanced features and ensuring that ionic is properly set up for your project.

The arguments (devon ionic «args») are explained by the following table:

Table 11. Usage of devon ionic
Argument(s) Meaning

setup

setup yarn (install and verify), configurable via YARN_VERSION

create

Create a new devon4ng ionic project.

cicd «args»

generate cicd files for the currect devon4ng project

«args»

run ionic with the given arguments («args»)

jasypt

The jasypt commandlet allows to install jasypt and encrypt or decrept secrets using strong encryption given a secure masterpassword. See also devon4j password encryption guide for further details.

The arguments (devon jasypt «args») are explained by the following table:

Table 12. Usage of devon mvn
Argument(s) Meaning

setup

setup jasypt (install and verify), configurable via JASYPT_VERSION

encrypt

Encrypt a secret with a masterpassword

decrypt

Decrypt an encrypted secret with a masterpassword

example
devon jasypt encrypt
Enter masterpassword: master
Enter secret to encrypt/decrypt: secret

----ENVIRONMENT-----------------

Runtime: AdoptOpenJDK OpenJDK 64-Bit Server VM 11.0.9.1+1



----ARGUMENTS-------------------

input: secret
password: master
ivGeneratorClassName: org.jasypt.iv.RandomIvGenerator
algorithm: PBEWITHHMACSHA512ANDAES_256



----OUTPUT----------------------

fQPbaDd8wq0h0qOZw/AEKp2TD4Y07Y//M5PzaLgF3qL7YnBQjiGLtW8s5XkP3Ly9

devon jasypt decrypt
Enter masterpassword: master
Enter secret to encrypt/decrypt: fQPbaDd8wq0h0qOZw/AEKp2TD4Y07Y//M5PzaLgF3qL7YnBQjiGLtW8s5XkP3Ly9

----ENVIRONMENT-----------------

Runtime: AdoptOpenJDK OpenJDK 64-Bit Server VM 11.0.9.1+1



----ARGUMENTS-------------------

input: fQPbaDd8wq0h0qOZw/AEKp2TD4Y07Y//M5PzaLgF3qL7YnBQjiGLtW8s5XkP3Ly9
password: master
ivGeneratorClassName: org.jasypt.iv.RandomIvGenerator
algorithm: PBEWITHHMACSHA512ANDAES_256



----OUTPUT----------------------

secret

java

The java commandlet allows to install and setup Java. Also it supports devon4j. The arguments (devon java «args») are explained by the following table:

Table 13. Usage of devon java
Argument(s) Meaning

setup

setup OpenJDK (install or update and verify), configurable via JAVA_VERSION (e.g. 8u242b08 or 11.0.6_10)

create «args»

create a new Java project based on devon4j application template. If a single argument is provided, this is the package name and is automatically split into groupId and artifactId. Use -DdbType=«db» to choose the database (hana, oracle, mssql, postgresql, mariadb, mysql, h2, hsqldb). Any option starting with dash is passed as is."

migrate [from «version»] [single]

migrate a devon4j project to the latest version. If for some reasons the current devonfw version (e.g. oasp4j:2.6.0) can not be auto-detected you may provide it manually after the 'from' argument. Also the 'single' option allows to migrate only to the next available version."

cicd «args»

generate cicd files for the currect devon4java project

create

Examples for create a new devon4j application:

devon java create com.example.domain.myapp

Will create an app with package com.example.domain.myapp, groupId com.example.domain, artifactId myapp, version 1.0.0-SNAPSHOT, and h2 database.

devon java create -Dversion=0.0.1-alpha1 com.example.domain.myapp

Will create an app with package com.example.domain.myapp, groupId com.example.domain, artifactId myapp, version 0.0.1-alpha1, and h2 database.

devon java create com.example.domain.myapp com.example.group

Will create an app with package com.example.domain.myapp, groupId com.example.group, artifactId myapp, version 1.0.0-SNAPSHOT, and h2 database.

devon java create com.example.domain.myapp com.example.group demo-app

Will create an app with package com.example.domain.myapp, groupId com.example.group, artifactId demo-app, version 1.0.0-SNAPSHOT, and h2 database.

devon java create com.example.domain.myapp -DartifactId=demo-app -DdbType=hana

Will create an app with package com.example.domain.myapp, groupId com.example.group, artifactId demo-app, version 1.0.0-SNAPSHOT, and SAP hana database.

devon java create com.example.domain.myapp -DdbType=oracle -Dversion=0.0.1 com.example.group -Dbatch=batch

Will create an app with package com.example.domain.myapp, groupId com.example.group, artifactId myapp, version 0.0.1, oracle database, and with a batch module.

migrate

Example for migrating a devon4j application:

devon java migrate

Will migrate current devon4j application to the latest version available.

jenkins

The jenkins commandlet allows to install, configure, and launch Jenkins.

Table 14. Usage of devon jenkins
Argument(s) Meaning

setup

Setup Jenkins (install and verify)

start

Start your local Jenkins server

stop

Stop your local Jenkins server

add

Add current project as CI job to your local Jenkins

kubernetes

The kubectl commandlet allows to install and use kubernetes. On Windows WSL 2(Windows Subsystem for Linux) has to be installed properly as a prerequisite. The setup on windows will then install kubernetes with K3D. K3D will create a cluster with a single node with a default name as "devonfw-cluster"

ATTENTION: Currently this feature is new and therefore experimental. It may change in incompatible ways in the next releases until we reach a stable state. We hope that all is working fine for you. However, do not expect everything to work out of the box. In case you are facing issues (e.g. network problems with Cisco AnyConnect, etc.) please give us feedback so we can improve.

The arguments (devon kubectl «args») are explained by the following table:

Table 15. Usage of devon kubectl
Argument(s) Meaning

setup

setup Kubernetes (install and verify) as per above flow.

«args»

call kubectl with the specified arguments. Call kubectl help for details or use kubectl directly as preferred.

setup

Please note that on Windows and MacOS kubernetes support comes together with Docker Desktop that is installed via docker commandlet. When you have installed and launched Docker Desktop, you can once enable kubernetes in the Preferences.

On Linux however, kubernetes is installed separately by this commandlet.

usage

Once installed via setup, you can run kubectl directly from any shell of your OS directly. Run kubectl help to get started and use the online documentations and resources on the web to get familiar with kubernetes. It is not our intention to repeat this here.

Please note that the kubectl commandlet is a command wrapper.

mvn

The mvn commandlet allows to install, configure, and launch maven. It is similar to maven-wrapper and mdub. So calling devon mvn «args» is more or less the same as calling mvn «args» but with the benefit that the version of maven preferred by your project is used (and will be installed if not yet available).

The arguments (devon mvn «args») are explained by the following table:

Table 16. Usage of devon mvn
Argument(s) Meaning

run default build, configurable via MVN_BUILD_OPTS

setup

setup Maven (install and verify), configurable via MAVEN_VERSION

get-version

Print the version of your current project. Will consolidate the version for multi-module projects ignoring dev[-SNAPSHOT] versions and fail on mixed versions.

set-version «nv» [«cv»]

Set the version of your current project to «nv» (assuming your current version is «cv»).

check-no-snapshots

Check if no «version»-SNAPSHOT dependencies are used.

check-top-level-project

Check if you are running on a top-level project or fail if in a module or no maven project at all.

release

Start a clean deploy release build, configurable via MVN_RELEASE_OPTS

«args»

run maven with the given arguments («args»)

ng

The ng commandlet allows to install, configure, and launch ng (angular-cli). Calling devon ng «args» is more or less the same as calling ng «args» but with some advanced features and ensuring that ng is properly set up for your project.

The arguments (devon ng «args») are explained by the following table:

Table 17. Usage of devon ng
Argument(s) Meaning

setup

setup yarn (install and verify), configurable via NG_VERSION

create

Create a new devon4ng project.

cicd «args»

generate cicd files for the currect devon4ng project

«args»

run ng with the given arguments («args»)

node

The node commandlet allows to install and setup node.js. The arguments (devon node «args») are explained by the following table:

Table 18. Usage of devon node
Argument(s) Meaning

setup

setup node.js (install and verify), configurable via NODE_VERSION

create «name» [«args»]

create a new devon4node application (same as devon4node new)

generate «s» [«args»]

generate devon4node components using the schematic «s» (same as devon4node generate)

db «c» [«args»]

execute a TypeORM command «c» (same as devon4node db)

cicd «args»

generate cicd files for the currect devon4node project

«args»

call NodeJS with the specified arguments

npm

The npm commandlet allows to install, configure, and launch npm. Calling devon npm «args» is more or less the same as calling npm «args» but with the benefit that the version of npm preferred by your project is used (and will be installed if not yet available).

The arguments (devon npm «args») are explained by the following table:

Table 19. Usage of devon npm
Argument(s) Meaning

run default build, configurable via NPM_BUILD_OPTS

setup

setup NPM (install and verify), configurable via NPM_VERSION

get-version

print the version of your current project

set-version «nv» [«cv»]

set the version of your current project to «nv» (assuming your current version is «cv»)

check-top-level-project

check if you are running on a top-level project or fail if in a module or no NPM project at all

release

Start a clean deploy release build, configurable via NPM_RELEASE_OPTS

«args»

run NPM with the given arguments («args»)

release

Create a release in a standardized way including the following steps:

  • verify the current project (no local changes, etc.)

  • warn if «version»-SNAPSHOT dependencies are used

  • determine «version» (if currently «version»-SNAPSHOT) and print out release information.

  • ask user for confirmation

  • bump release to «version» in build configuration (e.g. pom.xml files)

  • commit the change

  • create annotated tag for your release as release/«version»

  • invoke deployment on build-system

  • set next version as («version»+1)-SNAPSHOT in build configuration (e.g. pom.xml files)

  • commit the change

  • push your changes

Table 20. Usage of devon java
Argument(s) Meaning

…​

any optional argument will directly be passed to the actual command to build the deployment

Build-Tools

This release commandlet utilizes the build commandlet to support mutliple build-tools such as maven, gradle, or npm. Each of those commandlets should respect the variable «TOOL»_RELEASE_OPTS to customize the parameters for the release build.

So e.g. if a pom.xml is detected, maven will be used. In this example the variable MVN_RELEASE_OPTS is used that defaults to clean deploy -Dchangelist= -Pdeploy. If you provide a specific argument this will be passed additionally. So if you invoke the command devon release -P myProfile, the above step invoke deployment on build-system would technically call this:

mvn clean deploy -Dchangelist= -Pdeploy -P myProfile

Please also note that it is very tricky to determine and modify the version of a project in a fully generic way. Even though we try our best to support different scenarios, we can not ensure this is working for edge-cases. Therefore, we strongly encourage to follow best practices such as ci-friendly maven. Further, sticking to the defaults and follow the devonfw standard to name the profile for custom goals in deployment simply deploy is recommended.

sonar

The sonar commandlet allows to install, configure, and launch SonarQube.

Table 21. Usage of devon sonar
Argument(s) Meaning

setup

Setup SonarQube (install and verify)

start

Start your local SonarQube server

stop

Stop your local SonarQube server

analyze

Analyze current project with SonarQube

vscode

The vscode commandlet allows to install, configure, and launch Visual Studio Code. To launch VSCode for your current workspace and devonfw-ide installation, simply run: devon vscode

You may also supply additional arguments as devon vscode «args». These are explained by the following table:

Table 22. Usage of devon vscode
Argument(s) Meaning

--all

if provided as first arg then to command will be invoked for each workspace

setup

setup VSCode (install or update)

add-plugin «id»

install an additional plugin (extension)

run

launch VSCode (default if no argument is given)

start

same as run

ws-up[date]

update workspace

ws-re[verse]

reverse merge changes from workspace into settings

ws-reverse-add

reverse merge adding new properties

create-script

create launch script for this IDE, your current workspace and your OS

plugins

To be productive with VS Code you need plugins (called extensions in VS Code). Of course devonfw-ide can automate this for your: In your settings git repository create a folder vscode/plugins (click this link to see more examples and see which plugins come by default). Here you can create a properties file for each plugin. This is an example devonfw-extension-pack.properties:

plugin_id=devonfw.devonfw-extension-pack
plugin_active=true

The variables are defined as following:

  • plugin_id defines the unique ID of the plugin to install. If you want to customize devonfw-ide with new plugins click on Extensions at the bottom of the left navigation icon bar in VS code. Then use the search to find the plugin of your choice. If you click on it the plugin ID is displayed in grey beside the official title at the top of the plugin details page. Copy & paste the ID from here to make up your own custom config.

  • plugin_active is an optional parameter. If it is true (default) the plugin will be installed automatically during the project setup for all developers in your team. Otherwise developers can still install the plugin manually via devon vscode add-plugin «plugin-name» from the config file settings/vscode/plugins/«plugin-name».properties. See the settings/vscode/plugins folder for possible values of «plugin-name».

In general you should try to stick with the configuration pre-defined by your project. But some plugins may be considered as personal flavor and are typically not predefined by the project config. Such plugins should be shipped with your settings as described above with plugin_active=false allowing you to easily install it manually. Surely, you can easily add plugins via the UI of VS code. However, be aware that some plugins may collect sensitive data or could introduce other vulnerabilities. So consider the governance of your project and talk to your technical lead before installing additional plugins that are not pre-defined in your settings.

As maintainer of the settings for your project you should avoid to ship too many plugins that may waste resources but are not used by every developer. By configuring additional plugins with plugin_active=false you can give your developers the freedom to install some additional plugins easily.

cleaning plugins on update

If you want to striclty manage the plugins for VS code in your project, you can create or edit the file settings/vscode/plugins in your settings and add this variable:

clean_plugins_on_update=true

This will wipe all plugins when an update of VS code is performed (e.g. via devon ide update) and reinstall all configured plugins. While this gives you more control over the governance of the plugins and allows to remove a plugin later during project lifecycle. However, this will delete all manually installed plugins automatically without asking.

yarn

The yarn commandlet allows to install, configure, and launch npm. Calling devon yarn «args» is more or less the same as calling yarn «args» but with the benefit that the version of npm preferred by your project is used (and will be installed if not yet available).

The arguments (devon yarn «args») are explained by the following table:

Table 23. Usage of devon yarn
Argument(s) Meaning

run default build, configurable via YARN_BUILD_OPTS

setup

setup yarn (install and verify), configurable via YARN_VERSION

get-version

print the version of your current project

set-version «nv» [«cv»]

set the version of your current project to «nv» (assuming your current version is «cv»)

check-top-level-project

check if you are running on a top-level project or fail if in a module or no NPM project at all

release

start a clean deploy release build, configurable via YARN_RELEASE_OPTS

«args»

run yarn with the given arguments («args»)

Last updated 2021-09-24 04:39:47 UTC