Search code examples
javaspeedment

How do I make Speedment regenerate code automatically on build


I have a Speedment project set up but I do not want to run the GUI Tool and I do not want to check in the generated files in my software repository (GIT). How can I make Speedment automatically regenerate all code on build?


Solution

  • In your pom.xml file, add an execution tag to the speedment-maven-plugin like this:

    <plugins>
        <plugin>
            <groupId>com.speedment</groupId>
            <artifactId>speedment-maven-plugin</artifactId>
            <version>${speedment.version}</version>
            <executions>
                <execution>
                    <id>Generate code automatically</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>        
        </plugin>
    </plugins>