Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swagger-maven-plugin aggregates OpenAPI definition in multimodule project #3331

Open
amarkevich opened this issue Oct 15, 2019 · 1 comment

Comments

@amarkevich
Copy link
Contributor

amarkevich commented Oct 15, 2019

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 added a commit to amarkevich/swagger-core that referenced this issue Oct 18, 2019
amarkevich added a commit to amarkevich/swagger-core that referenced this issue Jan 26, 2020
amarkevich added a commit to amarkevich/swagger-core that referenced this issue Jun 27, 2020
@ahoehma
Copy link

ahoehma commented Apr 7, 2024

@amarkevich I found a similar effect - #4647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants