blob: 0c3e083f242f1f0bcc4affa08a91bb34dcdbda6c [file] [log] [blame]
avigaffaa0858ef2017-09-12 11:46:01 +03001<project xmlns="http://maven.apache.org/POM/4.0.0"
2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
avigaffa00e935f2017-09-10 08:58:51 +03003 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
AviZi280f8012017-06-09 02:39:56 +03004 <modelVersion>4.0.0</modelVersion>
Michael Landoefa037d2017-02-19 12:57:33 +02005
avigaffaa0858ef2017-09-12 11:46:01 +03006 <groupId>org.openecomp.sdc</groupId>
AviZi280f8012017-06-09 02:39:56 +03007 <artifactId>onboarding-fe</artifactId>
8 <name>onboarding-ui-war</name>
9 <packaging>war</packaging>
Michael Landoefa037d2017-02-19 12:57:33 +020010
avigaffaa0858ef2017-09-12 11:46:01 +030011 <parent>
12 <groupId>org.openecomp.sdc</groupId>
13 <artifactId>sdc-onboarding</artifactId>
Michael Landod8a0dea2018-06-02 19:23:27 +030014 <version>1.3.0-SNAPSHOT</version>
avigaffaa0858ef2017-09-12 11:46:01 +030015 <relativePath>../onboarding</relativePath>
16 </parent>
17
18 <properties>
19 <maven.war.plugin.version>3.0.0</maven.war.plugin.version>
Einav Weiss Keidard2f57942018-02-14 14:00:07 +020020 <jest.command />
avigaffaa0858ef2017-09-12 11:46:01 +030021 </properties>
22
Einav Weiss Keidard2f57942018-02-14 14:00:07 +020023 <!-- ============================================= -->
24 <!-- Profile for windows to run jest one by the other due to current defect in node-graceful-js creating race condition -->
25 <!-- https://github.com/isaacs/node-graceful-fs/pull/119 -->
26 <!-- ============================================= -->
27 <profiles>
28 <profile>
29 <id>jest-windows-profile</id>
30 <activation>
31 <os>
32 <family>windows</family>
33 </os>
34 </activation>
35 <properties>
36 <jest.command>--runInBand</jest.command>
37 </properties>
38 </profile>
39 </profiles>
AviZi280f8012017-06-09 02:39:56 +030040 <build>
41 <plugins>
AviZi280f8012017-06-09 02:39:56 +030042 <plugin>
avigaffaa0858ef2017-09-12 11:46:01 +030043 <artifactId>maven-clean-plugin</artifactId>
44 <version>2.6.1</version>
45 <executions>
46 <execution>
47 <id>clean.dist.folder</id>
48 <phase>clean</phase>
49 <goals>
50 <goal>clean</goal>
51 </goals>
52 <configuration>
53 <filesets>
54 <fileset>
55 <directory>${basedir}/dist</directory>
56 </fileset>
svishnevb03fa612018-01-25 17:22:08 +020057 <fileset>
talig8e9c0652017-12-20 14:30:43 +020058 <directory>${basedir}/coverage</directory>
59 </fileset>
60 <fileset>
avigaffaa0858ef2017-09-12 11:46:01 +030061 <directory>${basedir}/../dox-sequence-diagram-ui/dist
62 </directory>
63 </fileset>
Einav Weiss Keidard049ca02018-03-21 13:31:23 +020064 </filesets>
65 </configuration>
66 </execution>
67 <execution>
68 <id>clean.nodemodules.folder</id>
69 <phase>clean</phase>
70 <goals>
71 <goal>clean</goal>
72 </goals>
73 <configuration>
74 <skip>${skipUICleanup}</skip>
75 <filesets>
76 <fileset>
77 <directory>${basedir}/node_modules</directory>
78 </fileset>
svishnevb03fa612018-01-25 17:22:08 +020079 <fileset>
80 <directory>${basedir}/../dox-sequence-diagram-ui/node_modules
81 </directory>
82 </fileset>
avigaffaa0858ef2017-09-12 11:46:01 +030083 </filesets>
84 </configuration>
85 </execution>
86 </executions>
87 </plugin>
88
89 <!-- ============================================= -->
90 <!-- Build the UI module node code -->
91 <!-- ============================================= -->
92 <plugin>
93 <groupId>com.github.eirslett</groupId>
94 <artifactId>frontend-maven-plugin</artifactId>
svishnevb03fa612018-01-25 17:22:08 +020095 <version>1.6</version>
avigaffaa0858ef2017-09-12 11:46:01 +030096
97 <configuration>
98 <installDirectory>${project.parent.parent.basedir}</installDirectory>
99 </configuration>
100
101 <executions>
102
103 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200104 <id>install node and yarn</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300105 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200106 <goal>install-node-and-yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300107 </goals>
108 <configuration>
svishnevb03fa612018-01-25 17:22:08 +0200109 <nodeVersion>v9.4.0</nodeVersion>
110 <yarnVersion>v1.3.2</yarnVersion>
avigaffaa0858ef2017-09-12 11:46:01 +0300111 </configuration>
Einav Weiss Keidard2f57942018-02-14 14:00:07 +0200112 </execution>
avigaffaa0858ef2017-09-12 11:46:01 +0300113
114 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200115 <id>yarn install in dox-sequence-diagram-ui</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300116 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200117 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300118 </goals>
119 <configuration>
120 <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
121 </workingDirectory>
122 <arguments>install</arguments>
123 </configuration>
124 </execution>
avigaffaa0858ef2017-09-12 11:46:01 +0300125 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200126 <id>yarn build in dox-sequence-diagram-ui</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300127 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200128 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300129 </goals>
130 <configuration>
ilanap1965d162018-01-04 11:34:59 +0200131 <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
avigaffaa0858ef2017-09-12 11:46:01 +0300132 </workingDirectory>
svishnevb03fa612018-01-25 17:22:08 +0200133 <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
ilanap1965d162018-01-04 11:34:59 +0200134 <arguments>run build</arguments>
avigaffaa0858ef2017-09-12 11:46:01 +0300135 </configuration>
136 </execution>
137
138 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200139 <id>yarn install</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300140 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200141 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300142 </goals>
143 <configuration>
144 <arguments>install</arguments>
145 </configuration>
146 </execution>
147
148 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200149 <id>yarn run build</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300150 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200151 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300152 </goals>
153 <configuration>
svishnevb03fa612018-01-25 17:22:08 +0200154 <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
155 <arguments>run build --version=${project.version}</arguments>
avigaffaa0858ef2017-09-12 11:46:01 +0300156 </configuration>
157 </execution>
talig8e9c0652017-12-20 14:30:43 +0200158 <execution>
159 <id>ui test</id>
160 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200161 <goal>yarn</goal>
Einav Weiss Keidard2f57942018-02-14 14:00:07 +0200162 </goals>
talig8e9c0652017-12-20 14:30:43 +0200163 <configuration>
svishnevb03fa612018-01-25 17:22:08 +0200164 <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
Einav Weiss Keidard2f57942018-02-14 14:00:07 +0200165 <arguments>run test-build ${jest.command}</arguments>
talig8e9c0652017-12-20 14:30:43 +0200166 </configuration>
ilanap785dc1e2018-01-08 15:50:18 +0200167 <!-- for some reason does not fail on test phase -->
168 <phase>install</phase>
talig8e9c0652017-12-20 14:30:43 +0200169 </execution>
avigaffaa0858ef2017-09-12 11:46:01 +0300170 </executions>
171 </plugin>
172
173 <plugin>
174 <artifactId>maven-antrun-plugin</artifactId>
175 <executions>
176 <execution>
177 <id>repack war</id>
178 <phase>prepare-package</phase>
179 <configuration>
180 <tasks>
181 <echo message="Building test environment"/>
182 <unzip src="dist/onboarding.war" dest="${basedir}/target/dist">
183 <patternset>
184 <include name="**/*"/>
185 </patternset>
186 </unzip>
187 </tasks>
188 </configuration>
189 <goals>
190 <goal>run</goal>
191 </goals>
192 </execution>
193 </executions>
194 </plugin>
195
196 <plugin>
197 <groupId>org.apache.maven.plugins</groupId>
AviZi280f8012017-06-09 02:39:56 +0300198 <artifactId>maven-war-plugin</artifactId>
avigaffaa0858ef2017-09-12 11:46:01 +0300199 <version>${maven.war.plugin.version}</version>
200 <configuration>
201 <webResources>
202 <resource>
203 <directory>${basedir}/target/dist</directory>
204 </resource>
205 </webResources>
206 </configuration>
207 </plugin>
AviZi280f8012017-06-09 02:39:56 +0300208 </plugins>
209 </build>
Michael Landoefa037d2017-02-19 12:57:33 +0200210
Michael Landoefa037d2017-02-19 12:57:33 +0200211</project>