endgen/endgen-maven-plugin/README.md

35 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

# Configure
2025-05-04 09:41:16 +02:00
Add the following to your `pom.xml`
2025-05-04 09:41:16 +02:00
```xml
<build>
<plugins>
<plugin>
<groupId>nu.zoom.dsl</groupId>
<artifactId>endgen-maven-plugin</artifactId>
<version>1.2-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>endgen</goal>
</goals>
<configuration>
<templates>${project.basedir}/src/main/endpoint-templates</templates>
<dsl>${project.basedir}/src/main/endgen/test01.endpoints</dsl>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
```
Replace the `<version>` with the latest published version of the endgen plugin.
* `templates` should point to the template directory to use.
* `dsl` should be the file to generate code from.
* `output` can be used to specify the directory where the generated files are written. Default is `${project.build.directory}/generated-sources/endgen`.
* `parser` can be used to force the use of either the `Endpoints` or the `States` parser. Default is to determined by looking at the file ending of the dsl-file.
If you have several DSL-files that you wish to generate from you can repeat the `<execution>` block with other configurations.