5cd87250f4567d92f37368a6e9b15c15b2338572
[sdc/sdc-workflow-designer.git] / sdc-workflow-designer-ui / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ Copyright © 2016-2018 European Support Limited
4   ~
5   ~ Licensed under the Apache License, Version 2.0 (the "License");
6   ~ you may not use this file except in compliance with the License.
7   ~ You may obtain a copy of the License at
8   ~
9   ~      http://www.apache.org/licenses/LICENSE-2.0
10   ~
11   ~ Unless required by applicable law or agreed to in writing, software
12   ~ distributed under the License is distributed on an "AS IS" BASIS,
13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   ~ See the License for the specific language governing permissions and
15   ~ limitations under the License.
16   ~ Modifications copyright (c) 2019 Nokia
17 -->
18
19 <project xmlns="http://maven.apache.org/POM/4.0.0"
20     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22
23     <modelVersion>4.0.0</modelVersion>
24     <artifactId>sdc-workflow-designer-ui</artifactId>
25     <packaging>war</packaging>
26
27     <parent>
28         <groupId>org.onap.sdc.sdc-workflow-designer</groupId>
29         <artifactId>sdc-workflow-designer-parent</artifactId>
30         <version>1.12.0-SNAPSHOT</version>
31     </parent>
32
33     <properties>
34         <jest.command/>
35     </properties>
36
37     <dependencies>
38         <dependency>
39             <groupId>org.eclipse.jetty</groupId>
40             <artifactId>jetty-proxy</artifactId>
41             <version>${jetty.version}</version>
42             <exclusions>
43                 <exclusion>
44                     <artifactId>jetty-http</artifactId>
45                     <groupId>org.eclipse.jetty</groupId>
46                 </exclusion>
47             </exclusions>
48         </dependency>
49         <dependency>
50             <groupId>javax.servlet</groupId>
51             <artifactId>javax.servlet-api</artifactId>
52             <version>4.0.1</version>
53             <scope>provided</scope>
54         </dependency>
55         <dependency>
56             <groupId>org.eclipse.jetty</groupId>
57             <artifactId>jetty-http</artifactId>
58             <version>${jetty.version}</version>
59         </dependency>
60     </dependencies>
61
62     <build>
63         <plugins>
64             <plugin>
65                 <groupId>com.github.eirslett</groupId>
66                 <artifactId>frontend-maven-plugin</artifactId>
67                 <version>1.8.0</version>
68                 <configuration>
69                     <workingDirectory>src/main/frontend</workingDirectory>
70                     <installDirectory>target</installDirectory>
71                 </configuration>
72                 <executions>
73                     <execution>
74                         <id>install node and yarn</id>
75                         <goals>
76                             <goal>install-node-and-yarn</goal>
77                         </goals>
78                         <phase>generate-resources</phase>
79                         <configuration>
80                             <nodeVersion>v10.17.0</nodeVersion>
81                             <yarnVersion>v1.19.1</yarnVersion>
82                         </configuration>
83                     </execution>
84                     <execution>
85                         <id>yarn install</id>
86                         <goals>
87                             <goal>yarn</goal>
88                         </goals>
89                         <configuration>
90                             <arguments>install</arguments>
91                         </configuration>
92                     </execution>
93                     <execution>
94                         <id>yarn run webpack build</id>
95                         <goals>
96                             <goal>yarn</goal>
97                         </goals>
98                         <configuration>
99                             <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
100                             <arguments>build</arguments>
101                         </configuration>
102                     </execution>
103                     <execution>
104                         <id>ui test</id>
105                         <goals>
106                             <goal>yarn</goal>
107                         </goals>
108                         <configuration>
109                             <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
110                             <arguments>test-build ${jest.command}</arguments>
111                             <skip>${skipTests}</skip>
112                         </configuration>
113                         <phase>test</phase>
114                     </execution>
115                 </executions>
116             </plugin>
117             <plugin>
118                 <groupId>org.apache.maven.plugins</groupId>
119                 <artifactId>maven-war-plugin</artifactId>
120                 <version>3.2.2</version>
121                 <configuration>
122                     <webResources>
123                         <resource>
124                             <directory>src/main/frontend/dist</directory>
125                             <includes>
126                                 <include>*.*</include>
127                             </includes>
128                         </resource>
129                         <resource>
130                             <directory>src/main/frontend/external-resources/ping/</directory>
131                             <filtering>true</filtering>
132                             <includes>
133                                 <include>ping</include>
134                             </includes>
135                         </resource>
136                     </webResources>
137                 </configuration>
138             </plugin>
139             <plugin>
140                 <groupId>org.codehaus.mojo</groupId>
141                 <artifactId>build-helper-maven-plugin</artifactId>
142                 <version>${build-helper-maven-plugin.version}</version>
143                 <executions>
144                     <execution>
145                         <id>regex-property</id>
146                         <goals>
147                             <goal>regex-property</goal>
148                         </goals>
149                         <configuration>
150                             <name>jetty.docker.version</name>
151                             <value>${jetty.version}</value>
152                             <regex>.v[0-9]+</regex>
153                             <replacement/>
154                             <failIfNoMatch>false</failIfNoMatch>
155                         </configuration>
156                     </execution>
157                 </executions>
158             </plugin>
159         </plugins>
160     </build>
161     <profiles>
162         <profile>
163             <id>jest-windows-profile</id>
164             <activation>
165                 <os>
166                     <family>windows</family>
167                 </os>
168             </activation>
169             <properties>
170                 <jest.command>--runInBand</jest.command>
171             </properties>
172         </profile>
173         <profile>
174             <id>docker</id>
175             <activation>
176                 <activeByDefault>false</activeByDefault>
177             </activation>
178             <build>
179                 <plugins>
180                     <plugin>
181                         <artifactId>maven-resources-plugin</artifactId>
182                         <version>2.6</version>
183                         <executions>
184                             <execution>
185                                 <id>copy-resources-docker</id>
186                                 <phase>install</phase>
187                                 <goals>
188                                     <goal>copy-resources</goal>
189                                 </goals>
190                                 <configuration>
191                                     <outputDirectory>${basedir}/docker</outputDirectory>
192                                     <resources>
193                                         <resource>
194                                             <directory>${project.build.directory}</directory>
195                                             <include>${project.artifactId}-${project.version}.war</include>
196                                         </resource>
197                                     </resources>
198                                 </configuration>
199                             </execution>
200                         </executions>
201                     </plugin>
202                     <plugin>
203                         <groupId>io.fabric8</groupId>
204                         <artifactId>docker-maven-plugin</artifactId>
205                         <configuration>
206                             <apiVersion>${docker.api.version}</apiVersion>
207                             <images>
208                                 <image>
209                                     <name>onap/sdc-workflow-frontend</name>
210                                     <build>
211                                         <tags>
212                                             <tag>latest</tag>
213                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
214                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
215                                         </tags>
216                                         <dockerFileDir>${project.basedir}/docker</dockerFileDir>
217                                         <args>
218                                             <ARTIFACT>${project.artifactId}-${project.version}.war</ARTIFACT>
219                                         </args>
220                                     </build>
221                                 </image>
222                             </images>
223                         </configuration>
224                     </plugin>
225                 </plugins>
226             </build>
227         </profile>
228     </profiles>
229 </project>