Merge "Bump VID version to 5.0.2"
[vid.git] / vid-webpack-master / pom.xml
1 <?xml version="1.0"?>
2 <project
3   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4   xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5   <modelVersion>4.0.0</modelVersion>
6
7   <!-- This is the Maven project object model (POM) file for VID web application
8       based on the ECOMP SDK distribution. This file stands alone; it does not
9       inherit from a parent maven module. -->
10   <groupId>org.onap.vid</groupId>
11   <artifactId>vid-webpack-master</artifactId>
12   <version>5.0.2-SNAPSHOT</version>
13   <packaging>war</packaging>
14   <name>VID UI</name>
15   <description>VID UI</description>
16
17   <properties>
18     <encoding>UTF-8</encoding>
19     <!--<springframework.version>5.1.6.RELEASE</springframework.version>-->
20     <!--<hibernate.version>4.3.11.Final</hibernate.version>-->
21     <!--<jackson.version>2.6.3</jackson.version>-->
22     <!-- Skip assembling the zip by default -->
23     <skipassembly>true</skipassembly>
24     <!-- Tests usually require some setup that maven cannot do, so skip. -->
25     <skiptests>false</skiptests>
26     <!-- this should be commented for local debugging -->
27     <!-- <deployenv>local</deployenv> -->
28     <nexusproxy>https://nexus.onap.org</nexusproxy>
29     <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
30     <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
31     <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
32     <NPM_CMD>build</NPM_CMD>
33   </properties>
34
35
36   <repositories>
37     <repository>
38       <id>onap-staging</id>
39       <name>ONAP - Staging Repository</name>
40       <url>${nexusproxy}/${stagingNexusPath}</url>
41     </repository>
42     <repository>
43       <id>ecomp-releases</id>
44       <name>OpenECOMP - Release Repository</name>
45       <url>${nexusproxy}/${releaseNexusPath}</url>
46     </repository>
47     <repository>
48       <id>ecomp-snapshots</id>
49       <name>OpenECOMP - Snapshot Repository</name>
50       <url>${nexusproxy}/${snapshotNexusPath}</url>
51     </repository>
52     <repository>
53       <id>ecomp-public</id>
54       <name>ecomp onap public Repository</name>
55       <url>https://nexus.onap.org/content/groups/public</url>
56     </repository>
57   </repositories>
58
59   <distributionManagement>
60     <repository>
61       <id>ecomp-releases</id>
62       <name>VID Release Repository</name>
63       <url>${nexusproxy}/${releaseNexusPath}</url>
64     </repository>
65     <snapshotRepository>
66       <id>ecomp-snapshots</id>
67       <name>VID Snapshot Repository</name>
68       <url>${nexusproxy}/${snapshotNexusPath}</url>
69     </snapshotRepository>
70
71   </distributionManagement>
72
73   <profiles>
74     <profile>
75       <id>if-not-webpack</id>
76       <activation>
77         <property>
78           <name>skipModernUi</name>
79           <value>true</value>
80         </property>
81       </activation>
82       <build>
83         <plugins>
84           <plugin>
85             <groupId>org.apache.maven.plugins</groupId>
86             <artifactId>maven-antrun-plugin</artifactId>
87             <version>1.8</version>
88             <executions>
89               <execution>
90                 <id>make-empty-dist</id>
91                 <phase>validate</phase>
92                 <configuration>
93                   <target>
94                     <mkdir dir="${project.basedir}/dist/"/>
95                     <echo file="${project.basedir}/dist/NO-WEBPACK.txt" append="false">
96                       Note: 'webpack' profile was not selected while mvn build. This 'dist' folder was created to make
97                       the war creation through.
98                     </echo>
99                   </target>
100                 </configuration>
101                 <goals>
102                   <goal>run</goal>
103                 </goals>
104               </execution>
105             </executions>
106           </plugin>
107
108         </plugins>
109       </build>
110     </profile>
111     <profile>
112       <id>webpack-npm</id>
113       <activation>
114         <property>
115           <name>skipModernUi</name>
116           <value>!true</value>
117         </property>
118         <activeByDefault>true</activeByDefault>
119       </activation>
120       <build>
121         <plugins>
122           <plugin>
123             <groupId>com.github.eirslett</groupId>
124             <artifactId>frontend-maven-plugin</artifactId>
125             <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
126             <version>1.6</version>
127
128             <executions>
129
130               <execution>
131                 <id>install node and npm</id>
132                 <goals>
133                   <goal>install-node-and-npm</goal>
134                 </goals>
135                 <configuration>
136                   <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
137                   <nodeVersion>v8.9.4</nodeVersion>
138                   <npmVersion>5.6.0</npmVersion>
139                 </configuration>
140               </execution>
141
142               <execution>
143                 <id>npm set no-progress</id>
144                 <goals>
145                   <goal>npm</goal>
146                 </goals>
147                 <configuration>
148                   <arguments>set progress=false</arguments>
149                 </configuration>
150               </execution>
151
152               <execution>
153                 <id>npm install</id>
154                 <goals>
155                   <goal>npm</goal>
156                 </goals>
157                 <!-- Optional configuration which provides for running any npm command -->
158                 <configuration>
159                   <arguments>install</arguments>
160                   <environmentVariables>
161                     <CYPRESS_INSTALL_BINARY>0</CYPRESS_INSTALL_BINARY>
162                   </environmentVariables>
163                 </configuration>
164               </execution>
165
166               <execution>
167                 <id>npm run</id>
168                 <goals>
169                   <goal>npm</goal>
170                 </goals>
171                 <configuration>
172                   <arguments>run ${NPM_CMD}</arguments>
173                 </configuration>
174               </execution>
175             </executions>
176           </plugin>
177         </plugins>
178       </build>
179     </profile>
180
181     <profile>
182       <id>cypress</id>
183       <build>
184         <plugins>
185           <plugin>
186             <groupId>com.github.eirslett</groupId>
187             <artifactId>frontend-maven-plugin</artifactId>
188             <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
189             <version>1.6</version>
190
191             <executions>
192
193               <execution>
194                 <id>install node and npm</id>
195                 <goals>
196                   <goal>install-node-and-npm</goal>
197                 </goals>
198                 <configuration>
199                   <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
200                   <nodeVersion>v8.9.4</nodeVersion>
201                   <npmVersion>5.6.0</npmVersion>
202                 </configuration>
203               </execution>
204
205               <execution>
206                 <id>npm install cypress</id>
207                 <goals>
208                   <goal>npm</goal>
209                 </goals>
210                 <!-- Optional configuration which provides for running any npm command -->
211                 <configuration>
212                   <arguments>install --verbose cypress @bahmutov/add-typescript-to-cypress</arguments>
213                   <environmentVariables>
214                     <NO_PROXY>.att.com</NO_PROXY>
215                     <http_proxy>http://one.proxy.att.com:8080</http_proxy>
216                     <https_proxy>http://one.proxy.att.com:8080</https_proxy>
217                   </environmentVariables>
218                 </configuration>
219               </execution>
220
221               <execution>
222                 <id>npm run cypress</id>
223                 <goals>
224                   <goal>npm</goal>
225                 </goals>
226                 <configuration>
227                   <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
228                   <arguments>run cypress:run -- --config baseUrl=http://${VID_HOST}:8080/vid</arguments>
229                 </configuration>
230               </execution>
231
232             </executions>
233           </plugin>
234         </plugins>
235       </build>
236     </profile>
237   </profiles>
238
239   <build>
240     <finalName>vid-webpack-master</finalName>
241     <plugins>
242
243       <plugin>
244         <groupId>org.apache.maven.plugins</groupId>
245         <artifactId>maven-war-plugin</artifactId>
246         <version>3.2.0</version>
247         <configuration>
248           <webResources>
249             <resource>
250               <!-- this is relative to the pom.xml directory -->
251               <directory>dist</directory>
252               <targetPath>app/ui</targetPath>
253             </resource>
254           </webResources>
255           <webXml>src/WEB-INF/web.xml</webXml>
256         </configuration>
257       </plugin>
258     <plugin>
259       <artifactId>maven-clean-plugin</artifactId>
260       <configuration>
261         <filesets>
262           <fileset>
263             <directory>dist</directory>
264           </fileset>
265         </filesets>
266       </configuration>
267     </plugin>
268     </plugins>
269   </build>
270   <dependencies>
271   </dependencies>
272 </project>