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