blob: 8c90c826b1e3c4d7a9ed6f31bc05901470f22df3 [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 Lando0ad3c802017-09-19 16:32:59 +030014 <version>1.2.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>
58 <directory>${basedir}/node_modules</directory>
59 </fileset>
avigaffaa0858ef2017-09-12 11:46:01 +030060 <fileset>
talig8e9c0652017-12-20 14:30:43 +020061 <directory>${basedir}/coverage</directory>
62 </fileset>
63 <fileset>
avigaffaa0858ef2017-09-12 11:46:01 +030064 <directory>${basedir}/../dox-sequence-diagram-ui/dist
65 </directory>
66 </fileset>
svishnevb03fa612018-01-25 17:22:08 +020067 <fileset>
68 <directory>${basedir}/../dox-sequence-diagram-ui/node_modules
69 </directory>
70 </fileset>
avigaffaa0858ef2017-09-12 11:46:01 +030071 </filesets>
72 </configuration>
73 </execution>
74 </executions>
75 </plugin>
76
77 <!-- ============================================= -->
78 <!-- Build the UI module node code -->
79 <!-- ============================================= -->
80 <plugin>
81 <groupId>com.github.eirslett</groupId>
82 <artifactId>frontend-maven-plugin</artifactId>
svishnevb03fa612018-01-25 17:22:08 +020083 <version>1.6</version>
avigaffaa0858ef2017-09-12 11:46:01 +030084
85 <configuration>
86 <installDirectory>${project.parent.parent.basedir}</installDirectory>
87 </configuration>
88
89 <executions>
90
91 <execution>
svishnevb03fa612018-01-25 17:22:08 +020092 <id>install node and yarn</id>
avigaffaa0858ef2017-09-12 11:46:01 +030093 <goals>
svishnevb03fa612018-01-25 17:22:08 +020094 <goal>install-node-and-yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +030095 </goals>
96 <configuration>
svishnevb03fa612018-01-25 17:22:08 +020097 <nodeVersion>v9.4.0</nodeVersion>
98 <yarnVersion>v1.3.2</yarnVersion>
avigaffaa0858ef2017-09-12 11:46:01 +030099 </configuration>
Einav Weiss Keidard2f57942018-02-14 14:00:07 +0200100 </execution>
avigaffaa0858ef2017-09-12 11:46:01 +0300101
102 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200103 <id>yarn install in dox-sequence-diagram-ui</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300104 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200105 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300106 </goals>
107 <configuration>
108 <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
109 </workingDirectory>
110 <arguments>install</arguments>
111 </configuration>
112 </execution>
avigaffaa0858ef2017-09-12 11:46:01 +0300113 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200114 <id>yarn build in dox-sequence-diagram-ui</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300115 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200116 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300117 </goals>
118 <configuration>
ilanap1965d162018-01-04 11:34:59 +0200119 <workingDirectory>${project.basedir}/../dox-sequence-diagram-ui
avigaffaa0858ef2017-09-12 11:46:01 +0300120 </workingDirectory>
svishnevb03fa612018-01-25 17:22:08 +0200121 <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
ilanap1965d162018-01-04 11:34:59 +0200122 <arguments>run build</arguments>
avigaffaa0858ef2017-09-12 11:46:01 +0300123 </configuration>
124 </execution>
125
126 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200127 <id>yarn install</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300128 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200129 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300130 </goals>
131 <configuration>
132 <arguments>install</arguments>
133 </configuration>
134 </execution>
135
136 <execution>
svishnevb03fa612018-01-25 17:22:08 +0200137 <id>yarn run build</id>
avigaffaa0858ef2017-09-12 11:46:01 +0300138 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200139 <goal>yarn</goal>
avigaffaa0858ef2017-09-12 11:46:01 +0300140 </goals>
141 <configuration>
svishnevb03fa612018-01-25 17:22:08 +0200142 <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
143 <arguments>run build --version=${project.version}</arguments>
avigaffaa0858ef2017-09-12 11:46:01 +0300144 </configuration>
145 </execution>
talig8e9c0652017-12-20 14:30:43 +0200146 <execution>
147 <id>ui test</id>
148 <goals>
svishnevb03fa612018-01-25 17:22:08 +0200149 <goal>yarn</goal>
Einav Weiss Keidard2f57942018-02-14 14:00:07 +0200150 </goals>
talig8e9c0652017-12-20 14:30:43 +0200151 <configuration>
svishnevb03fa612018-01-25 17:22:08 +0200152 <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
Einav Weiss Keidard2f57942018-02-14 14:00:07 +0200153 <arguments>run test-build ${jest.command}</arguments>
talig8e9c0652017-12-20 14:30:43 +0200154 </configuration>
ilanap785dc1e2018-01-08 15:50:18 +0200155 <!-- for some reason does not fail on test phase -->
156 <phase>install</phase>
talig8e9c0652017-12-20 14:30:43 +0200157 </execution>
avigaffaa0858ef2017-09-12 11:46:01 +0300158 </executions>
159 </plugin>
160
161 <plugin>
162 <artifactId>maven-antrun-plugin</artifactId>
163 <executions>
164 <execution>
165 <id>repack war</id>
166 <phase>prepare-package</phase>
167 <configuration>
168 <tasks>
169 <echo message="Building test environment"/>
170 <unzip src="dist/onboarding.war" dest="${basedir}/target/dist">
171 <patternset>
172 <include name="**/*"/>
173 </patternset>
174 </unzip>
175 </tasks>
176 </configuration>
177 <goals>
178 <goal>run</goal>
179 </goals>
180 </execution>
181 </executions>
182 </plugin>
183
184 <plugin>
185 <groupId>org.apache.maven.plugins</groupId>
AviZi280f8012017-06-09 02:39:56 +0300186 <artifactId>maven-war-plugin</artifactId>
avigaffaa0858ef2017-09-12 11:46:01 +0300187 <version>${maven.war.plugin.version}</version>
188 <configuration>
189 <webResources>
190 <resource>
191 <directory>${basedir}/target/dist</directory>
192 </resource>
193 </webResources>
194 </configuration>
195 </plugin>
AviZi280f8012017-06-09 02:39:56 +0300196 </plugins>
197 </build>
Michael Landoefa037d2017-02-19 12:57:33 +0200198
Michael Landoefa037d2017-02-19 12:57:33 +0200199</project>