Skip to content

Commit

Permalink
Merge pull request #2 from NovatecConsulting/CBDG-51
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiens12357 authored Feb 5, 2024
2 parents 7e9c4ac + 019fb02 commit 73a8d23
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.0/apache-maven-3.9.0-bin.zip
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
11 changes: 3 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.8.10</kotlin.version>
<maven.version>3.9.0</maven.version>
<kotlin.version>1.9.20</kotlin.version>
<maven.version>3.9.5</maven.version>
<maven.plugin-tools.version>3.7.1</maven.plugin-tools.version>
<junit.version>5.9.2</junit.version>
<junit.version>5.10.1</junit.version>
</properties>

<dependencies>
Expand All @@ -44,11 +44,6 @@
<version>${maven.plugin-tools.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.32</version>
</dependency>
<dependency>
<groupId>info.novatec</groupId>
<artifactId>camunda-bpmn-documentation-generator</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package info.novatec.cbdg.plugin

import info.novatec.docu.generator.DocuGenerator
import org.apache.maven.plugin.AbstractMojo
import org.apache.maven.plugins.annotations.Mojo
import org.apache.maven.plugins.annotations.Parameter
import java.io.File

/**
* Mojo - Class for cbdg-plugin. Calls by Maven-command 'mvn cbdg:generate'.
*/
@Mojo(name = "generate")
class CamundaBpmnDocumentationGeneratorMojo : AbstractMojo() {
/**
* Default usage is the templates/default.ftl from Jar-File.
* To use it, it will be created in Build-Dir of the target project the empty file default.ftl
* and fill it with the stream of templates/default.ftl from Jar-File
*/
@Parameter(property = "templateFile", defaultValue = "\${project.build.directory}/classes/templates/default.ftl")
lateinit var templateFile: File

/**
* Directory with bpmn-files. Default is '{project.basedir}/src/main/resources/bpmn'
*/
@Parameter(property = "camundaBpmnDir", defaultValue = "\${project.basedir}/src/main/resources/bpmn")
lateinit var camundaBpmnDir: File

/**
* Target-directory fot generated content. Default is '{project.build.directory}/cbdg/html'
*/
@Parameter(property = "resultOutputDir", defaultValue = "\${project.build.directory}/cbdg/html")
lateinit var resultOutputDir: File

/**
* Directory with the images of bpmn-files. Default is '{project.basedir}/src/main/resources/images'
*/
@Parameter(property = "bpmnDiagramImageDir", defaultValue = "\${project.basedir}/src/main/resources/images")
var bpmnDiagramImageDir: File? = null

override fun execute() {
DocuGenerator().parseAndGenerate(
templateFile,
camundaBpmnDir,
resultOutputDir,
bpmnDiagramImageDir
)
}
}
80 changes: 0 additions & 80 deletions src/main/kotlin/info/novatec/cbdg/plugin/GenerateMojo.kt

This file was deleted.

0 comments on commit 73a8d23

Please sign in to comment.