Prerequisites

This tutorial requires at least JDK 11 and Maven 3.6.0.

Please verify with
mvn --version.

For example:

harald@gandalf:~[513] mvn --version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/java/maven
Java version: 13.0.2, vendor: Oracle Corporation, runtime: /localhome/java/jdk-13.0.2
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.3.0-26-generic", arch: "amd64", family: "unix"

The tutorial consists of 2 parts:

  1. creating a wurblet
  2. generating code with that wurblet

To avoid redundancy we’re using a multi-module maven project with a separate maven module for each part.

Let’s begin with the parent pom.xml:



  4.0.0

  com.example
  wurbelizer-tutorial
  1.0-SNAPSHOT
  pom

  Tutorial Parent
  Parent pom.xml for the Wurbelizer tutorial

  
    UTF-8
    UTF-8
    11.3.0.1
  

  
    wurblets

  

  
    
      
        
          org.wurbelizer
          wurbelizer-maven-plugin
          ${wurbelizer.version}
        
        
          org.apache.maven.plugins
          maven-compiler-plugin
          3.8.1
          
            11
          
        
      
    
  


Notice that the second module is still disabled.

The plugin management defines the language level (in this case 11) and the wurbelizer plugin. Further information about its usage can be found here.

In the next chapter we will develop your first wurblet.


In this tutorial we use IntelliJ IDEA. In principle, you can use any up-to-date Java-IDE or even no IDE at all.
The screenshots for console commands were taken from the Linux bash. MacOS looks pretty similar. For Windows the pathnames must be translated accordingly.

At the time of writing there are the following known quirks or problems with other IDEs:

  • Eclipse: custom code foldings are not supported