Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 3.32 KB

java.asciidoc

File metadata and controls

59 lines (47 loc) · 3.32 KB
Table of Contents

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 1. 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 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 current devon4java project

Since 2021.12.003 an extra version of Java can be configured via EXTRA_JAVA_VERSION variable. This can be used to launch your IDE with a different (newer) version of Java but keeping the build of your project stable.

create

Examples for create a new devon4j application:

devon java create com.mycustomer.myapplication

Will create an app with package com.mycustomer.myapplication, groupId com.mycustomer, artifactId myapplication, version 1.0.0-SNAPSHOT, and h2 database.

devon java create -Dversion=0.0.1-alpha1 com.mycustomer.myapplication

Will create an app with package com.mycustomer.myapplication, groupId com.mycustomer, artifactId myapplication, version 0.0.1-alpha1, and h2 database.

devon java create com.mycustomer.myapplication com.my-customer

Will create an app with package com.mycustomer.myapplication, groupId com.my-customer, artifactId myapplication, version 1.0.0-SNAPSHOT, and h2 database.

devon java create com.mycustomer.myapplication com.my-customer my-application

Will create an app with package com.mycustomer.myapplication, groupId com.my-customer, artifactId my-application, version 1.0.0-SNAPSHOT, and h2 database.

devon java create com.mycustomer.myapplication -DartifactId=my-app -DdbType=hana

Will create an app with package com.mycustomer.myapplication, groupId com.mycustomer, artifactId my-app, version 1.0.0-SNAPSHOT, and SAP hana database.

devon java create com.mycustomer.myapplication -DdbType=oracle -Dversion=0.0.1 com.my-customer -Dbatch=batch

Will create an app with package com.mycustomer.myapplication, groupId com.my-customer, 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.