As the result of the execution of graphql-maven-plugin:generateClientCode maven goal or gradle task, two type of source code is generated
The runtime classes are copied as source code so, your project, when it runs, doesn't depend on any external dependency from graphql-java-generator.
To avoid the generation of runtime classes you can use the parameter copyRuntimeSources (-Dcom.graphql_java_generator.mavenplugin.copyRuntimeSources) If copyRuntimeSources is "false", then the runtime classes won't be generated. By default, the parameter value is "true".
The main purpose for adding this feature to the plugin is double:
Here there's an example of plugin configuration to not generate runtime classes
<project ...> ... <build> <plugins> ... <plugin> <groupId>com.graphql-java-generator</groupId> <artifactId>graphql-maven-plugin</artifactId> <version>1.12.3</version> <executions> <execution> <goals> <goal>graphql</goal> </goals> </execution> </executions> <configuration> <mode>client</mode> <packageName>my.target.package</packageName> <copyRuntimeSources>false</copyRuntimeSources> </configuration> </plugin> </plugins> </build> ... </project>
Remember that if you decide not to generate runtime classes, com.graphql-java-generator:graphql-java-runtime:1.12.3, or an equivalent dependency of you own must be somehow included in your classpath. You can use com.graphql-java-generator:graphql-java-runtime:1.12.3 artifact as a dependency in your project to include graphql-java-runtime in your classpath
<project ...> ... <dependencies> ... <dependency> <groupId>com.graphql-java-generator</groupId> <artifactId>graphql-java-runtime</artifactId> <version>1.12.3</version> <exclusions> <exclusion> <groupId>com.graphql-java-generator</groupId> <artifactId>graphql-java-server-dependencies</artifactId> </exclusion> </exclusions> </dependency> ... </dependencies> ... </project>