The java
commandlet allows to install and setup Java. Also it supports devon4j.
The arguments (devon java «args»
) are explained by the following table:
devon java
Argument(s) | Meaning |
---|---|
|
setup OpenJDK (install or update and verify), configurable via |
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 |
|
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." |
|
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.
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.