Skip to content

Cheat Sheet

Useful commands

Jeka comes with predefined methods coming either from JkClass or built-in plugins.

  • jeka : Displays on console methods and options invokable from command line, along plugins available in the classpath.
  • jeka [pugin-name]#help : Displays on consoles all methods and option invokable for the specified plugin (e.g. jeka scaffold#help).
  • jeka intellij#iml : Generates iml file for Intellij. It is generated according the dependencies declared for this project.
  • jeka intellij#iml -JKC= : If the above fails cause your def classes do not compile, using -JKC= avoids def compilation phase.
  • jeka eclipse#files : Same purpose as above to generate metadata files for Eclipse.
  • jeka scaffold#run : Generates files for creating a basic Jeka project from scratch.
  • jeka scaffold#wrapper : Generates wrapper files (jekaw/jekaw.bat and bootstrap jar)
  • jeka scaffold#run java# : Generate files for creating a Jeka project for building a JVM language project

Useful standard options

You can add these options to you command line.

  • -kb=[KBeanName] : By default, Jeka instantiates the first KBean found under def directory to execute methods on. You can force to instantiate a specific class by passing its long or short name. If the class is already in classpath, then no def compilation occurs. Using simply -JKC= is equivalent to -JKC=JkClass which is the base class bundled in Jeka.
  • -lri : Displays runtime info. This will display on console meaningfull information about current Jeka version, Java version, base directory, download repository, classpath, ...
  • -lsu : Shows logs about jeka setup (compilation of def classes, plugin loading, ...).These informations are not logged by default.
  • -ls=BRACE : Alters console output by delimiting tasks with braces and mentioning the processing time for each.
  • -ls=DEBUG : Alters console output by showing the class name and line number from where the log has been emitted.
  • -lv : Alters console output by displaying trace logs (emitted by JkLog#trace)
  • -dcf : Force compilation of def classes, even if they are marked as up-to-date.

Change the JDK that Run Jeka

To determine the JDK to run upon, jeka looks in priority order at :7

  • JEKA_JDK environment variable ([JEKA_JDK]/bin/java must point on java executable)
  • JAVA_HOME environment variable

If none of these variables are present, jeka will run upon the java executable accessible from your PATH environment.

Change the Repository Jeka uses to Fetch Dependencies

By default, jeka fetch dependencies from maven central (https://repo.maven.apache.org/maven2).

You can select another default repository by setting the jeka.repos.download.url options. We recommend storing this value in your [USER DIR]/.jeka/options.properties file to be reused across projects.

For more details, see JkRepoFromOptions javadoc.