sheetalm | 297209b | 2018-02-20 19:06:27 +0530 | [diff] [blame^] | 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>activity-spec-api-docs</artifactId> |
| 6 | <parent> |
| 7 | <groupId>org.openecomp.activityspec</groupId> |
| 8 | <artifactId>activity-spec</artifactId> |
| 9 | <version>1.2.0-SNAPSHOT</version> |
| 10 | </parent> |
| 11 | |
| 12 | <properties> |
| 13 | <plugin.name>activity-spec-api-docs</plugin.name> |
| 14 | <package.dir>${basedir}/api-docs</package.dir> |
| 15 | <rest.api.dir>${basedir}/../activity-spec-web/activity-spec-war</rest.api.dir> |
| 16 | <api.json.file>api.json</api.json.file> |
| 17 | <api.html.file>api.html</api.html.file> |
| 18 | </properties> |
| 19 | <build> |
| 20 | <plugins> |
| 21 | <!-- ============================================= --> |
| 22 | <!-- Clean api-docs folder --> |
| 23 | <!-- ============================================= --> |
| 24 | <plugin> |
| 25 | <artifactId>maven-clean-plugin</artifactId> |
| 26 | <version>2.6.1</version> |
| 27 | <executions> |
| 28 | <execution> |
| 29 | <id>clean.dist.folder</id> |
| 30 | <phase>clean</phase> |
| 31 | <goals> |
| 32 | <goal>clean</goal> |
| 33 | </goals> |
| 34 | <configuration> |
| 35 | <filesets> |
| 36 | <fileset> |
| 37 | <directory>${basedir}/target/api-docs</directory> |
| 38 | </fileset> |
| 39 | </filesets> |
| 40 | </configuration> |
| 41 | </execution> |
| 42 | </executions> |
| 43 | </plugin> |
| 44 | <plugin> |
| 45 | <groupId>org.apache.maven.plugins</groupId> |
| 46 | <artifactId>maven-jar-plugin</artifactId> |
| 47 | <version>${mvn.jar.version}</version> |
| 48 | <executions> |
| 49 | <execution> |
| 50 | <id>default-jar</id> |
| 51 | <phase>none</phase> |
| 52 | </execution> |
| 53 | </executions> |
| 54 | </plugin> |
| 55 | <plugin> |
| 56 | <artifactId>maven-antrun-plugin</artifactId> |
| 57 | <executions> |
| 58 | <execution> |
| 59 | <id>copy</id> |
| 60 | <phase>package</phase> |
| 61 | <configuration> |
| 62 | <tasks> |
| 63 | <echo message="Copy api json files"/> |
| 64 | <echo message= "${rest.api.dir}" /> |
| 65 | <copy file="${rest.api.dir}/target/generated/swagger-ui/swagger.json" tofile="${basedir}/target/${api.json.file}"/> |
| 66 | <copy file="${rest.api.dir}/target/generated/swagger-ui/swagger.json" tofile="${package.dir}/${api.json.file}"/> |
| 67 | <copy file="${rest.api.dir}/target/generated/${api.html.file}" tofile="${package.dir}/${api.html.file}"/> |
| 68 | </tasks> |
| 69 | </configuration> |
| 70 | <goals> |
| 71 | <goal>run</goal> |
| 72 | </goals> |
| 73 | </execution> |
| 74 | </executions> |
| 75 | </plugin> |
| 76 | <plugin> |
| 77 | <groupId>org.apache.maven.plugins</groupId> |
| 78 | <artifactId>maven-assembly-plugin</artifactId> |
| 79 | <version>${mvn.assembly.version}</version> |
| 80 | <configuration> |
| 81 | <descriptor>assembly/swagger.xml</descriptor> |
| 82 | <finalName>${plugin.name}</finalName> |
| 83 | <outputDirectory>${package.dir}</outputDirectory> |
| 84 | <appendAssemblyId>false</appendAssemblyId> |
| 85 | </configuration> |
| 86 | <executions> |
| 87 | <execution> |
| 88 | <phase>package</phase> |
| 89 | <goals> |
| 90 | <goal>single</goal> |
| 91 | </goals> |
| 92 | </execution> |
| 93 | </executions> |
| 94 | </plugin> |
| 95 | </plugins> |
| 96 | </build> |
| 97 | |
| 98 | </project> |