Skip to content

Can't generate a deployable war when using jaxrs-resteasy #4461

Closed
@pachecolp

Description

@pachecolp
Description

I have a working swagger file with which I can generate a war that deploys OK on jetty and Tomcat 7, but it doesn't work on Wildfly 8.1. As I understand it after a few days of fight, Wildfly doesn't like Jersey 2 used by the jaxrs generator.

Now I'm trying to generate the code using jaxrs-resteasy but the Maven project created by this generator fails to deploy on any web server. I'm not sure how to fix this code.

Swagger-codegen version

2.2.1

Command line used for generation
<plugin>
	<groupId>io.swagger</groupId>
	<artifactId>swagger-codegen-maven-plugin</artifactId>
	<executions>
		<execution>
			<phase>generate-sources</phase>
			<goals>
				<goal>generate</goal>
			</goals>
			<configuration>
				<inputSpec>${swagger.input}</inputSpec>
				<language>jaxrs-resteasy</language> <!-- generate server stubs for JAX-RS -->
				<addCompileSourceRoot>true</addCompileSourceRoot>
				<modelPackage>model</modelPackage>
				<apiPackage>api</apiPackage>
				<invokerPackage>invoker</invokerPackage>
				<configOptions>
					<sourceFolder>src/main/java</sourceFolder>
					<serializableModel>true</serializableModel>
				</configOptions>
				<environmentVariables>
					<!-- generate all models -->
					<models></models>
					<!-- generate all APIs -->
					<apis></apis>
					<!-- generate just the supporting files that are Java source code 
						(not project build files) -->
					<supportingFiles></supportingFiles>
				</environmentVariables>
			</configuration>
		</execution>
	</executions>
</plugin>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions