endgen/endgen-maven-plugin/README.md

1.4 KiB

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.