Build new VID UI
[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       <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   <profiles>
60     <profile>
61       <id>if-not-webpack</id>
62       <activation><activeByDefault>true</activeByDefault></activation>
63       <build>
64         <plugins>
65           <plugin>
66             <groupId>org.apache.maven.plugins</groupId>
67             <artifactId>maven-antrun-plugin</artifactId>
68             <version>1.8</version>
69             <executions>
70               <execution>
71                 <id>make-empty-dist</id>
72                 <phase>validate</phase>
73                 <configuration>
74                   <target>
75                     <mkdir dir="${project.basedir}/dist/" />
76                     <echo file="${project.basedir}/dist/NO-WEBPACK.txt" append="false">
77                       Note: 'webpack' profile was not selected while mvn build. This 'dist' folder was created to make the war creation through.
78                     </echo>
79                   </target>
80                 </configuration>
81                 <goals>
82                   <goal>run</goal>
83                 </goals>
84               </execution>
85             </executions>
86           </plugin>
87
88         </plugins>
89       </build>
90     </profile>
91     <profile>
92       <id>webpack</id>
93       <build>
94         <plugins>
95           <plugin>
96             <groupId>com.github.eirslett</groupId>
97             <artifactId>frontend-maven-plugin</artifactId>
98             <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
99             <version>1.6</version>
100
101             <executions>
102
103               <execution>
104                 <id>install node and npm</id>
105                 <goals>
106                   <goal>install-node-and-npm</goal>
107                 </goals>
108                 <configuration>
109                   <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
110                   <nodeVersion>v8.9.4</nodeVersion>
111                   <npmVersion>5.6.0</npmVersion>
112                 </configuration>
113               </execution>
114
115               <execution>
116                 <id>npm set no-progress</id>
117                 <goals>
118                   <goal>npm</goal>
119                 </goals>
120                 <configuration>
121                   <arguments>set progress=false</arguments>
122                 </configuration>
123               </execution>
124
125               <execution>
126                 <id>npm install</id>
127                 <goals>
128                   <goal>npm</goal>
129                 </goals>
130                 <!-- Optional configuration which provides for running any npm command -->
131                 <configuration>
132                   <arguments>install</arguments>
133                   <environmentVariables>
134                     <CYPRESS_INSTALL_BINARY>0</CYPRESS_INSTALL_BINARY>
135                   </environmentVariables>
136                 </configuration>
137               </execution>
138
139               <execution>
140                 <id>npm run test</id>
141                 <goals>
142                   <goal>npm</goal>
143                 </goals>
144                 <configuration>
145                   <arguments>run test</arguments>
146                 </configuration>
147               </execution>
148
149               <execution>
150                 <id>npm run build</id>
151                 <goals>
152                   <goal>npm</goal>
153                 </goals>
154                 <configuration>
155                   <arguments>run build</arguments>
156                 </configuration>
157               </execution>
158
159             </executions>
160           </plugin>
161         </plugins>
162       </build>
163     </profile>
164
165     <profile>
166       <id>cypress</id>
167       <build>
168         <plugins>
169           <plugin>
170             <groupId>com.github.eirslett</groupId>
171             <artifactId>frontend-maven-plugin</artifactId>
172             <!-- NB! Set <version> to the latest released version of frontend-maven-plugin, like in README.md -->
173             <version>1.6</version>
174
175             <executions>
176
177               <execution>
178                 <id>install node and npm</id>
179                 <goals>
180                   <goal>install-node-and-npm</goal>
181                 </goals>
182                 <configuration>
183                   <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions -->
184                   <nodeVersion>v8.9.4</nodeVersion>
185                   <npmVersion>5.6.0</npmVersion>
186                 </configuration>
187               </execution>
188
189               <execution>
190                 <id>npm install cypress</id>
191                 <goals>
192                   <goal>npm</goal>
193                 </goals>
194                 <!-- Optional configuration which provides for running any npm command -->
195                 <configuration>
196                   <arguments>install --verbose cypress @bahmutov/add-typescript-to-cypress</arguments>
197                   <environmentVariables>
198                     <NO_PROXY>.att.com</NO_PROXY>
199                     <http_proxy>http://one.proxy.att.com:8080</http_proxy>
200                     <https_proxy>http://one.proxy.att.com:8080</https_proxy>
201                   </environmentVariables>
202                 </configuration>
203               </execution>
204
205               <execution>
206                 <id>npm run cypress</id>
207                 <goals>
208                   <goal>npm</goal>
209                 </goals>
210                 <configuration>
211                   <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
212                   <arguments>run cypress:run -- --config baseUrl=http://${VID_HOST}:8080/vid</arguments>
213                 </configuration>
214               </execution>
215
216             </executions>
217           </plugin>
218         </plugins>
219       </build>
220     </profile>
221   </profiles>
222
223   <build>
224     <finalName>vid-webpack-master</finalName>
225     <plugins>
226
227       <plugin>
228         <groupId>org.apache.maven.plugins</groupId>
229         <artifactId>maven-war-plugin</artifactId>
230         <version>3.2.0</version>
231         <configuration>
232           <webResources>
233             <resource>
234               <!-- this is relative to the pom.xml directory -->
235               <directory>dist</directory>
236               <targetPath>app/ui</targetPath>
237             </resource>
238           </webResources>
239           <webXml>src/WEB-INF/web.xml</webXml>
240         </configuration>
241       </plugin>
242
243     </plugins>
244
245
246   </build>
247
248   <dependencies>
249   </dependencies>
250
251 </project>