maven improvements and clean up
[sdc.git] / services / activity-spec / activity-spec-web / activity-spec-api-docs / 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
5     <modelVersion>4.0.0</modelVersion>
6
7     <artifactId>activity-spec-api-docs</artifactId>
8     <packaging>pom</packaging>
9
10     <parent>
11         <groupId>org.onap.sdc.activityspec</groupId>
12         <artifactId>activity-spec</artifactId>
13         <version>1.3.0-SNAPSHOT</version>
14         <relativePath>../..</relativePath>
15     </parent>
16
17     <properties>
18         <output.name>activity-spec-api-docs</output.name>
19         <generated.swagger.dir>${project.basedir}/../activity-spec-war/target/generated</generated.swagger.dir>
20         <api.json.file>api.json</api.json.file>
21         <api.html.file>api.html</api.html.file>
22     </properties>
23
24     <build>
25         <plugins>
26             <plugin>
27                 <groupId>org.apache.maven.plugins</groupId>
28                 <artifactId>maven-antrun-plugin</artifactId>
29                 <executions>
30                     <execution>
31                         <id>copy</id>
32                         <phase>package</phase>
33                         <configuration>
34                             <tasks>
35                                 <echo message="Copy api json files"/>
36                                 <echo message="${generated.swagger.dir}"/>
37                                 <copy file="${generated.swagger.dir}/swagger-ui/swagger.json"
38                                       tofile="${project.build.directory}/${api.json.file}"/>
39                                 <copy file="${generated.swagger.dir}/${api.html.file}"
40                                       tofile="${project.build.directory}/${api.html.file}"/>
41                             </tasks>
42                         </configuration>
43                         <goals>
44                             <goal>run</goal>
45                         </goals>
46                     </execution>
47                 </executions>
48             </plugin>
49             <plugin>
50                 <groupId>org.apache.maven.plugins</groupId>
51                 <artifactId>maven-assembly-plugin</artifactId>
52                 <version>${mvn.assembly.version}</version>
53                 <configuration>
54                     <descriptor>assembly/swagger.xml</descriptor>
55                     <finalName>${output.name}-${project.version}</finalName>
56                     <outputDirectory>${project.build.directory}</outputDirectory>
57                     <appendAssemblyId>false</appendAssemblyId>
58                 </configuration>
59                 <executions>
60                     <execution>
61                         <phase>package</phase>
62                         <goals>
63                             <goal>single</goal>
64                         </goals>
65                     </execution>
66                 </executions>
67             </plugin>
68         </plugins>
69     </build>
70
71 </project>