{"id":15287439,"url":"https://github.com/zaplatynski/fsm-packagetype","last_synced_at":"2026-03-16T06:07:39.078Z","repository":{"id":57724378,"uuid":"58002795","full_name":"zaplatynski/fsm-packagetype","owner":"zaplatynski","description":"A basic approach to a Maven package type for FirstSpirit modules","archived":false,"fork":false,"pushed_at":"2017-09-16T02:04:03.000Z","size":106,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-02T18:24:04.509Z","etag":null,"topics":["assembly","firstspirit","firstspirit-modules","fsm","maven","maven-plugin","packaging"],"latest_commit_sha":null,"homepage":"https://zaplatynski.github.io/fsm-packagetype/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaplatynski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-03T21:29:38.000Z","updated_at":"2022-09-08T15:56:25.000Z","dependencies_parsed_at":"2022-09-02T06:32:51.034Z","dependency_job_id":null,"html_url":"https://github.com/zaplatynski/fsm-packagetype","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/zaplatynski/fsm-packagetype","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaplatynski%2Ffsm-packagetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaplatynski%2Ffsm-packagetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaplatynski%2Ffsm-packagetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaplatynski%2Ffsm-packagetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaplatynski","download_url":"https://codeload.github.com/zaplatynski/fsm-packagetype/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaplatynski%2Ffsm-packagetype/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30570209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-16T06:02:37.763Z","status":"ssl_error","status_checked_at":"2026-03-16T06:02:14.913Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","firstspirit","firstspirit-modules","fsm","maven","maven-plugin","packaging"],"created_at":"2024-09-30T15:28:10.288Z","updated_at":"2026-03-16T06:07:39.063Z","avatar_url":"https://github.com/zaplatynski.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maven Package Type For FSMs [![Build Status](https://travis-ci.org/zaplatynski/fsm-packagetype.svg?branch=master)](https://travis-ci.org/zaplatynski/fsm-packagetype) [![Coverage Status](https://coveralls.io/repos/github/zaplatynski/fsm-packagetype/badge.svg)](https://coveralls.io/github/zaplatynski/fsm-packagetype) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.zaplatynski/fsm-packagetype/badge.svg?style=flat)](http://mvnrepository.com/artifact/com.github.zaplatynski/fsm-packagetype)\n\nThis is a basic approach to create a Maven package type for FirstSpirit modules (FSM) with a \nfully working Maven lifecycle inclung install and deploy. Additionally there is support to crate \nthe FSM deployment descriptor called module.xml. For information please consult the official \ndocumentations.\n\n## How to use\n\nIn your `pom.xml` add this:\n```xml\n\u003cproject\u003e\n\n    \u003cgroupId\u003emy-group\u003c/groupId\u003e\n    \u003cartifactId\u003emy-fsm-artifact\u003c/artifactId\u003e\n    \u003cversion\u003e1.2.3\u003c/version\u003e\n    \n    \u003c!-- NEW: make a FSM file --\u003e\n    \u003cpackaging\u003efsm\u003c/packaging\u003e\n\n    ...\n    \u003cbuild\u003e\n    \n        \u003cplugins\u003e\n            \n            \u003c!-- make new FSM package type available to Maven --\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003ecom.github.zaplatynski\u003c/groupId\u003e\n                \u003cartifactId\u003efsm-packagetype\u003c/artifactId\u003e\n                \u003cversion\u003e2.3.0\u003c/version\u003e\n                \u003c!-- this is important when extending core Maven functionality: --\u003e\n                \u003cextensions\u003etrue\u003c/extensions\u003e\n            \u003c/plugin\u003e\n            \n            \u003c!-- define how the FSM file look like --\u003e\n            \u003cplugin\u003e\n                \u003cartifactId\u003emaven-assembly-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e3.0.0\u003c/version\u003e\n                \u003cconfiguration\u003e\n                    \u003cattach\u003efalse\u003c/attach\u003e\n                    \u003cappendAssemblyId\u003efalse\u003c/appendAssemblyId\u003e\n                    \u003cdescriptors\u003e\n                        \u003cdescriptor\u003esrc/assembly/fsm.xml\u003c/descriptor\u003e\n                    \u003c/descriptors\u003e\n                \u003c/configuration\u003e\n                \u003cexecutions\u003e\n                    \u003cexecution\u003e\n                        \u003cid\u003emake-assembly\u003c/id\u003e\n                        \u003cphase\u003eprepare-package\u003c/phase\u003e\n                        \u003cgoals\u003e\n                            \u003cgoal\u003esingle\u003c/goal\u003e\n                        \u003c/goals\u003e\n                    \u003c/execution\u003e\n                \u003c/executions\u003e\n            \u003c/plugin\u003e\n            \n        \u003c/plugins\u003e    \n        ...\n    \u003c/build\u003e\n\u003c/project\u003e\n```\nTo create the `module.xml` (FirstSpirit module deployment descriptor) you must provide a `module\n.vm` ([Apache Velocity macro](http://velocity.apache.org/engine/devel/user-guide.html)) in the path `src/main/fsm` with content:\n```\n#defaultModuleXml($project)\n```\nThe example (see [macros.vm](src/main/resources/macros.vm)) above will add the common tags for \nname, version etc. (sub macro #addHeader) and collect module fragment xml if avaiable\n(sub macro #addModuleXmlFragments). Besides those three macros the variable $project give access \nto the whole\n[Maven project](https://maven.apache.org/ref/3.2.3/apidocs/org/apache/maven/project/MavenProject.html).\nIn addition all user defined Maven properties are available too. Since Velocity can not deal with dots in variable names please name them accordingly.\n\n### FirstSpirit Mode Isolated\n\nTo enable FirstSpirit upcoming mode insolated inside the module deployment descriptor simply add \nthis property to your pom.xml:\n\n```xml\n\u003cproject\u003e\n    ...\n    \u003cproperties\u003e\n        ...\n        \u003cfsmode\u003eisolated\u003c/fsmode\u003e\n        ...\n    \u003c/properties\u003e\n    ...\n\u003c/project\u003e\n```\nThe default Velocity macros will recognized it and create the the following attribute inside resource \ntags:\n```xml\n\u003cmodule\u003e\n    ...\n    \u003ccomponents\u003e\n    ...\n    \u003cresources\u003e\n        ...\n        \u003cresource mode=\"isolated\" ... /\u003e\n        ...\n    \u003c/resources\u003e\n    ...\n    \u003c/components\u003e\n    ...\n\u003c/module\u003e\n```\n\n### Module Deployment Descriptor Fragment\n\nTo create an module fragment xml in any other jar Maven module just this to the `pom.xml`:\n```xml\n\u003c/project\u003e\n...\n    \u003cbuild\u003e\n        ...\n        \u003cplugins\u003e\n            ...\n            \u003cplugin\u003e\n                \u003cgroupId\u003ecom.github.zaplatynski\u003c/groupId\u003e\n                \u003cartifactId\u003efsm-packagetype\u003c/artifactId\u003e\n                \u003cversion\u003e2.3.0\u003c/version\u003e\n                \u003cexecutions\u003e\n                    \u003cexecution\u003e\n                        \u003cgoals\u003e\n                            \u003cgoal\u003efragmentModuleXml\u003c/goal\u003e\n                        \u003c/goals\u003e\n                    \u003c/execution\u003e\n                \u003c/executions\u003e\n            \u003c/plugin\u003e\n            ...\n        \u003c/plugins\u003e\n    \u003c/build\u003e\n...\n\u003c/project\u003e\n```\nAgain in the `src/main/fsm` there must be an in the path `module-fragment.vm` in which you can \ndefine e.g. an FirstSpirit Executable or Service.\n\n### FSM Layout\n\nInside the above mentioned `fsm.xml` you need to specify the [Maven assembly plugin](http://maven.apache.org/plugins/maven-assembly-plugin/) descriptor to create a typical FSM file layout:\n```xml\n\u003cassembly xmlns=\"http://maven.apache.org/ASSEMBLY/2.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd\"\u003e\n    \u003cid\u003efsm\u003c/id\u003e\n    \u003cformats\u003e\n        \u003cformat\u003ezip\u003c/format\u003e\n    \u003c/formats\u003e\n    \u003cincludeBaseDirectory\u003efalse\u003c/includeBaseDirectory\u003e\n    \u003cfiles\u003e\n        \u003cfile\u003e\n            \u003csource\u003etarget/module.xml\u003c/source\u003e\n            \u003coutputDirectory\u003eMETA-INF\u003c/outputDirectory\u003e\n            \u003cfiltered\u003efalse\u003c/filtered\u003e\n        \u003c/file\u003e\n        \u003cfile\u003e\n            \u003csource\u003etarget/${project.artifactId}-${project.version}.jar\u003c/source\u003e\n            \u003coutputDirectory\u003elib\u003c/outputDirectory\u003e\n            \u003cfiltered\u003efalse\u003c/filtered\u003e\n        \u003c/file\u003e\n    \u003c/files\u003e\n    \u003cdependencySets\u003e\n        \u003cdependencySet\u003e\n            \u003coutputDirectory\u003elib\u003c/outputDirectory\u003e\n            \u003cuseTransitiveFiltering\u003etrue\u003c/useTransitiveFiltering\u003e\n            \u003cuseProjectArtifact\u003efalse\u003c/useProjectArtifact\u003e\n        \u003c/dependencySet\u003e\n    \u003c/dependencySets\u003e\n\u003c/assembly\u003e\n```\nThe FSM Maven package type will take care to rename the zip file to a FSM file. In the dependency set you specify yourself.\n \nIf you want to have a kind of real world example then have a look at my [Second-Hand Log project](https://github.com/zaplatynski/second-hand-log) or my [FSM Libray Creator project](https://github.com/zaplatynski/fsm-library-creator) here on GitHub. \n\n## Build command\n\n[Maven](http://maven.apache.org/) is used to compile and assemble this project:\n```\nmvn clean install\n```\n\n## Help, bugs and feature requests\n\nPlease file any **request for help**, **bug** or **feature request** at [github.com/zaplatynski/fsm-packagetype/issues](https://github.com/zaplatynski/fsm-packagetype/issues).\n\n##  Disclaimer\n\nBy using it you agree to the license stated in the file [LICENSE](LICENSE). FirstSpirit is a trade mark by the [e-Spirit AG](http://www.e-spirit.com/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaplatynski%2Ffsm-packagetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaplatynski%2Ffsm-packagetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaplatynski%2Ffsm-packagetype/lists"}