Class GenerateMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.sap.cds.maven.plugin.AbstractCdsMojo
com.sap.cds.maven.plugin.build.GenerateMojo
All Implemented Interfaces:
CdsMojoLogger, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="generate", defaultPhase=GENERATE_RESOURCES, aggregator=true) public class GenerateMojo extends AbstractCdsMojo
Generates Java POJOs for type-safe access to the CDS model.

This goal scans the resource directory for a csn.json file and uses it for Java source code generation. It also adds the code output directory to the project's source code directories configuration. This allows you to use the generated Java classes in your custom code without any additional configuration in the project.

Since:
1.7.0
  • Constructor Details

    • GenerateMojo

      public GenerateMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException