Skip to content

Maven setup

Paul Sterl edited this page Jan 19, 2025 · 6 revisions

Maven

Core

  • Allows the build of triggers
  • the execution of tasks
  • Adds also REST APIs to manage triggers and list existing tasks
<dependency>
    <groupId>org.sterl.spring</groupId>
    <artifactId>spring-persistent-tasks-core</artifactId>
    <version>1.x.x</version>
</dependency>

Setup Spring for Core

@SpringBootApplication
@EnableSpringPersistentTasks
public class ExampleApplication {

DB using liquibase

Dependency needed to setup the DB using liquibase

<dependency>
    <groupId>org.sterl.spring</groupId>
    <artifactId>spring-persistent-tasks-db</artifactId>
    <version>1.x.x</version>
</dependency>

Option 1: Just include the master file

<include file="spring-persistent-tasks/db.changelog-master.xml" />

Option 2: import changesets on by one

<include file="spring-persistent-tasks/db/pt-changelog-v1.xml" />

Enable a SPA management UI

This dependency adds a spring react default UI to /task-ui. Assuming at least an instance of the spring persistent tasks is available on this node.

<dependency>
    <groupId>org.sterl.spring</groupId>
    <artifactId>spring-persistent-tasks-ui</artifactId>
    <version>1.x.x</version>
</dependency>

Setup Spring Boot for the UI

@SpringBootApplication
@EnableSpringPersistentTasks
@EnableSpringPersistentTasksUI
public class ExampleApplication {
Clone this wiki locally