diff options
author | Lizi <li.zi30@zte.com.cn> | 2018-03-30 09:32:21 +0000 |
---|---|---|
committer | Denes Nemeth <denes.nemeth@nokia.com> | 2018-04-03 14:20:29 +0200 |
commit | 26b87a77c527605d12c3c40b15f95de41e87f51e (patch) | |
tree | ae7f646a6ffea59f3736d245ec84eb6c9e0ed2c5 /sdclient/discovery-service/pom.xml | |
parent | 0c3bc4462dea62de5e6e02068ed087c39188ff8c (diff) |
Add swagger.json as discovery release artifacts
Change-Id: I1c2d023dce35a4e74b7f2b0e91b8e3c0423b18da
Issue-ID: MSB-187
Signed-off-by: Lizi <li.zi30@zte.com.cn>
Diffstat (limited to 'sdclient/discovery-service/pom.xml')
-rw-r--r-- | sdclient/discovery-service/pom.xml | 78 |
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> |