swagger-codegen-maven-plugin: how to use the generated pom.xml within maven #11793
Unanswered
iv1-infovista
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am a little bit new with maven, but I managed to generate client classes using the swagger-codegen-maven-plugin. Once generated, the java compilation starts for the generated classes but it does not find the new dependencies like gson. So it failled.
I wonder if i miss something for maven to use the generated pom.xml instead or on top of mine for the generated class compilation process?
This is the build part of my pom.xml
<build> <plugins> <plugin> <groupId>io.swagger.codegen.v3</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>${swagger-codegen-version}</version> <executions> <execution> <id>myid</id> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>${project.basedir}/src/main/resources/myapi.yaml</inputSpec> <language>java</language> <modelPackage>com.myapi.client.models</modelPackage> <apiPackage>com.myapi.client.api</apiPackage> <invokerPackage>com.myapi.client.invoker</invokerPackage> <generateApiDocumentation>false</generateApiDocumentation> <generateModelTests>false</generateModelTests> <generateModelDocumentation>false</generateModelDocumentation> <configOptions> <sourceFolder>src/gen/java/main</sourceFolder> <java8>true</java8> </configOptions> </configuration> </execution> </executions> </plugin> </plugins> </build>
meanwhile i have added the dependencies part of the generated pom.xml , but i really don't like it especially for updates.
Is it possible or did i missed somethiing?
thanks
Beta Was this translation helpful? Give feedback.
All reactions