endgen/endgen-maven-plugin
2025-05-04 15:04:47 +02:00
..
src/main/java/nu/zoom/dsl/maven Add sample project to test the maven plugin 2025-05-04 15:04:47 +02:00
pom.xml Add sample project to test the maven plugin 2025-05-04 15:04:47 +02:00
README.md Add sample project to test the maven plugin 2025-05-04 15:04:47 +02:00

Configure

Add the following to your pom.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.