86e9ccbef0355ee4eaa8ba95832b02086b40b3a9
[ccsdk/cds.git] / cds-ui / server / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
6 ===================================================================
7
8 Unless otherwise specified, all software contained herein is licensed
9 under the Apache License, Version 2.0 (the License);
10 you may not use this software except in compliance with the License.
11 You may obtain a copy of the License at
12
13     http://www.apache.org/licenses/LICENSE-2.0
14
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 ============LICENSE_END============================================ -->
21
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24
25     <parent>
26         <groupId>org.onap.ccsdk.cds</groupId>
27         <artifactId>cds-ui</artifactId>
28         <version>1.0.0-SNAPSHOT</version>
29         <relativePath>..</relativePath>
30     </parent>
31
32     <artifactId>cds-ui-server</artifactId>
33     <version>1.0.0-SNAPSHOT</version>
34     <packaging>pom</packaging>
35
36     <name>UI Server</name>
37
38     <properties>
39         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
40         <npm.executable>npm</npm.executable>
41         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
42         <image.name>onap/ccsdk-cds-ui-server</image.name>
43         <docker.push.phase>deploy</docker.push.phase>
44     </properties>
45
46     <build>
47         <plugins>
48             <plugin>
49                 <groupId>org.apache.maven.plugins</groupId>
50                 <artifactId>maven-dependency-plugin</artifactId>
51                 <version>3.1.1</version>
52                 <executions>
53                     <execution>
54                         <id>unpack-blueprint-grpc-proto</id>
55                         <phase>generate-resources</phase>
56                         <goals>
57                             <goal>unpack</goal>
58                         </goals>
59                         <configuration>
60                             <artifactItems>
61                                 <artifactItem>
62                                     <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
63                                     <artifactId>blueprint-proto</artifactId>
64                                     <version>${ccsdk.cds.version}</version>
65                                     <type>jar</type>
66                                     <overWrite>true</overWrite>
67                                     <outputDirectory>${project.build.directory}/generated/proto-definition/proto</outputDirectory>
68                                     <includes>**/*.proto</includes>
69                                 </artifactItem>
70                             </artifactItems>
71                         </configuration>
72                     </execution>
73                 </executions>
74             </plugin>
75
76             <plugin>
77                 <groupId>com.github.eirslett</groupId>
78                 <artifactId>frontend-maven-plugin</artifactId>
79                 <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
80                 <version>1.3</version>
81                 <configuration>
82                     <nodeVersion>v8.12.0</nodeVersion>
83                     <npmVersion>6.4.1</npmVersion>
84                     <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
85                     <installDirectory>./</installDirectory>
86                 </configuration>
87                 <executions>
88                     <execution>
89                         <id>install node and npm</id>
90                         <goals>
91                             <goal>install-node-and-npm</goal>
92                         </goals>
93                         <phase>generate-resources</phase>
94                     </execution>
95
96                     <execution>
97                         <id>npm install</id>
98                         <goals>
99                             <goal>npm</goal>
100                         </goals>
101
102                         <phase>generate-resources</phase>
103
104                         <configuration>
105                             <arguments>install</arguments>
106                         </configuration>
107                     </execution>
108
109                     <execution>
110                         <id>npm build</id>
111                         <goals>
112                             <goal>npm</goal>
113                         </goals>
114
115                         <phase>generate-resources</phase>
116
117                         <configuration>
118                             <arguments>run build</arguments>
119                         </configuration>
120                     </execution>
121
122                 </executions>
123             </plugin>
124             <plugin>
125                 <groupId>org.codehaus.groovy.maven</groupId>
126                 <artifactId>gmaven-plugin</artifactId>
127                 <version>1.0</version>
128                 <executions>
129                     <execution>
130                         <phase>validate</phase>
131                         <goals>
132                             <goal>execute</goal>
133                         </goals>
134                         <configuration>
135                             <source>${basedir}/../../TagVersion.groovy</source>
136                         </configuration>
137                     </execution>
138                 </executions>
139             </plugin>
140         </plugins>
141     </build>
142
143     <profiles>
144         <profile>
145             <id>docker</id>
146             <build>
147                 <plugins>
148                     <plugin>
149                         <groupId>io.fabric8</groupId>
150                         <artifactId>docker-maven-plugin</artifactId>
151                         <version>0.26.1</version>
152                         <inherited>false</inherited>
153                         <configuration>
154                             <images>
155                                 <image>
156                                     <name>${image.name}</name>
157                                     <build>
158                                         <cleanup>try</cleanup>
159                                         <dockerFileDir>${basedir}</dockerFileDir>
160                                         <tags>
161                                             <tag>${project.docker.latestminortag.version}</tag>
162                                             <tag>${project.docker.latestfulltag.version}</tag>
163                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
164                                         </tags>
165                                     </build>
166                                 </image>
167                             </images>
168                             <verbose>true</verbose>
169                         </configuration>
170                         <executions>
171                             <execution>
172                                 <id>generate-images</id>
173                                 <phase>package</phase>
174                                 <goals>
175                                     <goal>build</goal>
176                                 </goals>
177                             </execution>
178                             <execution>
179                                 <id>push-images</id>
180                                 <phase>${docker.push.phase}</phase>
181                                 <goals>
182                                     <goal>build</goal>
183                                     <goal>push</goal>
184                                 </goals>
185                             </execution>
186                         </executions>
187                     </plugin>
188                 </plugins>
189             </build>
190         </profile>
191
192     </profiles>
193 </project>