YAML Declarative UI (Maven plugin)

Hi Guys,

I have developed a maven plugin which compiles YAML UI definition files to java classes at pre-compile time.

For example, the source file YAML file:

## Vaadin View
package: org.fdmtech.yamlcrunch.demo
name: TestGraph
  - &vl com.vaadin.ui.VerticalLayout
  - &button com.vaadin.ui.Button
  - &window com.vaadin.ui.Window
  - !comp
    <class>: *window
    <name>: root
    caption: Test window
      - !comp
        <class>: *vl
        <name>: layout
          - !comp
            <class>: *button
            <name>: button
            caption: Click here

Generates the java source:

package org.fdmtech.yamlcrunch.demo;

import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Button;
import com.vaadin.ui.Window;

public class TestGraph {

    public Window root;
    public VerticalLayout layout;
    public Button button;

    protected final void init() {
        // Create components
        root = new Window();
        layout = new VerticalLayout();
        button = new Button();
        // Setup
        root.setCaption("Test window");
        button.setCaption("Click here");
        // Hierarchy

    public TestGraph() {


Then you can use it as:

public class MyApplication extends Application {

    public void init() {

        TestGraph view = new TestGraph();

        view.button.addListener(new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {


  • No runtime dependencies
  • Generated classes can be extended
  • Definition errors are detected at runtime

What do you think about this approach?

I want to publish the plugin to the community, is anyone interested?