Created
June 29, 2023 20:40
-
-
Save yonatang/04150af8e0d4d3eef2c779173a441abb to your computer and use it in GitHub Desktop.
openapi-generator maven missing resource folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>temp</groupId> | |
<artifactId>temp</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.openapitools</groupId> | |
<artifactId>openapi-generator-maven-plugin</artifactId> | |
<version>6.6.0</version> | |
<executions> | |
<execution> | |
<id>generate-petstore-client</id> | |
<goals> | |
<goal>generate</goal> | |
</goals> | |
<phase>process-resources</phase> | |
<configuration> | |
<!-- this should attach the src/main/resources folder, but it won't --> | |
<addCompileSourceRoot>true</addCompileSourceRoot> | |
<configOptions> | |
<!-- this will create the file target/generated-resources/openapi/src/main/resource/openapi/openapi.yaml, but | |
the file will be missing in target/classes folder, so it won't get packed into the JAR upon build --> | |
<dynamicOperations>true</dynamicOperations> | |
</configOptions> | |
<inputSpec> | |
https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.yaml | |
</inputSpec> | |
<generatorName>java</generatorName> | |
<library>native</library> | |
<output>${project.build.directory}/generated-sources/openapi</output> | |
<generateApiDocumentation>false</generateApiDocumentation> | |
<generateApiTests>false</generateApiTests> | |
<generateModelTests>false</generateModelTests> | |
<apiPackage>petstore.gen.api</apiPackage> | |
<modelPackage>petstore.gen.model</modelPackage> | |
<invokerPackage>petstore.gen.invoker</invokerPackage> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
<properties> | |
<maven.compiler.source>11</maven.compiler.source> | |
<maven.compiler.target>11</maven.compiler.target> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<jackson.version>2.15.2</jackson.version> | |
<swagger.version>2.2.12</swagger.version> | |
<jsr305.version>3.0.2</jsr305.version> | |
<jackson-nullable.version>0.2.6</jackson-nullable.version> | |
<annotation-api.version>1.3.2</annotation-api.version> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>com.fasterxml.jackson.datatype</groupId> | |
<artifactId>jackson-datatype-jsr310</artifactId> | |
<version>${jackson.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>javax.annotation</groupId> | |
<artifactId>javax.annotation-api</artifactId> | |
<version>${annotation-api.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.openapitools</groupId> | |
<artifactId>jackson-databind-nullable</artifactId> | |
<version>${jackson-nullable.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>com.google.code.findbugs</groupId> | |
<artifactId>jsr305</artifactId> | |
<version>${jsr305.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>io.swagger.core.v3</groupId> | |
<artifactId>swagger-annotations</artifactId> | |
<version>${swagger.version}</version> | |
</dependency> | |
<dependency> | |
<groupId>io.swagger.core.v3</groupId> | |
<artifactId>swagger-models</artifactId> | |
<version>${swagger.version}</version> | |
</dependency> | |
</dependencies> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment