Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

CW Spring Boot project fails to build when generating Spring server stub from OpenAPI generator #58

@keithchong

Description

@keithchong

You will get:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.15.RELEASE:repackage (default) on project springProj02: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.15.RELEASE:repackage failed: Unable to find a single main class from the following candidates [application.SBApplication, org.openapitools.OpenAPI2SpringBoot] -> [Help 1]

Possible solutions:

  1. Add the mainClass element to the codewind template and specify the application.SBApplication class
      <configuration>
         <mainClass>application.SBApplication</mainClass>
     </configuration>
  1. Programmatically add the mainClass element and set the org.openapitools.OpenAPI2SpringBoot value. This solution is preferred, to get the Open Application action to work with the generated code.
    <configuration>
         <mainClass>org.openapitools.OpenAPI2SpringBoot</mainClass>
    </configuration>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions