summaryrefslogtreecommitdiffstats
path: root/sdclient/discovery-service/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'sdclient/discovery-service/pom.xml')
-rw-r--r--sdclient/discovery-service/pom.xml78
1 files changed, 77 insertions, 1 deletions
diff --git a/sdclient/discovery-service/pom.xml b/sdclient/discovery-service/pom.xml
index 982338d..a1b93ec 100644
--- a/sdclient/discovery-service/pom.xml
+++ b/sdclient/discovery-service/pom.xml
@@ -75,10 +75,86 @@
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
-
</dependencies>
<build>
<plugins>
+ <!-- JSON -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <version>1.0.0</version>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>read-project-properties</goal>
+ </goals>
+ <configuration>
+ <files>
+ <file>${basedir}/src/main/resources/swagger.properties</file>
+ </files>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.github.kongchen</groupId>
+ <artifactId>swagger-maven-plugin</artifactId>
+ <version>3.1.4</version>
+ <configuration>
+ <apiSources>
+ <apiSource>
+ <locations>${api-rest-package}</locations>
+ <schemes>
+ <scheme>http</scheme>
+ <scheme>https</scheme>
+ </schemes>
+ <host>${api-host-ip}:${api-host-port}</host>
+ <basePath>${api-base-path}</basePath>
+ <info>
+ <title>${api-title}</title>
+ <version>${api-version}</version>
+ <description>${api-description}</description>
+ <license>
+ <name>${api-license}</name>
+ </license>
+ </info>
+ <!--<swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>-->
+ <swaggerDirectory>${basedir}/target/classes</swaggerDirectory>
+ </apiSource>
+ </apiSources>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>target/classes/swagger.json</file>
+ <type>json</type>
+ <classifier>schema</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>