1c05d552101ca1ec177686b76d25f2c03ed56eb1
[ccsdk/cds.git] / cds-ui / server / pom.xml
1 <!-- 
2 ============LICENSE_START==========================================
3 ===================================================================
4 Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
5 ===================================================================
6
7 Unless otherwise specified, all software contained herein is licensed
8 under the Apache License, Version 2.0 (the License);
9 you may not use this software except in compliance with the License.
10 You may obtain a copy of the License at
11
12     http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END============================================ -->
20
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22   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>ui</artifactId>
28         <version>0.4.2-SNAPSHOT</version>
29         <relativePath>..</relativePath>
30     </parent>
31
32     <artifactId>ui-server</artifactId>
33     <version>0.4.2-SNAPSHOT</version>
34     <packaging>pom</packaging>
35
36     <name>cds-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>com.github.eirslett</groupId>
50                 <artifactId>frontend-maven-plugin</artifactId>
51                 <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
52                 <version>1.3</version>
53                 <configuration>
54                     <nodeVersion>v8.12.0</nodeVersion>
55                     <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
56                     <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
57                     <installDirectory>./</installDirectory>
58                 </configuration>
59                 <executions>
60                     <execution>
61                         <id>install node and npm</id>
62                         <goals>
63                             <goal>install-node-and-npm</goal>
64                         </goals>
65                         <phase>generate-resources</phase>
66                     </execution>
67
68                     <execution>
69                         <id>npm install</id>
70                         <goals>
71                             <goal>npm</goal>
72                         </goals>
73
74                         <phase>generate-resources</phase>
75
76                         <configuration>
77                             <arguments>install</arguments>
78                         </configuration>
79                     </execution>
80
81                     <execution>
82                         <id>npm build</id>
83                         <goals>
84                             <goal>npm</goal>
85                         </goals>
86
87                         <phase>generate-resources</phase>
88
89                         <configuration>
90                             <arguments>run build</arguments>
91                         </configuration>
92                     </execution>
93
94                 </executions>
95             </plugin>
96             <plugin>
97                 <groupId>org.codehaus.groovy.maven</groupId>
98                 <artifactId>gmaven-plugin</artifactId>
99                 <version>1.0</version>
100                 <executions>
101                     <execution>
102                         <phase>validate</phase>
103                         <goals>
104                             <goal>execute</goal>
105                         </goals>
106                         <configuration>
107                             <source>${basedir}/../../TagVersion.groovy</source>
108                         </configuration>
109                     </execution>
110                 </executions>
111             </plugin>
112         </plugins>
113     </build>
114     
115         <profiles>
116         <profile>
117             <id>docker</id>
118             <build>
119                 <plugins>
120                     <plugin>
121                         <groupId>io.fabric8</groupId>
122                         <artifactId>docker-maven-plugin</artifactId>
123                         <version>0.26.1</version>
124                         <inherited>false</inherited>
125                         <configuration>
126                             <images>
127                                 <image>
128                                     <name>${image.name}</name>
129                                     <build>
130                                         <cleanup>try</cleanup>
131                                         <dockerFileDir>${basedir}</dockerFileDir>
132                                         <tags>
133                                             <tag>${project.docker.latestminortag.version}</tag>
134                                             <tag>${project.docker.latestfulltag.version}</tag>
135                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
136                                         </tags>
137                                     </build>
138                                 </image>
139                             </images>
140                             <verbose>true</verbose>
141                         </configuration>
142                         <executions>
143                             <execution>
144                                 <id>generate-images</id>
145                                 <phase>package</phase>
146                                 <goals>
147                                     <goal>build</goal>
148                                 </goals>
149                             </execution>
150                             <execution>
151                                 <id>push-images</id>
152                                 <phase>${docker.push.phase}</phase>
153                                 <goals>
154                                     <goal>build</goal>
155                                     <goal>push</goal>
156                                 </goals>
157                             </execution>
158                         </executions>
159                     </plugin>
160                 </plugins>
161             </build>
162         </profile>
163
164     </profiles>
165 </project>