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