push addional code
[sdc.git] / openecomp-be / tools / swagger-ui / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4     <modelVersion>4.0.0</modelVersion>
5     <artifactId>api-docs</artifactId>
6     <groupId>org.openecomp.sdc.onboarding</groupId>
7     <version>1.0-SNAPSHOT</version>
8
9     <properties>
10         <plugin.name>api-docs</plugin.name>
11         <package.dir>${basedir}/${plugin.name}</package.dir>
12         <rest.api.dir>${basedir}/../../api/openecomp-sdc-rest-webapp/onboarding-rest-war</rest.api.dir>
13         <api.json.file>api.json</api.json.file>
14         <api.html.file>api.html</api.html.file>
15     </properties>
16     <build>
17         <plugins>
18             <plugin>
19                 <groupId>org.apache.maven.plugins</groupId>
20                 <artifactId>maven-deploy-plugin</artifactId>
21                 <version>2.4</version>
22                 <configuration>
23                     <skip>true</skip>
24                 </configuration>
25             </plugin>
26             <plugin>
27                 <groupId>org.apache.maven.plugins</groupId>
28                 <artifactId>maven-jar-plugin</artifactId>
29                 <version>2.4</version>
30                 <executions>
31                     <execution>
32                         <id>default-jar</id>
33                         <phase>none</phase>
34                     </execution>
35                 </executions>
36             </plugin>
37             <plugin>
38                 <artifactId>maven-antrun-plugin</artifactId>
39                 <executions>
40                     <execution>
41                         <id>copy</id>
42                         <phase>package</phase>
43                         <configuration>
44                             <tasks>
45                                 <echo message="Copy api json files"/>
46                                 <copy file="${rest.api.dir}/target/generated/swagger-ui/swagger.json" tofile="${basedir}/target/${api.json.file}"/>
47                                 <copy file="${rest.api.dir}/target/generated/swagger-ui/swagger.json" tofile="${package.dir}/${api.json.file}"/>
48                                 <copy file="${rest.api.dir}/target/generated/${api.html.file}" tofile="${package.dir}/${api.html.file}"/>
49                             </tasks>
50                         </configuration>
51                         <goals>
52                             <goal>run</goal>
53                         </goals>
54                     </execution>
55                 </executions>
56             </plugin>
57             <plugin>
58                 <groupId>org.apache.maven.plugins</groupId>
59                 <artifactId>maven-assembly-plugin</artifactId>
60                 <configuration>
61                     <descriptor>assembly/swagger.xml</descriptor>
62                     <finalName>${plugin.name}</finalName>
63                     <outputDirectory>${package.dir}</outputDirectory>
64                 </configuration>
65                 <executions>
66                     <execution>
67                         <phase>package</phase>
68                         <goals>
69                             <goal>single</goal>
70                         </goals>
71                     </execution>
72                 </executions>
73             </plugin>
74         </plugins>
75     </build>
76
77 </project>