Fixing dockerFile
[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         <image.name>onap/ccsdk-cds-ui-server</image.name>
40     </properties>
41
42     <build>
43         <plugins>
44             <plugin>
45                 <groupId>org.apache.maven.plugins</groupId>
46                 <artifactId>maven-dependency-plugin</artifactId>
47                 <version>3.1.1</version>
48                 <executions>
49                     <execution>
50                         <id>unpack-blueprint-grpc-proto</id>
51                         <phase>generate-resources</phase>
52                         <goals>
53                             <goal>unpack</goal>
54                         </goals>
55                         <configuration>
56                             <artifactItems>
57                                 <artifactItem>
58                                     <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
59                                     <artifactId>blueprint-proto</artifactId>
60                                     <version>${ccsdk.cds.version}</version>
61                                     <type>jar</type>
62                                     <overWrite>true</overWrite>
63                                     <outputDirectory>${project.build.directory}/generated/proto-definition/proto</outputDirectory>
64                                     <includes>**/*.proto</includes>
65                                 </artifactItem>
66                             </artifactItems>
67                         </configuration>
68                     </execution>
69                 </executions>
70             </plugin>
71
72             <plugin>
73                 <groupId>com.github.eirslett</groupId>
74                 <artifactId>frontend-maven-plugin</artifactId>
75                 <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
76                 <version>1.3</version>
77                 <configuration>
78                     <nodeVersion>v8.12.0</nodeVersion>
79                     <npmVersion>6.4.1</npmVersion>
80                     <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
81                     <installDirectory>./</installDirectory>
82                 </configuration>
83                 <executions>
84                     <execution>
85                         <id>install node and npm</id>
86                         <goals>
87                             <goal>install-node-and-npm</goal>
88                         </goals>
89                         <phase>generate-resources</phase>
90                     </execution>
91
92                     <execution>
93                         <id>npm install</id>
94                         <goals>
95                             <goal>npm</goal>
96                         </goals>
97
98                         <phase>generate-resources</phase>
99
100                         <configuration>
101                             <arguments>install</arguments>
102                         </configuration>
103                     </execution>
104
105                     <execution>
106                         <id>npm build</id>
107                         <goals>
108                             <goal>npm</goal>
109                         </goals>
110
111                         <phase>generate-resources</phase>
112
113                         <configuration>
114                             <arguments>run build</arguments>
115                         </configuration>
116                     </execution>
117
118                 </executions>
119             </plugin>
120             <plugin>
121                 <groupId>org.codehaus.groovy.maven</groupId>
122                 <artifactId>gmaven-plugin</artifactId>
123                 <version>1.0</version>
124                 <executions>
125                     <execution>
126                         <phase>validate</phase>
127                         <goals>
128                             <goal>execute</goal>
129                         </goals>
130                         <configuration>
131                             <source>${basedir}/../../TagVersion.groovy</source>
132                         </configuration>
133                     </execution>
134                 </executions>
135             </plugin>
136         </plugins>
137     </build>
138
139     <profiles>
140         <profile>
141             <id>docker</id>
142             <build>
143                 <plugins>
144                     <plugin>
145                         <groupId>io.fabric8</groupId>
146                         <artifactId>docker-maven-plugin</artifactId>
147                         <version>0.34.0</version>
148                         <inherited>false</inherited>
149                         <configuration>
150                             <images>
151                                 <image>
152                                     <name>${image.name}</name>
153                                     <build>
154                                         <cleanup>try</cleanup>
155                                         <dockerFileDir>${basedir}</dockerFileDir>
156                                         <tags>
157                                             <tag>${project.docker.latestminortag.version}</tag>
158                                             <tag>${project.docker.latestfulltag.version}</tag>
159                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
160                                         </tags>
161                                     </build>
162                                 </image>
163                             </images>
164                             <verbose>${docker.verbose}</verbose>
165                             <skipPush>${docker.skip.push}</skipPush>
166                         </configuration>
167                         <executions>
168                             <execution>
169                                 <id>build-push-images</id>
170                                 <phase>${docker.push.phase}</phase>
171                                 <goals>
172                                     <goal>build</goal>
173                                     <goal>push</goal>
174                                 </goals>
175                             </execution>
176                         </executions>
177                     </plugin>
178                 </plugins>
179             </build>
180         </profile>
181
182     </profiles>
183 </project>