Skip to content



Properties are pairs of String key-value that are used across Jeka system. They typically carry urls, local paths, tool versions, or credentials.

Properties can be defined at different levels, in order of precedence :

  • System properties : Properties can be defined using system properties as -DpropertyName=value. System properties can be injected from the Jeka command line.
  • OS environment variables : Properties can also be defined as OS environment variables.
  • Project : Defined in [Project Root]/ Typically used to store tool versions (e.g. jeka.kotlin.version=1.5.21).
  • Global : Defined in the [User Home]/.jeka/ file. Typically used to define urls, local paths, and credentials.

Properties inherit from project properties defined in project parent folders (if extant).

Here, project2 will inherit properties defined in project1/jeka/ :

   + project2   (sub-project)


Properties support interpolation via ${}tokens.

For example, if we define the following properties : foo=fooValue and bar=bar ${foo} then JkProperties.get("bar") will return 'bar fooValue'.

Standard properties

  • jeka.jdk.X= location of the JDK version X (e.g. jeka.jdk.11=/my/java/jdk11). It is used to compile projects when project JVM target version differs from Jeka running version.
  • jeka.kotlin.version : Version of Kotlin used to compile both def and Kotlin project sources.
  • : Target JVM version for compiled files.
  • jeka.classpath.inject: Additional dependencies that will be added to the JeKa classpath. We can specify many dependencies separated by <space>. It can be either Maven coordinates or file paths. If a file path is relative, it is resolved upon project base dir (could be distinct from working dir). Example : jeka.classpath.inject=dev.jeka:springboot-plugin ../other-project/jeka/output/other-project.jar
  • jeka.default.kbean: The KBean to use when omitting mentioning KBean prefix (or using kb# prefix) in command or field assignment. Example: declaring jeka.default.kbean=myBean, makes the following expressions equivalent : myBean#run, #run, and kb#run.

Command shorthands

  • define an alias that can be substituted for its value in the command line using the : symbol. Example : jeka.cmd.myBuild=${} sonarqube#run jacoco# allows you to simply execute jeka :myBuild.
  • jeka.cmd._append= will append the argument to every Jeka execution command. Example : jeka.cmd._append=@dev.jeka:springboot-plugin will add springboot plugin to Jeka classpath for each execution. This properties can be splitted when argument line becomes to long. In fact, every properties starting with jeka.cmd._append will be taken in account to assemble the extra command line arguments. For example, we can define jeka.cmd._append.0=, jeka.cmd._append.1=, and so on.


Command shorthands are a really powerful mechanism for getting rid of build classes. Many projects can be built using properties only !


The repositories used to download and publish artifacts can be defined using properties. The download repositories are set using the property, while the publish repository is defined using jeka.repos.publish.

Use JkRepoFromProperties class to get the repositories defined by properties.


By default, when no repository is configured, artifacts are downloaded on Maven Central repo.

Using single repo

Using multiple repos, file://path/to/a/local/repo 

Using single repo with credentials

Specifying http headers to include in each request towards the repo

Same for publish repo

jeka.repos.publish.password=myPassword XHrU8hHKJHJ454==67g

For convenience, we can define multiple repositories and reference them using aliases


jeka.repos.myRepo2.password=myPassword2, myRepo2

Aliases are predefined for Maven Central and Jeka GitHub Repos, mavenCentral, jekaGithub

KBean field value injection

If a property is named as xxx#yyyyy then Jeka will try to inject its value in public field yyyyy of KBean xxx.




There is a slight difference between using -D@project.test.skip=true and @project.test.skip=true in the command line.
For the former, the field is injected via system properties, this means that for multi-modules projects, the value will be injected on every Jeka module. For the latter, the value will be injected only on the root module.