Replaced old implementation at root
[sdc/sdc-workflow-designer.git] / 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   -->
17
18 <project xmlns="http://maven.apache.org/POM/4.0.0"
19          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21
22     <modelVersion>4.0.0</modelVersion>
23
24     <artifactId>workflow-designer-ui</artifactId>
25     <packaging>war</packaging>
26
27     <parent>
28         <groupId>org.onap.sdc.workflow_designer</groupId>
29         <artifactId>workflow-designer-parent</artifactId>
30         <version>1.3.0-SNAPSHOT</version>
31     </parent>
32
33     <properties>        
34         <jest.command />
35     </properties>
36
37     
38     <dependencies>
39         <dependency>
40             <groupId>org.eclipse.jetty</groupId>
41             <artifactId>jetty-proxy</artifactId>
42             <version>9.4.11.v20180605</version>
43         </dependency>
44         <dependency>
45             <groupId>javax.servlet</groupId>
46             <artifactId>javax.servlet-api</artifactId>
47             <version>3.0.1</version>
48             <scope>provided</scope>
49         </dependency>
50     </dependencies>
51
52     <build>
53         <plugins>
54             <plugin>
55                 <groupId>com.github.eirslett</groupId>
56                 <artifactId>frontend-maven-plugin</artifactId>
57                 <version>1.6</version>
58                 <configuration>
59                     <workingDirectory>src/main/frontend</workingDirectory>
60                     <installDirectory>target</installDirectory>
61                 </configuration>
62                 <executions>
63                     <execution>
64                         <id>install node and yarn</id>
65                         <goals>
66                             <goal>install-node-and-yarn</goal>
67                         </goals>
68                         <phase>generate-resources</phase>
69                         <configuration>
70                             <nodeVersion>v9.4.0</nodeVersion>
71                             <yarnVersion>v1.7.0</yarnVersion>
72                         </configuration>
73                     </execution>
74                     <execution>
75                         <id>yarn install</id>
76                         <goals>
77                             <goal>yarn</goal>
78                         </goals>
79                         <configuration>
80                             <arguments>install</arguments>
81                         </configuration>
82                     </execution>
83                     <execution>
84                         <id>yarn run webpack build</id>
85                         <goals>
86                             <goal>yarn</goal>
87                         </goals>
88                         <configuration>
89                             <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
90                             <arguments>build</arguments>
91                         </configuration>
92                     </execution>
93                     <execution>
94                         <id>ui test</id>
95                         <goals>
96                             <goal>yarn</goal>
97                         </goals>
98                         <configuration>
99                             <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
100                             <arguments>test-build ${jest.command}</arguments>
101                             <skip>${skipTests}</skip>
102                         </configuration>                       
103                         <phase>test</phase>
104                     </execution>
105                 </executions>
106             </plugin>
107             <plugin>
108                 <groupId>org.apache.maven.plugins</groupId>
109                 <artifactId>maven-war-plugin</artifactId>
110                 <version>3.2.2</version>
111                 <configuration>
112                     <webResources>
113                         <resource>
114                             <directory>src/main/frontend/dist</directory>
115                             <includes>
116                                 <include>*.html</include>
117                                 <include>*.js</include>
118                             </includes>
119                         </resource>
120                         <resource>
121                             <directory>src/main/frontend/external-resources/ping/</directory>                            
122                             <filtering>true</filtering>
123                             <includes>
124                                 <include>ping</include>
125                             </includes>
126                         </resource>
127                     </webResources>
128                 </configuration>
129             </plugin>
130         </plugins>
131     </build>
132     <profiles>
133         <profile>
134             <id>jest-windows-profile</id>
135             <activation>
136                 <os>
137                     <family>windows</family>
138                 </os>
139             </activation>
140             <properties>
141                 <jest.command>--runInBand</jest.command>
142             </properties>
143         </profile>
144         <profile>
145             <id>docker</id>
146             <activation>
147                 <activeByDefault>false</activeByDefault>
148             </activation>
149             <build>
150                 <plugins>
151                     <plugin>
152                         <groupId>io.fabric8</groupId>
153                         <artifactId>docker-maven-plugin</artifactId>
154                         <configuration>
155                             <images>
156                                 <image>
157                                     <name>onap/workflow-frontend</name>
158                                     <build>
159                                         <tags>
160                                             <tag>${project.version}</tag>
161                                         </tags>
162                                         <from>jetty:9.4.11-alpine</from>
163                                         <user>root</user>
164                                         <assembly>
165                                             <descriptorRef>artifact</descriptorRef>
166                                             <targetDir>/var/lib/jetty/webapps</targetDir>
167                                         </assembly>
168                                         <entryPoint>
169                                             java -DproxyTo=$BACKEND $JAVA_OPTIONS -jar $JETTY_HOME/start.jar
170                                         </entryPoint>
171                                     </build>
172                                 </image>
173                             </images>
174                         </configuration>
175                     </plugin>
176                 </plugins>
177             </build>
178         </profile>
179     </profiles>
180 </project>
181