I'm using the springdoc-openapi-maven-plugin to generate a document_name.json file during the mvn clean install command, with the following plugin configuration:
<plugin>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<version>0.2</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<outputFileName>sentinel-openapi.json</outputFileName>
<outputDir>${project.build.directory/../../openapi-doc/}</outputDir>
</configuration>
</plugin>
In addition, I'm using the spring-boot-maven-plugin
to start and stop the application during integration testing:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
However, I need to generate the same document_name.json
file using the ./mvnw package
command instead. How can I configure the springdoc-openapi-maven-plugin
and spring-boot-maven-plugin
to achieve this?