We'd like to only build our API spec in specific cases and have the plugin skipped by default. So in pom.xml we've got:
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.8</version>
<configuration>
<skipSwaggerGeneration>true</skipSwaggerGeneration>
<apiSources> ...
This skips spec generation by default, but $ mvn compile -Dswagger.skip=false also skips generation. Using 3.1.8.