+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <id>docker_info0</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>docker</executable>
+ <arguments>
+ <argument>ps</argument>
+ <argument>--all</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>docker_info1</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>docker</executable>
+ <arguments>
+ <argument>images</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>docker_info2</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>ls</executable>
+ <arguments>
+ <argument>-latr</argument>
+ <argument>/var/run/docker.sock</argument>
+ </arguments>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>docker_info3</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>cat</executable>
+ <arguments>
+ <argument>/etc/hosts</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>docker_info4</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>curl</executable>
+ <arguments>
+ <argument>-v</argument>
+ <argument>http://127.0.0.1:2375/info</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>docker_info5</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>netstat</executable>
+ <arguments>
+ <argument>-tulnp</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+
+ </plugin>
+ <!-- Scan Clamp code and generate the swagger.json file with all the APIs -->
+ <plugin>
+ <groupId>com.sebastian-daschner</groupId>
+ <artifactId>jaxrs-analyzer-maven-plugin</artifactId>
+ <version>0.14</version>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>analyze-jaxrs</goal>
+ </goals>
+ <configuration>
+ <backend>swagger</backend>
+ <resourcesDir>../docs/swagger/</resourcesDir>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Read the swagger.json file and the definition from SwaggerConfig.java;
+ generate a list of .adoc files containing the APIs info in more structured way -->
+ <plugin>
+ <groupId>io.github.swagger2markup</groupId>
+ <artifactId>swagger2markup-maven-plugin</artifactId>
+ <version>1.3.1</version>
+ <dependencies>
+ <dependency>
+ <groupId>io.github.swagger2markup</groupId>
+ <artifactId>swagger2markup-import-files-ext</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>io.github.swagger2markup</groupId>
+ <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <swaggerInput>${project.basedir}/docs/swagger/swagger.json</swaggerInput>
+ <outputDir>${project.build.directory}/asciidoc/generated</outputDir>
+ <config>
+ <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
+ </config>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>convertSwagger2markup</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Run the generated asciidoc through Asciidoctor to generate
+ other documentation types, such as PDFs or HTML5 -->
+ <plugin>
+ <groupId>org.asciidoctor</groupId>
+ <artifactId>asciidoctor-maven-plugin</artifactId>
+ <version>1.5.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.asciidoctor</groupId>
+ <artifactId>asciidoctorj-pdf</artifactId>
+ <version>1.5.0-alpha.10.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jruby</groupId>
+ <artifactId>jruby-complete</artifactId>
+ <version>1.7.21</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDirectory>${project.basedir}/src/main/resources/asciidoc</sourceDirectory>
+ <sourceDocumentName>swagger.adoc</sourceDocumentName>
+ <attributes>
+ <doctype>book</doctype>
+ <toc>left</toc>
+ <toclevels>3</toclevels>
+ <numbered></numbered>
+ <hardbreaks></hardbreaks>
+ <sectlinks></sectlinks>
+ <sectanchors></sectanchors>
+ <generated>${project.build.directory}/asciidoc/generated</generated>
+ </attributes>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>output-html</id>
+ <phase>test</phase>
+ <goals>
+ <goal>process-asciidoc</goal>
+ </goals>
+ <configuration>
+ <backend>html5</backend>
+ <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
+ <outputDirectory>${project.basedir}/src/main/resources/META-INF/resources/</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>output-pdf</id>
+ <phase>test</phase>
+ <goals>
+ <goal>process-asciidoc</goal>
+ </goals>
+ <configuration>
+ <backend>pdf</backend>
+ <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>