Getting Started

Project Setup

You can either add the required dependencies to an existing project or use one of the Maven archetypes to get started.

Prerequisites

To start this project, you need

  • Java 8

  • your favorite Java IDE

  • Maven

  • a modern browser

Maven

Apart from linkki we require Vaadin as dependency:

    <properties>
        <vaadin.version>8.7.2</vaadin.version>
    </properties>

        <dependencies>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-server</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-compatibility-server</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client-compiled</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-compatibility-client-compiled</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-themes</artifactId>
                <version>${vaadin.version}</version>
            </dependency>
        </dependencies>

And the matching UI framework dependent linkki module:

            <dependency>
                <groupId>org.linkki-framework</groupId>
                <artifactId>linkki-core-vaadin8</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>org.linkki-framework</groupId>
                <artifactId>linkki-application-framework-vaadin8</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>

In the above example, we are creating a web application that is packaged as war, as it is needed for the linkki example.

Maven Archetypes

linkki can be used for a plain Vaadin web application, with Spring Boot or with CDI. For each of those options, there is a matching Maven archetype that creates a new project with all necessary dependencies and some sample code to get started. They can be created from a command line:

Plain linkki
mvn archetype:generate -DarchetypeGroupId=org.linkki-framework.archetypes -DarchetypeArtifactId=linkki-archetype-plain-application-vaadin8 -DarchetypeVersion=1.0-SNAPSHOT

The resulting application can be deployed to your application server of choice or simply started with mvn clean package org.eclipse.jetty:jetty-maven-plugin:run, where it can be viewed at http://localhost:8080/main.

linkki with CDI
mvn archetype:generate -DarchetypeGroupId=org.linkki-framework.archetypes -DarchetypeArtifactId=linkki-archetype-cdi-application-vaadin8 -DarchetypeVersion=1.0-SNAPSHOT

The resulting application can be deployed to your Java Enterprise Edition 7+ server of choice or simply started with mvn clean package org.apache.tomee.maven:tomee-maven-plugin:run, where it can be viewed at http://localhost:8080/<yourArtifactId>;.

linkki with Spring Boot
mvn archetype:generate -DarchetypeGroupId=org.linkki-framework.archetypes -DarchetypeArtifactId=linkki-archetype-spring-application-vaadin8 -DarchetypeVersion=1.0-SNAPSHOT

The resulting application can be started with java -jar target/*.war and be viewed at http://localhost:8080/.