https://github.com/netgrif/apps-packager-maven-plugin
https://github.com/netgrif/apps-packager-maven-plugin
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/netgrif/apps-packager-maven-plugin
- Owner: netgrif
- License: apache-2.0
- Created: 2025-05-26T12:08:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-29T16:34:37.000Z (about 1 year ago)
- Last Synced: 2025-05-29T17:19:57.093Z (about 1 year ago)
- Language: Java
- Size: 39.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Petriflow Packaging Maven Plugin
[](https://openjdk.java.net/projects/jdk/21/)
[](https://petriflow.com)
[](https://github.com/netgrif/apps-packager-maven-plugin/releases)
[](https://github.com/netgrif/apps-packager-maven-plugin/actions/workflows/release-build.yaml)
---
A Maven plugin for packaging [Petriflow](https://github.com/netgrif/petriflow) application XML files into distributable ZIP archives, including automatic manifest generation and flexible configuration.
---
## What Does This Plugin Do?
* Packages all `.xml` Petri net files (except excluded) into a ZIP.
* Generates a `manifest.xml` with all configured metadata.
* Supports multi-app and multi-directory setups.
* Resulting ZIPs are in your configured output directory.
---
## Features
* Package one or more Petriflow applications into ZIP archives.
* Automatic `manifest.xml` generation with app metadata and process listing.
* Support for multi-app projects (each subdirectory packaged separately).
* Regex-based exclusion of processes.
* Flexible configuration via Maven properties.
* Verbose logging of included/excluded processes.
---
## Requirements
* Java 21 or newer
* Maven 3+
---
## Running the Plugin
The plugin runs automatically during the `package` phase:
```shell
mvn clean package
```
Or run manually:
```shell
mvn com.netgrif:apps-packager-maven-plugin:package-petriflow
```
---
## Plugin Configuration Options
| Parameter | Default Value | Description |
| ------------------ | -------------------------------------------- | ----------------------------------------------------------- |
| `inputDirectory` | `src/main/resources/petriNets` | Path to the directory with Petri net XML files |
| `inputDirectories` | *(none)* | List of directories to process (overrides `inputDirectory`) |
| `outputDirectory` | `${project.build.directory}/petriflow-zips` | Output folder for ZIP files |
| `multiApplication` | `false` | If true, treats subfolders as separate applications |
| `appId` | `${project.artifactId}` | Application ID for manifest |
| `appName` | `${project.name}` | Application name |
| `appDescription` | `${project.description}` | Application description |
| `appVersion` | `${project.version}` | Application version |
| `appAuthor` | `${project.developers[0].name}` or `unknown` | Application author |
| `exclude` | *(none)* | List of regex patterns to exclude processes (by file name) |
| `zipPrefix` | *(none)* | Prefix for ZIP file names |
Example only the `` block:
```xml
true
.*Test.*
SampleProcess
release
```
---
## Example `pom.xml` Configuration
Below is a sample Maven module configuration using this plugin:
```xml
4.0.0
org.example
ExampleModule
0.0.1
processes
Example Processes
This module contains example Petriflow process definitions for demonstration, testing, and integration
within the Netgrif Application Engine ecosystem.
0.0.1
https://example.com/processes
Netgrif
example@test.com
com.netgrif
apps-packager-maven-plugin
1.0.0
../Example-Apps
true
ThisPetriNetExclude
release
package-petriflow
```
---
## Example Project Structure
```
project-root/
└── src/
└── main/
└── resources/
└── petriNets/
├── app1/
│ ├── Invoice.xml
│ └── Payment.xml
└── app2/
└── Order.xml
```
With `multiApplication=true`, each subfolder (`app1`, `app2`) is packaged as a separate application ZIP.
---