Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-130

Use target/generated-sources for generated code

    XMLWordPrintable

Details

    Description

      Currently RMB places generated code into
      src/main/java/org/folio/rest/jaxrs

      This should be changed to
      target/generated-sources/raml-jaxrs/org/folio/rest/jaxrs

      Reasons:

      Using target/generated-sources is the commonly used directory for java files that are fully autogenerated:
      https://confluence.jetbrains.com/display/IDEADEV/Maven+Integration+FAQ#MavenIntegrationFAQ-GeneratedSources
      http://www.antlr.org/api/maven-plugin/latest/
      https://github.com/mulesoft-labs/raml-jaxrs-codegen/blob/e28c10b/maven-plugin/src/main/java/org/raml/jaxrs/codegen/maven/RamlJaxrsCodegenMojo.java#L60
      https://www.jooq.org/doc/3.10/manual/code-generation/codegen-configuration/#N49CB2

      IDEs support this directory and warn if one tries to edit the autogenerated java file.

      mvn clean will delete the directory automatically.

      src/main/java/org/folio/rest/.gitignore containing "jaxrs/" is no longer required.

      Code coverage doesn't take target/generated-sources into account. This is correct. (However, the module of the code generator must thoroughly unit test the generated code.)

      Generating the code to src/ already has caused some issues:
      https://issues.folio.org/browse/RMB-115
      https://issues.folio.org/browse/DMOD-23
      https://issues.folio.org/browse/DMOD-24
      https://issues.folio.org/browse/DMOD-138
      https://issues.folio.org/browse/DMOD-141

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                julianladisch Julian Ladisch
                julianladisch Julian Ladisch
                shale99 shale99
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases