Skip to content

[Java, Maven] swagger-codegen-maven-plugin, how invoke build without cleaning existing folders Issue: Bug #5924

Open
@felixvolz

Description

@felixvolz
Description

I have the following swagger-codegen-maven-plugin.

How do I run this plugin so it DOES NOT blow away existing output in this folder (i.e. implement flag cleanOutputDir in org.codehaus.mojo jaxb2-maven-plugin)

<plugin>
				<groupId>io.swagger</groupId>
				<artifactId>swagger-codegen-maven-plugin</artifactId>
				<version>2.2.2</version>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
						<id>generate-sources</id>
						<phase>generate-sources</phase>
						<configuration>
							<output>${project.build.directory}</output>
							specify the swagger yaml
							<inputSpec>src/main/resources/swagger/swagger.yaml</inputSpec>
							target to generate java client code
							<language>jaxrs-cxf</language> 
							<configOptions>
						 	 <sourceFolder>generated</sourceFolder>   
								<dateLibrary>joda</dateLibrary> 
								<apiPackage>com.api</apiPackage>
								<modelPackage>com.api.model</modelPackage>
							</configOptions> 
						</configuration>
					</execution>
				</executions>
			</plugin>   
Swagger-codegen version

2.2.2

Swagger declaration file content or url

N/A

Command line used for generation

N/A

Steps to reproduce

N/A

Related issues

N/A

Suggest a Fix

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions