Using Maven
Typeflows provides comprehensive support for Maven-based projects. Configure multi-module builds, dependency management, and export workflows using either plugin-based automation or library-based integration depending on your project needs.
Usage Modes
Typeflows supports two usage patterns with Maven:
| Mode | Purpose | When to Use |
|---|---|---|
| Plugin Mode | Create and export configuration files | Building applications with Typeflows-managed configs |
| Library Mode | Create reusable configuration packages | Publishing shared configurations for team use |
Plugin Mode
Use this mode when creating applications that generate configuration files (workflows, dependabot, etc).
Source Structure
Plugin Mode uses a multi-module Maven project with a dedicated typeflows submodule:
| Language | Source Directory | Test Directory |
|---|---|---|
| Java | typeflows/src/main/java/ | typeflows/src/test/java/ |
| Kotlin | typeflows/src/main/kotlin/ | typeflows/src/test/kotlin/ |
Setup
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>my-project-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<modules>
<module>typeflows</module>
<!-- other modules here -->
</modules>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>Typeflows SDK Modules
| Module | Description |
|---|---|
io.typeflows:typeflows-bom | Bill of Materials for dependency management |
io.typeflows:typeflows-core | Core Typeflows abstractions and repository types |
io.typeflows:typeflows-github | GitHub workflows, Dependabot, Actions |
io.typeflows:typeflows-github-marketplace | Pre-built GitHub marketplace actions |
io.typeflows:typeflows-llm | Support for LLM agent instructions and control files |
Plugin Goals
Goals available when using Plugin Mode and are run from the typeflows module:
| Goal | Description |
|---|---|
typeflows:export | Export your Typeflows configuration |
typeflows:install-claude | Install LLM instructions about Typeflows into .claude/commands |
typeflows:install-copilot | Install LLM instructions about Typeflows into .github/instructions |
typeflows:install-cursor | Install LLM instructions about Typeflows into .cursor/rules |
typeflows:install-genie | Install LLM instructions about Typeflows into .genie/guidelines.md |
Library Mode
Use this mode when creating reusable configuration packages for distribution.
Source Structure
Library Mode uses standard Maven source structure:
| Language | Source Directory | Test Directory |
|---|---|---|
| Java | src/main/java/ | src/test/java/ |
| Kotlin | src/main/kotlin/ | src/test/kotlin/ |
Setup
Add Typeflows dependencies to your project:
Better Experience in Landscape Mode
The code examples look much better when viewed horizontally. Please rotate your device for the best experience!
Or view on a larger screen to see the code!
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.typeflows</groupId>
<artifactId>typeflows-bom</artifactId>
<version>1.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.typeflows</groupId>
<artifactId>typeflows-github</artifactId>
</dependency>
<dependency>
<groupId>io.typeflows</groupId>
<artifactId>typeflows-github-marketplace</artifactId>
</dependency>
<dependency>
<groupId>io.typeflows</groupId>
<artifactId>typeflows-llm</artifactId>
</dependency>
</dependencies>Publishing
Use the standard Maven maven-deploy-plugin or nexus-staging-maven-plugin configuration for publishing to Maven repositories.