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