swagger-core
swagger-core copied to clipboard
swagger-maven-plugin aggregates OpenAPI definition in multimodule project
During multimodule project build each swagger-maven-plugin execution contain info from previous child module(s).
<swagger.version>2.0.10</swagger.version>
Parent POM:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
<version>${swagger.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>${swagger.version}</version>
<executions>
<execution>
<goals>
<goal>resolve</goal>
</goals>
<configuration>
<outputPath>${project.build.outputDirectory}</outputPath>
<outputFileName>${project.artifactId}</outputFileName>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
Child POM:
<build>
<plugins>
<plugin>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
@amarkevich I found a similar effect - https://github.com/swagger-api/swagger-core/issues/4647