add a new profil for fast build
[sdc.git] / ui-ci / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
5   <modelVersion>4.0.0</modelVersion>
6
7   <artifactId>ui-ci</artifactId>
8   <description>Selenium tests for the SDnC Application</description>
9
10   <parent>
11     <groupId>org.openecomp.sdc</groupId>
12     <artifactId>sdc-main</artifactId>
13     <version>1.7.0-SNAPSHOT</version>
14   </parent>
15
16   <properties>
17     <sonar.skip>true</sonar.skip>
18     <jacoco.skip>true</jacoco.skip>
19     <aspectj.version>1.8.10</aspectj.version>
20   </properties>
21
22   <dependencies>
23     <!--JUnit Jupiter Engine to depend on the JUnit5 engine and JUnit 5 API -->
24     <dependency>
25       <groupId>org.junit.jupiter</groupId>
26       <artifactId>junit-jupiter-engine</artifactId>
27       <version>${junitJupiter.version}</version>
28       <scope>test</scope>
29     </dependency>
30     <!--JUnit Jupiter Engine to depend on the JUnit4 engine and JUnit 4 API  -->
31     <dependency>
32       <groupId>org.junit.vintage</groupId>
33       <artifactId>junit-vintage-engine</artifactId>
34       <version>${junitJupiter.version}</version>
35       <scope>test</scope>
36     </dependency>
37
38     <dependency>
39       <groupId>com.google.guava</groupId>
40       <artifactId>guava</artifactId>
41       <version>${guava.version}</version>
42       <scope>compile</scope>
43     </dependency>
44
45     <dependency>
46       <groupId>org.seleniumhq.selenium</groupId>
47       <artifactId>selenium-java</artifactId>
48
49       <version>2.53.1</version>
50       <exclusions>
51         <exclusion>
52           <groupId>org.eclipse.jetty</groupId>
53           <artifactId>jetty-util</artifactId>
54         </exclusion>
55         <exclusion>
56           <groupId>io.netty</groupId>
57           <artifactId>netty</artifactId>
58         </exclusion>
59       </exclusions>
60     </dependency>
61
62     <dependency>
63       <groupId>org.eclipse.jetty</groupId>
64       <artifactId>jetty-util</artifactId>
65       <version>${jetty.version}</version>
66     </dependency>
67
68     <dependency>
69       <groupId>org.seleniumhq.selenium</groupId>
70       <artifactId>selenium-server</artifactId>
71       <version>2.53.1</version>
72       <scope>runtime</scope>
73     </dependency>
74
75     <dependency>
76       <groupId>commons-net</groupId>
77       <artifactId>commons-net</artifactId>
78       <version>3.3</version>
79       <scope>compile</scope>
80     </dependency>
81
82     <dependency>
83       <groupId>commons-io</groupId>
84       <artifactId>commons-io</artifactId>
85       <version>2.4</version>
86       <scope>compile</scope>
87     </dependency>
88
89     <dependency>
90       <groupId>com.fasterxml.jackson.core</groupId>
91       <artifactId>jackson-core</artifactId>
92       <version>${jackson.version}</version>
93     </dependency>
94
95     <dependency>
96       <groupId>org.openecomp.sdc</groupId>
97       <artifactId>test-apis-ci</artifactId>
98       <version>${project.version}</version>
99       <exclusions>
100         <exclusion>
101           <groupId>com.fasterxml.jackson.core</groupId>
102           <artifactId>jackson-core</artifactId>
103         </exclusion>
104       </exclusions>
105     </dependency>
106
107     <dependency>
108       <groupId>org.yaml</groupId>
109       <artifactId>snakeyaml</artifactId>
110       <version>${snakeyaml.version}</version>
111       <scope>compile</scope>
112     </dependency>
113     <dependency>
114       <groupId>org.functionaljava</groupId>
115       <artifactId>functionaljava</artifactId>
116       <version>${functionaljava.version}</version>
117       <scope>compile</scope>
118     </dependency>
119
120     <dependency>
121       <groupId>com.google.code.gson</groupId>
122       <artifactId>gson</artifactId>
123       <version>${gson.version}</version>
124       <scope>compile</scope>
125     </dependency>
126
127     <!-- http client -->
128     <dependency>
129       <groupId>org.apache.httpcomponents</groupId>
130       <artifactId>httpclient</artifactId>
131       <version>${httpclient.version}</version>
132       <scope>compile</scope>
133     </dependency>
134
135     <dependency>
136       <groupId>org.apache.httpcomponents</groupId>
137       <artifactId>httpmime</artifactId>
138       <version>${httpclient.version}</version>
139       <scope>compile</scope>
140     </dependency>
141
142     <dependency>
143       <groupId>commons-logging</groupId>
144       <artifactId>commons-logging</artifactId>
145       <version>${commons-logging}</version>
146       <scope>compile</scope>
147     </dependency>
148
149     <dependency>
150       <groupId>org.slf4j</groupId>
151       <artifactId>slf4j-api</artifactId>
152       <version>${slf4j-api.version}</version>
153       <scope>compile</scope>
154     </dependency>
155
156     <dependency>
157       <groupId>ch.qos.logback</groupId>
158       <artifactId>logback-classic</artifactId>
159       <version>${logback.version}</version>
160       <scope>compile</scope>
161     </dependency>
162
163     <dependency>
164       <groupId>ch.qos.logback</groupId>
165       <artifactId>logback-core</artifactId>
166       <version>${logback.version}</version>
167       <scope>compile</scope>
168     </dependency>
169
170     <!-- http core -->
171     <dependency>
172       <groupId>org.apache.httpcomponents</groupId>
173       <artifactId>httpcore</artifactId>
174       <version>${httpcore.version}</version>
175       <scope>compile</scope>
176     </dependency>
177
178     <dependency>
179       <groupId>org.codehaus.jackson</groupId>
180       <artifactId>jackson-mapper-asl</artifactId>
181       <version>1.9.2</version>
182       <scope>compile</scope>
183     </dependency>
184
185     <dependency>
186       <groupId>com.fasterxml.jackson.core</groupId>
187       <artifactId>jackson-databind</artifactId>
188       <version>${jackson.version}</version>
189       <exclusions>
190         <exclusion>
191           <groupId>com.fasterxml.jackson.core</groupId>
192           <artifactId>jackson-core</artifactId>
193         </exclusion>
194       </exclusions>
195     </dependency>
196
197     <dependency>
198       <groupId>org.openecomp.sdc.sdc-distribution-client</groupId>
199       <artifactId>sdc-distribution-client</artifactId>
200       <version>1.2.3</version>
201       <scope>compile</scope>
202     </dependency>
203
204     <dependency>
205       <groupId>org.hamcrest</groupId>
206       <artifactId>hamcrest</artifactId>
207       <version>${hamcrest.version}</version>
208       <scope>compile</scope>
209     </dependency>
210
211     <dependency>
212       <groupId>org.hamcrest</groupId>
213       <artifactId>hamcrest-library</artifactId>
214       <version>${hamcrest.version}</version>
215       <scope>compile</scope>
216     </dependency>
217
218     <dependency>
219       <groupId>org.junit.jupiter</groupId>
220       <artifactId>junit-jupiter</artifactId>
221       <version>${junitJupiter.version}</version>
222       <scope>test</scope>
223     </dependency>
224
225     <dependency>
226       <groupId>org.mockito</groupId>
227       <artifactId>mockito-junit-jupiter</artifactId>
228       <version>${mockitoJupiter.version}</version>
229       <scope>test</scope>
230     </dependency>
231
232     <dependency>
233       <groupId>org.testng</groupId>
234       <artifactId>testng</artifactId>
235       <version>6.11</version>
236       <scope>compile</scope>
237     </dependency>
238
239     <dependency>
240       <groupId>xml-apis</groupId>
241       <artifactId>xml-apis</artifactId>
242       <version>1.4.01</version>
243       <scope>compile</scope>
244     </dependency>
245
246     <dependency>
247       <groupId>com.googlecode.json-simple</groupId>
248       <artifactId>json-simple</artifactId>
249       <version>${json-simple.version}</version>
250       <scope>compile</scope>
251     </dependency>
252
253     <dependency>
254       <groupId>org.apache.commons</groupId>
255       <artifactId>commons-jci-core</artifactId>
256       <version>${commons-jci-core.version}</version>
257       <scope>compile</scope>
258     </dependency>
259
260     <dependency>
261       <groupId>commons-codec</groupId>
262       <artifactId>commons-codec</artifactId>
263       <version>${commons-codec}</version>
264       <scope>compile</scope>
265     </dependency>
266
267     <dependency>
268       <groupId>com.aventstack</groupId>
269       <artifactId>extentreports</artifactId>
270       <version>3.0.6</version>
271       <scope>compile</scope>
272     </dependency>
273
274     <dependency>
275       <groupId>net.lightbody.bmp</groupId>
276       <!-- To use the legacy, Jetty-based implementation, change the artifactId
277         to browsermob-core -->
278       <artifactId>browsermob-core</artifactId>
279       <version>2.1.4</version>
280       <exclusions>
281         <exclusion>
282           <groupId>com.fasterxml.jackson.core</groupId>
283           <artifactId>jackson-core</artifactId>
284         </exclusion>
285       </exclusions>
286     </dependency>
287
288     <dependency>
289       <groupId>com.github.markusbernhardt</groupId>
290       <artifactId>proxy-vole</artifactId>
291       <version>1.0.2</version>
292     </dependency>
293
294     <dependency>
295       <groupId>com.paulhammant</groupId>
296       <artifactId>ngwebdriver</artifactId>
297       <version>0.9.7</version>
298       <scope>compile</scope>
299     </dependency>
300
301     <dependency>
302       <groupId>com.google.inject</groupId>
303       <artifactId>guice</artifactId>
304       <version>4.1.0</version>
305     </dependency>
306
307     <dependency>
308       <groupId>org.codehaus.groovy</groupId>
309       <artifactId>groovy</artifactId>
310     </dependency>
311
312     <dependency>
313       <groupId>io.netty</groupId>
314       <artifactId>netty-handler</artifactId>
315     </dependency>
316
317   </dependencies>
318
319   <build>
320
321     <plugins>
322
323       <plugin>
324         <groupId>org.apache.maven.plugins</groupId>
325         <artifactId>maven-clean-plugin</artifactId>
326         <executions>
327           <execution>
328             <id>clean.tosca.chef.os.folder</id>
329             <phase>clean</phase>
330             <goals>
331               <goal>clean</goal>
332             </goals>
333             <configuration>
334               <filesets>
335
336                 <!-- Sanity jar -->
337                 <fileset>
338                   <directory>${project.basedir}/sdc-ui-tests</directory>
339                   <followSymlinks>false</followSymlinks>
340                   <includes>
341                     <include>*.jar</include>
342                   </includes>
343                 </fileset>
344                 <!-- Sanity test suites -->
345                 <fileset>
346                   <directory>
347                     ${project.basedir}/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/testSuites
348                   </directory>
349                   <followSymlinks>false</followSymlinks>
350                 </fileset>
351                 <!-- Package files -->
352                 <fileset>
353                   <directory>
354                     ${project.basedir}/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/Files
355                   </directory>
356                   <followSymlinks>false</followSymlinks>
357                 </fileset>
358               </filesets>
359             </configuration>
360           </execution>
361         </executions>
362       </plugin>
363       <plugin>
364         <groupId>org.apache.maven.plugins</groupId>
365         <artifactId>maven-deploy-plugin</artifactId>
366         <configuration>
367           <skip>true</skip>
368         </configuration>
369       </plugin>
370       <plugin>
371         <groupId>org.apache.maven.plugins</groupId>
372         <artifactId>maven-assembly-plugin</artifactId>
373         <executions>
374           <execution>
375             <id>create.jar.with.dependencies</id>
376             <phase>package</phase>
377             <goals>
378               <goal>single</goal>
379             </goals>
380             <configuration>
381               <archive>
382                 <manifest>
383                   <mainClass>org.openecomp.sdc.ci.tests.execute.setup.SetupCDTest</mainClass>
384                 </manifest>
385               </archive>
386               <descriptorRefs>
387                 <descriptorRef>jar-with-dependencies</descriptorRef>
388               </descriptorRefs>
389             </configuration>
390           </execution>
391         </executions>
392       </plugin>
393       <plugin>
394         <groupId>com.github.sylvainlaurent.maven</groupId>
395         <artifactId>yaml-json-validator-maven-plugin</artifactId>
396         <executions>
397           <execution>
398             <id>validate</id>
399             <phase>validate</phase>
400             <goals>
401               <goal>validate</goal>
402             </goals>
403             <configuration>
404               <validationSets>
405                 <validationSet>
406                   <includes>
407                     <include>src/main/resources/**/*.y*ml</include>
408                     <include>src/test/resources/**/*.y*ml</include>
409                   </includes>
410                 </validationSet>
411                 <validationSet>
412                   <includes>
413                     <include>src/main/resources/**/*.json</include>
414                     <include>src/test/resources/**/*.json</include>
415                   </includes>
416                 </validationSet>
417               </validationSets>
418               <skip>${skipYamlJsonValidator}</skip>
419             </configuration>
420           </execution>
421         </executions>
422       </plugin>
423     </plugins>
424   </build>
425   <profiles>
426     <profile>
427       <id>docker</id>
428       <activation>
429         <activeByDefault>false</activeByDefault>
430       </activation>
431       <build>
432         <plugins>
433           <plugin>
434             <groupId>org.apache.maven.plugins</groupId>
435             <artifactId>maven-resources-plugin</artifactId>
436             <executions>
437               <execution>
438                 <id>copy-tests-suites</id>
439                 <phase>verify</phase>
440                 <goals>
441                   <goal>copy-resources</goal>
442                 </goals>
443                 <configuration>
444                   <outputDirectory>
445                     sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/testSuites
446                   </outputDirectory>
447                   <resources>
448                     <resource>
449                       <directory>${project.parent.basedir}/ui-ci/src/main/resources/ci/testSuites
450                       </directory>
451                       <includes>
452                         <include>*</include>
453                       </includes>
454                     </resource>
455                   </resources>
456                 </configuration>
457               </execution>
458
459               <execution>
460                 <id>copy-csar-files</id>
461                 <phase>verify</phase>
462                 <goals>
463                   <goal>copy-resources</goal>
464                 </goals>
465                 <configuration>
466                   <outputDirectory>
467                     sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/Files
468                   </outputDirectory>
469                   <resources>
470                     <resource>
471                       <directory>
472                         ${project.parent.basedir}/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/files/default/Files
473                       </directory>
474                       <filtering>false</filtering>
475                       <includes>
476                         <include>VNFs/*</include>
477                         <include>PNFs/*</include>
478                       </includes>
479                     </resource>
480                   </resources>
481                 </configuration>
482               </execution>
483
484               <execution>
485                 <id>copy-resources-ui-ci</id>
486                 <phase>verify</phase>
487                 <goals>
488                   <goal>copy-resources</goal>
489                 </goals>
490                 <configuration>
491                   <outputDirectory>${basedir}/sdc-ui-tests</outputDirectory>
492                   <resources>
493                     <resource>
494                       <directory>${project.parent.basedir}/ui-ci/target</directory>
495                       <includes>
496                         <include>ui-ci-${project.version}-jar-with-dependencies.jar</include>
497                       </includes>
498                     </resource>
499                   </resources>
500                 </configuration>
501               </execution>
502             </executions>
503           </plugin>
504
505           <plugin>
506             <groupId>io.fabric8</groupId>
507             <artifactId>docker-maven-plugin</artifactId>
508             <configuration>
509               <apiVersion>1.23</apiVersion>
510               <registry>nexus3.onap.org:10001</registry>
511               <authConfig>
512                 <pull>
513                   <username>docker</username>
514                   <password>docker</password>
515                 </pull>
516               </authConfig>
517               <images>
518
519                 <!-- Build sanity image -->
520                 <image>
521                   <name>onap/sdc-ui-tests</name>
522                   <alias>sdc-ui-sanity</alias>
523                   <build>
524                     <cleanup>try</cleanup>
525                     <dockerFileDir>${project.basedir}/sdc-ui-tests</dockerFileDir>
526                     <tags>
527                       <tag>${docker.tag}</tag>
528                       <tag>
529                         ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
530                       </tag>
531                     </tags>
532                   </build>
533                 </image>
534
535               </images>
536             </configuration>
537             <executions>
538               <execution>
539                 <id>clean-images</id>
540                 <phase>pre-clean</phase>
541                 <goals>
542                   <goal>remove</goal>
543                 </goals>
544                 <configuration>
545                   <removeAll>true</removeAll>
546                   <image>onap/sdc-ui-tests</image>
547                 </configuration>
548               </execution>
549
550               <execution>
551                 <id>generate-images</id>
552                 <phase>install</phase>
553                 <goals>
554                   <goal>build</goal>
555                 </goals>
556               </execution>
557
558               <execution>
559                 <id>push-images</id>
560                 <phase>deploy</phase>
561                 <goals>
562                   <goal>push</goal>
563                 </goals>
564                 <configuration>
565                   <image>onap/sdc-ui-tests</image>
566                 </configuration>
567               </execution>
568             </executions>
569           </plugin>
570         </plugins>
571       </build>
572     </profile>
573   </profiles>
574 </project>