-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run the generator using gradle #261
Comments
No, the Java Annotation Processing API restrict the location of generated classes to the But you can always define an extra step in the build process with Maven (or Gradle) to copy the generated source codes back to <plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-source-files-to-classpath</id>
<!-- here the phase you need, read https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference -->
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/src/main/java</outputDirectory>
<resources>
<resource>
<directory>${basedir}/target/generated-classes/annotation</directory>
<includes>
<include>**/TestEntity*.java</include>
<include>**/TestView*.java</include>
<include>**/TestUDT*.java</include>
<include>**/TestCodecRegistry*.java</include>
<include>**/TestFunctionRegistry*.java</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin> |
Found out it is easier to add this plugin. That way the autogenerated classes are placed in |
Oh nice! I should upgrade my docs to have a section dedicated to Gradle |
Can we force the code generator to place the generated classes in a specific location?
The text was updated successfully, but these errors were encountered: