fd069d7414ec828aa38aae16fe472e6fa7d9aa46
[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>1.3.0</version>
13   <packaging>war</packaging>
14   <name>VID UI</name>
15   <description>VID UI</description>
16
17   <properties>
18     <encoding>UTF-8</encoding>
19     <!--<epsdk.version>1.3.0</epsdk.version>-->
20     <!--<springframework.version>4.2.0.RELEASE</springframework.version>-->
21     <!--<hibernate.version>4.3.11.Final</hibernate.version>-->
22     <!--<jackson.version>2.6.3</jackson.version>-->
23     <!-- Skip assembling the zip by default -->
24     <skipassembly>true</skipassembly>
25     <!-- Tests usually require some setup that maven cannot do, so skip. -->
26     <skiptests>false</skiptests>
27     <!-- this should be commented for local debugging -->
28     <!-- <deployenv>local</deployenv> -->
29     <nexusproxy>https://nexus.onap.org</nexusproxy>
30     <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
31     <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
32     <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
33   </properties>
34
35
36   <repositories>
37     <repository>
38       <!-- Snapshots repository has ECOMP snapshot artifacts -->
39       <id>att-mavencentral-ecomp-snapshots-repo</id>
40       <name>ATT Maven Central - Snapshots</name>
41       <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/att-repository-snapshots/</url>
42     </repository>
43     <repository>
44       <id>onap-staging</id>
45       <name>ONAP - Staging Repository</name>
46       <url>${nexusproxy}/${stagingNexusPath}</url>
47     </repository>
48     <repository>
49       <!-- Releases repository has ECOMP release artifacts -->
50       <id>att-mavencentral-ecomp-releases-repo</id>
51       <name>ATT Maven Central - Releases</name>
52       <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/att-repository-releases/</url>
53     </repository>
54     <repository>
55       <!-- Third party repository has Oracle and other jars -->
56       <id>att-mavencentral-3rd-repo</id>
57       <name>ATT Maven Central - Third Party</name>
58       <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/att-repository-3rd-party/</url>
59     </repository>
60     <repository>
61       <!-- Service Assurance group has UEB/Cambria jars -->
62       <id>att-mavencentral-sa-group</id>
63       <name>ATT Maven Central - Service Assurance Group</name>
64       <url>http://mavencentral.it.att.com:8084/nexus/content/groups/2020SAPC/</url>
65     </repository>
66     <repository>
67       <!-- SWM repository has EELF jars -->
68       <id>att-swm-repo</id>
69       <name>ATT SWM Repository</name>
70       <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/swm-releases</url>
71     </repository>
72
73     <repository>
74       <!-- Public repository has ECOMP jars -->
75       <id>att-mavencentral-public</id>
76       <name>ATT Maven Central - Public Group</name>
77       <url>http://mavencentral.it.att.com:8084/nexus/content/groups/att-public-group</url>
78     </repository>
79     <repository>
80       <id>ecomp-releases</id>
81       <name>OpenECOMP - Release Repository</name>
82       <url>${nexusproxy}/${releaseNexusPath}</url>
83     </repository>
84     <repository>
85       <id>ecomp-snapshots</id>
86       <name>OpenECOMP - Snapshot Repository</name>
87       <url>${nexusproxy}/${snapshotNexusPath}</url>
88     </repository>
89     <repository>
90       <id>ecomp-public</id>
91       <name>ecomp onap public Repository</name>
92       <url>https://nexus.onap.org/content/groups/public</url>
93     </repository>
94   </repositories>
95
96   <distributionManagement>
97     <repository>
98       <id>vid-releases</id>
99       <name>VID Release Repository</name>
100       <url>https://162.242.254.138:8443/repository/maven-releases</url>
101     </repository>
102
103     <snapshotRepository>
104       <id>vid-snapshots</id>
105       <name>VID Snapshot Repository</name>
106       <url>https://162.242.254.138:8443/repository/maven-snapshots</url>
107     </snapshotRepository>
108   </distributionManagement>
109
110   <profiles>
111     <profile>
112       <id>if-not-webpack</id>
113       <activation><activeByDefault>true</activeByDefault></activation>
114       <build>
115         <plugins>
116           <plugin>
117             <groupId>org.apache.maven.plugins</groupId>
118             <artifactId>maven-antrun-plugin</artifactId>
119             <version>1.8</version>
120             <executions>
121               <execution>
122                 <id>make-empty-dist</id>
123                 <phase>validate</phase>
124                 <configuration>
125                   <target>
126                     <mkdir dir="${project.basedir}/dist/" />
127                     <echo file="${project.basedir}/dist/NO-WEBPACK.txt" append="false">
128                       Note: 'webpack' profile was not selected while mvn build. This 'dist' folder was created to make the war creation through.
129                     </echo>
130                   </target>
131                 </configuration>
132                 <goals>
133                   <goal>run</goal>
134                 </goals>
135               </execution>
136             </executions>
137           </plugin>
138
139         </plugins>
140       </build>
141     </profile>
142     <profile>
143       <id>webpack</id>
144       <build>
145         <plugins>
146           <plugin>
147             <groupId>com.github.eirslett</groupId>
148             <artifactId>frontend-maven-plugin</artifactId>
149             <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
150             <version>1.6</version>
151
152             <executions>
153
154               <execution>
155                 <id>install node and npm</id>
156                 <goals>
157                   <goal>install-node-and-npm</goal>
158                 </goals>
159                 <configuration>
160                   <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
161                   <nodeVersion>v8.9.4</nodeVersion>
162                   <npmVersion>5.6.0</npmVersion>
163                 </configuration>
164               </execution>
165
166               <execution>
167                 <id>npm set no-progress</id>
168                 <goals>
169                   <goal>npm</goal>
170                 </goals>
171                 <configuration>
172                   <arguments>set progress=false</arguments>
173                 </configuration>
174               </execution>
175
176               <execution>
177                 <id>npm install</id>
178                 <goals>
179                   <goal>npm</goal>
180                 </goals>
181                 <!-- Optional configuration which provides for running any npm command -->
182                 <configuration>
183                   <arguments>install</arguments>
184                   <environmentVariables>
185                     <CYPRESS_INSTALL_BINARY>0</CYPRESS_INSTALL_BINARY>
186                     <NO_PROXY>.att.com</NO_PROXY>
187                     <http_proxy>http://one.proxy.att.com:8080</http_proxy>
188                     <https_proxy>http://one.proxy.att.com:8080</https_proxy> <!-- for cypress install -->
189                   </environmentVariables>
190                 </configuration>
191               </execution>
192
193               <execution>
194                 <id>npm run test</id>
195                 <goals>
196                   <goal>npm</goal>
197                 </goals>
198                 <configuration>
199                   <arguments>run test</arguments>
200                 </configuration>
201               </execution>
202
203               <execution>
204                 <id>npm run build</id>
205                 <goals>
206                   <goal>npm</goal>
207                 </goals>
208                 <configuration>
209                   <arguments>run build</arguments>
210                 </configuration>
211               </execution>
212
213             </executions>
214           </plugin>
215         </plugins>
216       </build>
217     </profile>
218
219     <profile>
220       <id>cypress</id>
221       <build>
222         <plugins>
223           <plugin>
224             <groupId>com.github.eirslett</groupId>
225             <artifactId>frontend-maven-plugin</artifactId>
226             <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
227             <version>1.6</version>
228
229             <executions>
230
231               <execution>
232                 <id>install node and npm</id>
233                 <goals>
234                   <goal>install-node-and-npm</goal>
235                 </goals>
236                 <configuration>
237                   <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
238                   <nodeVersion>v8.9.4</nodeVersion>
239                   <npmVersion>5.6.0</npmVersion>
240                 </configuration>
241               </execution>
242
243               <execution>
244                 <id>npm install cypress</id>
245                 <goals>
246                   <goal>npm</goal>
247                 </goals>
248                 <!-- Optional configuration which provides for running any npm command -->
249                 <configuration>
250                   <arguments>install --verbose cypress @bahmutov/add-typescript-to-cypress</arguments>
251                   <environmentVariables>
252                     <NO_PROXY>.att.com</NO_PROXY>
253                     <http_proxy>http://one.proxy.att.com:8080</http_proxy>
254                     <https_proxy>http://one.proxy.att.com:8080</https_proxy>
255                   </environmentVariables>
256                 </configuration>
257               </execution>
258
259               <execution>
260                 <id>npm run cypress</id>
261                 <goals>
262                   <goal>npm</goal>
263                 </goals>
264                 <configuration>
265                   <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
266                   <arguments>run cypress:run -- --config baseUrl=http://${VID_HOST}:8080/vid</arguments>
267                 </configuration>
268               </execution>
269
270             </executions>
271           </plugin>
272         </plugins>
273       </build>
274     </profile>
275   </profiles>
276
277   <build>
278     <finalName>vid-webpack-master</finalName>
279     <plugins>
280
281       <plugin>
282         <groupId>org.apache.maven.plugins</groupId>
283         <artifactId>maven-war-plugin</artifactId>
284         <version>3.2.0</version>
285         <configuration>
286           <webResources>
287             <resource>
288               <!-- this is relative to the pom.xml directory -->
289               <directory>dist</directory>
290               <targetPath>app/ui</targetPath>
291             </resource>
292           </webResources>
293           <webXml>src/WEB-INF/web.xml</webXml>
294         </configuration>
295       </plugin>
296
297     </plugins>
298
299
300   </build>
301
302   <dependencies>
303   </dependencies>
304
305 </project>