Onboard PNF software version
[sdc.git] / catalog-be / 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   <modelVersion>4.0.0</modelVersion>
5
6   <artifactId>catalog-be</artifactId>
7   <packaging>war</packaging>
8
9   <parent>
10     <groupId>org.openecomp.sdc</groupId>
11     <artifactId>sdc-main</artifactId>
12     <version>1.6.0-SNAPSHOT</version>
13   </parent>
14
15   <properties>
16     <java-hamcrest.version>2.0.0.0</java-hamcrest.version>
17     <swagger.version>2.0.8</swagger.version>
18     <swagger.jaxrs.version>1.5.22</swagger.jaxrs.version>
19   </properties>
20
21   <dependencies>
22     <!--JSON and YAML Parsing-->
23     <dependency>
24       <groupId>com.fasterxml.jackson.dataformat</groupId>
25       <artifactId>jackson-dataformat-yaml</artifactId>
26       <version>${jackson.version}</version>
27       <scope>compile</scope>
28     </dependency>
29
30     <dependency>
31       <groupId>com.fasterxml.jackson.core</groupId>
32       <artifactId>jackson-databind</artifactId>
33       <version>${jackson.version}</version>
34       <scope>compile</scope>
35     </dependency>
36
37     <dependency>
38       <groupId>org.openecomp.sdc</groupId>
39       <artifactId>security-utils</artifactId>
40       <version>${project.version}</version>
41       <scope>compile</scope>
42     </dependency>
43
44     <dependency>
45       <groupId>org.onap.sdc.common</groupId>
46       <artifactId>onap-generic-artifact-browser-service</artifactId>
47       <version>${project.version}</version>
48       <scope>compile</scope>
49     </dependency>
50
51     <!-- Swagger Dependencies Start -->
52     <dependency>
53       <groupId>io.swagger.core.v3</groupId>
54       <artifactId>swagger-annotations</artifactId>
55       <version>${swagger.version}</version>
56     </dependency>
57     <dependency>
58       <groupId>io.swagger</groupId>
59       <artifactId>swagger-jersey2-jaxrs</artifactId>
60       <version>${swagger.jaxrs.version}</version>
61     </dependency>
62     <!-- Swagger Dependencies End -->
63
64     <dependency>
65       <groupId>org.openecomp.sdc</groupId>
66       <artifactId>common-app-api</artifactId>
67       <version>${project.version}</version>
68       <scope>compile</scope>
69     </dependency>
70
71     <dependency>
72       <groupId>org.openecomp.sdc.be</groupId>
73       <artifactId>common-be</artifactId>
74       <version>${project.version}</version>
75       <scope>compile</scope>
76     </dependency>
77     <dependency>
78       <groupId>org.openecomp.sdc.be</groupId>
79       <artifactId>catalog-dao</artifactId>
80       <version>${project.version}</version>
81       <scope>compile</scope>
82     </dependency>
83
84     <dependency>
85       <groupId>org.openecomp.sdc.be</groupId>
86       <artifactId>catalog-model</artifactId>
87       <version>${project.version}</version>
88       <scope>compile</scope>
89     </dependency>
90
91     <dependency>
92       <groupId>ch.qos.logback</groupId>
93       <artifactId>logback-classic</artifactId>
94       <version>${logback.version}</version>
95       <scope>compile</scope>
96     </dependency>
97
98     <!-- Snake Yaml -->
99     <dependency>
100       <groupId>org.yaml</groupId>
101       <artifactId>snakeyaml</artifactId>
102       <version>${snakeyaml.version}</version>
103       <scope>compile</scope>
104     </dependency>
105
106     <!-- File changes listener -->
107     <dependency>
108       <groupId>org.apache.commons</groupId>
109       <artifactId>commons-jci-core</artifactId>
110       <version>${commons-jci-core.version}</version>
111       <scope>compile</scope>
112     </dependency>
113
114     <!-- Gson -->
115     <dependency>
116       <groupId>com.google.code.gson</groupId>
117       <artifactId>gson</artifactId>
118       <version>${gson.version}</version>
119       <scope>compile</scope>
120     </dependency>
121
122     <!-- jersey -->
123     <dependency>
124       <groupId>org.glassfish.jersey.media</groupId>
125       <artifactId>jersey-media-json-jackson</artifactId>
126       <version>${jersey-bom.version}</version>
127       <scope>compile</scope>
128     </dependency>
129
130     <dependency>
131       <groupId>org.glassfish.jersey.containers</groupId>
132       <artifactId>jersey-container-servlet-core</artifactId>
133       <version>${jersey-bom.version}</version>
134       <scope>compile</scope>
135     </dependency>
136
137     <dependency>
138       <groupId>org.glassfish.jersey.media</groupId>
139       <artifactId>jersey-media-multipart</artifactId>
140       <version>${jersey-bom.version}</version>
141       <scope>compile</scope>
142     </dependency>
143     <dependency>
144       <groupId>org.glassfish.jersey.ext</groupId>
145       <artifactId>jersey-spring4</artifactId>
146       <version>${jersey-bom.version}</version>
147       <exclusions>
148         <exclusion>
149           <groupId>org.springframework</groupId>
150           <artifactId>spring-web</artifactId>
151         </exclusion>
152         <exclusion>
153           <groupId>org.springframework</groupId>
154           <artifactId>spring-beans</artifactId>
155         </exclusion>
156         <exclusion>
157           <groupId>org.springframework</groupId>
158           <artifactId>spring-core</artifactId>
159         </exclusion>
160         <exclusion>
161           <groupId>org.springframework</groupId>
162           <artifactId>spring-aop</artifactId>
163         </exclusion>
164         <!-- Transitive dependency of spring-bridge -->
165         <exclusion>
166           <groupId>org.springframework</groupId>
167           <artifactId>spring-context</artifactId>
168         </exclusion>
169       </exclusions>
170
171     </dependency>
172
173     <!--asm-all-repackaged is a jersey dependency. in current version jersey depends on a version that was compiled using java 9 compiler
174         currently our jetty (v9.3.6) does not support java 9. as soon as jetty gets upgraded we will remove this dependency-->
175     <dependency>
176       <groupId>org.glassfish.hk2.external</groupId>
177       <artifactId>asm-all-repackaged</artifactId>
178     </dependency>
179
180     <dependency>
181       <groupId>org.glassfish.jersey.ext</groupId>
182       <artifactId>jersey-bean-validation</artifactId>
183     </dependency>
184
185     <!-- http client -->
186     <dependency>
187       <groupId>org.apache.httpcomponents</groupId>
188       <artifactId>httpclient</artifactId>
189       <version>${httpclient.version}</version>
190       <scope>compile</scope>
191     </dependency>
192
193     <dependency>
194       <groupId>org.apache.httpcomponents</groupId>
195       <artifactId>httpcore</artifactId>
196       <version>${httpcore.version}</version>
197       <scope>compile</scope>
198     </dependency>
199
200     <dependency>
201       <groupId>commons-logging</groupId>
202       <artifactId>commons-logging</artifactId>
203       <version>${commons-logging}</version>
204       <scope>compile</scope>
205     </dependency>
206
207     <dependency>
208       <groupId>commons-codec</groupId>
209       <artifactId>commons-codec</artifactId>
210       <version>${commons-codec}</version>
211       <scope>compile</scope>
212     </dependency>
213     <!-- http client END -->
214
215     <dependency>
216       <groupId>javax.servlet</groupId>
217       <artifactId>javax.servlet-api</artifactId>
218       <version>${servlet-api.version}</version>
219       <scope>provided</scope>
220     </dependency>
221
222     <dependency>
223       <groupId>org.eclipse.jgit</groupId>
224       <artifactId>org.eclipse.jgit</artifactId>
225       <version>3.4.1.201406201815-r</version>
226     </dependency>
227
228     <!-- spring - used by A4C -->
229     <dependency>
230       <groupId>org.springframework</groupId>
231       <artifactId>spring-core</artifactId>
232       <version>${spring.version}</version>
233       <scope>compile</scope>
234     </dependency>
235
236     <dependency>
237       <groupId>org.springframework</groupId>
238       <artifactId>spring-context</artifactId>
239       <version>${spring.version}</version>
240       <scope>compile</scope>
241     </dependency>
242
243     <dependency>
244       <groupId>org.springframework</groupId>
245       <artifactId>spring-web</artifactId>
246       <version>${spring.version}</version>
247       <scope>compile</scope>
248     </dependency>
249
250     <dependency>
251       <groupId>org.springframework</groupId>
252       <artifactId>spring-webmvc</artifactId>
253       <version>${spring.version}</version>
254       <scope>compile</scope>
255     </dependency>
256
257     <dependency>
258       <groupId>org.springframework</groupId>
259       <artifactId>spring-aop</artifactId>
260       <version>${spring.version}</version>
261       <scope>compile</scope>
262     </dependency>
263
264     <dependency>
265       <groupId>org.springframework</groupId>
266       <artifactId>spring-beans</artifactId>
267       <version>${spring.version}</version>
268       <scope>compile</scope>
269     </dependency>
270
271     <dependency>
272       <groupId>org.springframework</groupId>
273       <artifactId>spring-expression</artifactId>
274       <version>${spring.version}</version>
275       <scope>compile</scope>
276     </dependency>
277
278     <dependency>
279       <groupId>org.codehaus.janino</groupId>
280       <artifactId>janino</artifactId>
281       <version>${janino.version}</version>
282       <scope>compile</scope>
283     </dependency>
284
285     <dependency>
286       <groupId>org.codehaus.janino</groupId>
287       <artifactId>commons-compiler</artifactId>
288       <version>${janino.version}</version>
289       <scope>compile</scope>
290     </dependency>
291
292     <dependency>
293       <groupId>com.google.guava</groupId>
294       <artifactId>guava</artifactId>
295       <version>${guava.version}</version>
296       <scope>compile</scope>
297     </dependency>
298
299     <dependency>
300       <groupId>org.janusgraph</groupId>
301       <artifactId>janusgraph-core</artifactId>
302       <version>${janusgraph.version}</version>
303       <scope>compile</scope>
304       <exclusions>
305         <exclusion>
306           <groupId>org.json</groupId>
307           <artifactId>json</artifactId>
308         </exclusion>
309         <exclusion>
310           <artifactId>slf4j-log4j12</artifactId>
311           <groupId>org.slf4j</groupId>
312         </exclusion>
313         <exclusion>
314           <artifactId>commons-collections</artifactId>
315           <groupId>commons-collections</groupId>
316         </exclusion>
317         <exclusion>
318           <groupId>org.apache.thrift</groupId>
319           <artifactId>libthrift</artifactId>
320         </exclusion>
321       </exclusions>
322     </dependency>
323
324     <dependency>
325       <groupId>org.janusgraph</groupId>
326       <artifactId>janusgraph-cassandra</artifactId>
327       <version>${janusgraph.version}</version>
328       <scope>compile</scope>
329       <exclusions>
330         <exclusion>
331           <groupId>org.slf4j</groupId>
332           <artifactId>slf4j-log4j12</artifactId>
333         </exclusion>
334         <exclusion>
335           <groupId>io.netty</groupId>
336           <artifactId>netty-all</artifactId>
337         </exclusion>
338       </exclusions>
339     </dependency>
340
341     <dependency>
342       <groupId>org.apache.commons</groupId>
343       <artifactId>commons-lang3</artifactId>
344       <version>${lang3.version}</version>
345       <scope>compile</scope>
346     </dependency>
347
348     <dependency>
349       <groupId>com.googlecode.json-simple</groupId>
350       <artifactId>json-simple</artifactId>
351       <version>${json-simple.version}</version>
352       <scope>compile</scope>
353
354     </dependency>
355
356     <dependency>
357       <groupId>org.elasticsearch</groupId>
358       <artifactId>elasticsearch</artifactId>
359       <version>${elastic-search.version}</version>
360       <scope>compile</scope>
361     </dependency>
362
363     <!-- functional java -->
364     <dependency>
365       <groupId>org.functionaljava</groupId>
366       <artifactId>functionaljava</artifactId>
367       <version>${functionaljava.version}</version>
368       <scope>compile</scope>
369     </dependency>
370
371     <!-- Aspects -->
372     <dependency>
373       <groupId>com.jcabi</groupId>
374       <artifactId>jcabi-aspects</artifactId>
375       <version>${jcabi.version}</version>
376       <scope>compile</scope>
377     </dependency>
378
379     <dependency>
380       <groupId>org.aspectj</groupId>
381       <artifactId>aspectjrt</artifactId>
382       <version>${aspectjrt.version}</version>
383       <scope>compile</scope>
384     </dependency>
385
386
387     <!-- CAMBRIA CLIENT for U-EB -->
388     <dependency>
389       <groupId>com.att.nsa</groupId>
390       <artifactId>cambriaClient</artifactId>
391       <version>1.2.1-oss</version>
392       <scope>compile</scope>
393       <exclusions>
394         <exclusion>
395           <groupId>com.att.nsa</groupId>
396           <artifactId>saClientLibrary</artifactId>
397         </exclusion>
398       </exclusions>
399     </dependency>
400
401     <dependency>
402       <groupId>org.json</groupId>
403       <artifactId>json</artifactId>
404       <version>20131018</version>
405       <scope>compile</scope>
406     </dependency>
407
408     <!-- CASSANDRA -->
409     <dependency>
410       <groupId>com.datastax.cassandra</groupId>
411       <artifactId>cassandra-driver-core</artifactId>
412       <version>${cassandra.driver.version}</version>
413       <scope>compile</scope>
414     </dependency>
415     <dependency>
416       <groupId>com.datastax.cassandra</groupId>
417       <artifactId>cassandra-driver-mapping</artifactId>
418       <version>${cassandra.driver.version}</version>
419       <scope>compile</scope>
420     </dependency>
421     <dependency>
422       <groupId>org.apache.thrift</groupId>
423       <artifactId>libthrift</artifactId>
424       <version>${libthrift.version}</version>
425     </dependency>
426     <!-- CASSANDRA END -->
427
428     <!-- Inserted for ECOMP Portal Integration -->
429     <dependency>
430       <groupId>org.onap.portal.sdk</groupId>
431       <artifactId>epsdk-fw</artifactId>
432       <version>${ecomp.version}</version>
433       <scope>compile</scope>
434       <exclusions>
435         <exclusion>
436           <groupId>com.att.nsa</groupId>
437           <artifactId>cambriaClient</artifactId>
438         </exclusion>
439         <exclusion>
440           <artifactId>slf4j-log4j12</artifactId>
441           <groupId>org.slf4j</groupId>
442         </exclusion>
443       </exclusions>
444     </dependency>
445
446     <!--Jetty Proxy-->
447     <dependency>
448       <groupId>org.eclipse.jetty</groupId>
449       <artifactId>jetty-proxy</artifactId>
450       <version>${jetty.version}</version>
451       <scope>compile</scope>
452     </dependency>
453
454     <dependency>
455       <groupId>org.eclipse.jetty</groupId>
456       <artifactId>jetty-servlets</artifactId>
457       <version>${jetty.version}</version>
458       <scope>compile</scope>
459     </dependency>
460     <!-- System metrics -->
461     <dependency>
462       <groupId>org.fusesource</groupId>
463       <artifactId>sigar</artifactId>
464       <version>${sigar.version}</version>
465       <scope>compile</scope>
466     </dependency>
467     <dependency>
468       <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
469       <artifactId>dmaapClient</artifactId>
470       <version>1.1.3</version>
471       <scope>compile</scope>
472       <exclusions>
473         <exclusion>
474           <groupId>com.att.aft</groupId>
475           <artifactId>dme2</artifactId>
476         </exclusion>
477       </exclusions>
478     </dependency>
479     <dependency>
480       <groupId>com.att.aft</groupId>
481       <artifactId>dme2</artifactId>
482       <version>3.1.200-oss</version>
483     </dependency>
484
485     <dependency>
486       <groupId>javax.jms</groupId>
487       <artifactId>jms</artifactId>
488       <version>1.1</version>
489       <scope>provided</scope>
490     </dependency>
491
492     <!-- TEST -->
493     <dependency>
494       <groupId>org.assertj</groupId>
495       <artifactId>assertj-core</artifactId>
496       <scope>test</scope>
497     </dependency>
498
499     <dependency>
500       <groupId>org.glassfish.jersey.test-framework.providers</groupId>
501       <artifactId>jersey-test-framework-provider-bundle</artifactId>
502       <version>${jersey-bom.version}</version>
503       <type>pom</type>
504       <scope>test</scope>
505     </dependency>
506
507     <dependency>
508       <groupId>org.glassfish.jersey.core</groupId>
509       <artifactId>jersey-client</artifactId>
510       <version>${jersey-bom.version}</version>
511     </dependency>
512
513     <dependency>
514       <groupId>com.github.tomakehurst</groupId>
515       <artifactId>wiremock-standalone</artifactId>
516       <scope>test</scope>
517     </dependency>
518
519     <dependency>
520       <groupId>org.eclipse.jetty</groupId>
521       <artifactId>jetty-webapp</artifactId>
522       <version>${jetty.version}</version>
523       <scope>test</scope>
524     </dependency>
525
526     <dependency>
527       <groupId>junit</groupId>
528       <artifactId>junit</artifactId>
529       <version>${junit.version}</version>
530       <scope>test</scope>
531     </dependency>
532
533     <dependency>
534       <groupId>org.mockito</groupId>
535       <artifactId>mockito-core</artifactId>
536       <scope>test</scope>
537     </dependency>
538
539     <dependency>
540       <groupId>org.springframework</groupId>
541       <artifactId>spring-test</artifactId>
542       <version>${spring.version}</version>
543       <scope>test</scope>
544     </dependency>
545
546     <dependency>
547       <groupId>org.springframework</groupId>
548       <artifactId>spring-tx</artifactId>
549       <version>${spring.version}</version>
550     </dependency>
551
552     <dependency>
553       <groupId>io.cucumber</groupId>
554       <artifactId>cucumber-java</artifactId>
555       <scope>test</scope>
556     </dependency>
557
558     <dependency>
559       <groupId>io.cucumber</groupId>
560       <artifactId>cucumber-junit</artifactId>
561       <scope>test</scope>
562     </dependency>
563
564     <dependency>
565       <groupId>org.jmockit</groupId>
566       <artifactId>jmockit</artifactId>
567       <version>${jmockit.version}</version>
568       <scope>test</scope>
569     </dependency>
570
571     <dependency>
572       <groupId>com.google.code.bean-matchers</groupId>
573       <artifactId>bean-matchers</artifactId>
574       <version>0.11</version>
575       <scope>test</scope>
576     </dependency>
577
578     <dependency>
579       <groupId>org.hamcrest</groupId>
580       <artifactId>java-hamcrest</artifactId>
581       <version>${java-hamcrest.version}</version>
582       <scope>test</scope>
583     </dependency>
584
585     <dependency>
586       <groupId>org.codehaus.groovy</groupId>
587       <artifactId>groovy</artifactId>
588       <version>2.4.8</version>
589     </dependency>
590
591     <dependency>
592       <groupId>io.netty</groupId>
593       <artifactId>netty-handler</artifactId>
594     </dependency>
595     <dependency>
596       <groupId>org.onap.sdc.common</groupId>
597       <artifactId>onap-tosca-datatype</artifactId>
598       <version>${project.version}</version>
599     </dependency>
600     <dependency>
601       <groupId>org.apache.commons</groupId>
602       <artifactId>commons-collections4</artifactId>
603       <version>${commons.collections.version}</version>
604     </dependency>
605     <dependency>
606       <groupId>org.codehaus.jackson</groupId>
607       <artifactId>jackson-mapper-asl</artifactId>
608       <version>${jackson.mapper.version}</version>
609     </dependency>
610   </dependencies>
611
612   <build>
613
614     <finalName>${project.artifactId}-${project.version}</finalName>
615
616     <plugins>
617       <plugin>
618         <groupId>org.apache.maven.plugins</groupId>
619         <artifactId>maven-war-plugin</artifactId>
620         <configuration>
621           <packagingExcludes>WEB-INF\lib\slf4j-log4j*.jar,
622             WEB-INF/classes/elasticsearch.yml,
623             WEB-INF/classes/portal.properties
624           </packagingExcludes>
625           <archive>
626             <manifestEntries>
627               <SDC-Version>${project.version}</SDC-Version>
628             </manifestEntries>
629             <manifest>
630               <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
631               <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
632             </manifest>
633           </archive>
634
635           <webResources>
636             <resource>
637               <directory>src/main/resources</directory>
638               <directory>src/main/resources/swagger</directory>
639             </resource>
640           </webResources>
641           <attachClasses>true</attachClasses>
642         </configuration>
643       </plugin>
644       <plugin>
645         <groupId>com.github.sylvainlaurent.maven</groupId>
646         <artifactId>yaml-json-validator-maven-plugin</artifactId>
647         <executions>
648           <execution>
649             <id>validate</id>
650             <phase>validate</phase>
651             <goals>
652               <goal>validate</goal>
653             </goals>
654             <configuration>
655               <validationSets>
656                 <validationSet>
657                   <includes>
658                     <include>src/main/resources/**/*.y*ml</include>
659                     <include>src/test/resources/**/*.y*ml</include>
660                   </includes>
661                   <excludes>
662                     <exclude>src/test/resources/artifacts/pnfSoftwareInformation/**</exclude>
663                   </excludes>
664                 </validationSet>
665                 <validationSet>
666                   <includes>
667                     <include>src/main/resources/**/*.json</include>
668                     <include>src/test/resources/**/*.json</include>
669                   </includes>
670                 </validationSet>
671               </validationSets>
672             </configuration>
673           </execution>
674         </executions>
675       </plugin>
676       <plugin>
677         <groupId>com.jcabi</groupId>
678         <artifactId>jcabi-maven-plugin</artifactId>
679         <version>${jcabi.maven.plugin.version}</version>
680         <executions>
681           <execution>
682             <goals>
683               <goal>ajc</goal>
684             </goals>
685           </execution>
686         </executions>
687       </plugin>
688       <plugin>
689         <groupId>org.apache.maven.plugins</groupId>
690         <artifactId>maven-assembly-plugin</artifactId>
691         <executions>
692           <execution>
693             <id>normatives</id>
694             <phase>package</phase>
695             <goals>
696               <goal>single</goal>
697             </goals>
698             <configuration>
699               <finalName>normatives</finalName>
700               <appendAssemblyId>false</appendAssemblyId>
701               <descriptors>
702                 <descriptor>${project.basedir}/normatives.xml</descriptor>
703               </descriptors>
704             </configuration>
705           </execution>
706         </executions>
707       </plugin>
708       <plugin>
709         <groupId>org.apache.maven.plugins</groupId>
710         <artifactId>maven-clean-plugin</artifactId>
711         <executions>
712           <execution>
713             <id>clean.sdc.backend.folder</id>
714             <phase>clean</phase>
715             <goals>
716               <goal>clean</goal>
717             </goals>
718             <configuration>
719               <filesets>
720                 <!-- static configuration files -->
721                 <fileset>
722                   <directory>
723                     ${project.parent.basedir}/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default
724                   </directory>
725                   <followSymlinks>false</followSymlinks>
726                   <includes>
727                     <include>error-configuration.yaml</include>
728                     <include>ecomp-error-configuration.yaml</include>
729                     <include>logback.xml</include>
730                   </includes>
731                 </fileset>
732                 <!-- BE WAR's -->
733                 <fileset>
734                   <directory>${project.parent.basedir}/catalog-be/sdc-backend</directory>
735                   <followSymlinks>false</followSymlinks>
736                   <includes>
737                     <include>*.war</include>
738                   </includes>
739                 </fileset>
740                 <fileset>
741                   <directory>
742                     ${project.basedir}/sdc-backend-init/chef-repo/cookbooks/sdc-normatives/files/default
743                   </directory>
744                   <followSymlinks>false</followSymlinks>
745                   <includes>
746                     <include>normatives.tar.gz</include>
747                   </includes>
748                 </fileset>
749
750
751               </filesets>
752             </configuration>
753           </execution>
754
755           <execution>
756             <id>clean-static-files</id>
757             <phase>clean</phase>
758             <goals>
759               <goal>clean</goal>
760             </goals>
761             <configuration>
762               <filesets>
763                 <!-- tosca files -->
764                 <fileset>
765                   <directory>${project.parent.basedir}/asdctool/tosca</directory>
766                   <followSymlinks>false</followSymlinks>
767                 </fileset>
768               </filesets>
769             </configuration>
770           </execution>
771         </executions>
772       </plugin>
773       <plugin>
774         <groupId>org.apache.maven.plugins</groupId>
775         <artifactId>maven-resources-plugin</artifactId>
776         <executions>
777           <execution>
778             <id>copy-static-configuration-files</id>
779             <phase>verify</phase>
780             <goals>
781               <goal>copy-resources</goal>
782             </goals>
783             <configuration>
784               <outputDirectory>
785                 ${project.parent.basedir}/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default
786               </outputDirectory>
787               <resources>
788                 <resource>
789                   <directory>${project.parent.basedir}/catalog-be/src/main/resources/config
790                   </directory>
791                   <includes>
792                     <include>error-configuration.yaml</include>
793                     <include>ecomp-error-configuration.yaml</include>
794                     <include>logback.xml</include>
795                   </includes>
796                 </resource>
797               </resources>
798             </configuration>
799           </execution>
800           <execution>
801             <id>copy-tosca-folder</id>
802             <!-- here the phase you need -->
803             <phase>install</phase>
804             <goals>
805               <goal>copy-resources</goal>
806             </goals>
807             <configuration>
808               <outputDirectory>${project.parent.basedir}/asdctool/tosca</outputDirectory>
809               <resources>
810                 <resource>
811                   <directory>${project.parent.basedir}/catalog-be/src/main/resources/import/tosca
812                   </directory>
813                   <filtering>true</filtering>
814                 </resource>
815               </resources>
816             </configuration>
817           </execution>
818         </executions>
819       </plugin>
820       <plugin>
821         <groupId>com.github.kongchen</groupId>
822         <artifactId>swagger-maven-plugin</artifactId>
823         <version>3.1.0</version>
824         <configuration>
825           <apiSources>
826             <apiSource>
827               <springmvc>false</springmvc>
828               <schemes>http</schemes>
829               <basePath>/sdc</basePath>
830               <locations>
831                 io.swagger.jaxrs.json;org.openecomp.sdc.be.externalapi.servlet;org.openecomp.sdc.be.distribution.servlet;org.openecomp.normative.api
832               </locations>
833               <info>
834                 <title>External Rest API</title>
835                 <version>v1.0</version>
836                 <description>External Rest API Documentation</description>
837                 <termsOfService>
838                   http://www.github.com/kongchen/swagger-maven-plugin
839                 </termsOfService>
840               </info>
841               <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath>
842               <outputPath>${basedir}/target/generated/swagger-ui/api.html</outputPath>
843               <swaggerDirectory>${basedir}/target/generated/swagger-ui
844               </swaggerDirectory>
845               <swaggerApiReader>io.swagger.jaxrs.config.DefaultJaxrsConfig</swaggerApiReader>
846             </apiSource>
847           </apiSources>
848         </configuration>
849         <executions>
850           <execution>
851             <phase>compile</phase>
852             <goals>
853               <goal>generate</goal>
854             </goals>
855           </execution>
856         </executions>
857       </plugin>
858     </plugins>
859
860     <pluginManagement>
861       <plugins>
862         <!--This plugin's configuration is used to store Eclipse m2e settings
863             only. It has no influence on the Maven build itself. -->
864         <plugin>
865           <groupId>org.eclipse.m2e</groupId>
866           <artifactId>lifecycle-mapping</artifactId>
867           <version>1.0.0</version>
868           <configuration>
869             <lifecycleMappingMetadata>
870               <pluginExecutions>
871                 <pluginExecution>
872                   <pluginExecutionFilter>
873                     <groupId>com.googlecode.maven-download-plugin</groupId>
874                     <artifactId>download-maven-plugin</artifactId>
875                     <versionRange>[1.2.1,)</versionRange>
876                     <goals>
877                       <goal>wget</goal>
878                     </goals>
879                   </pluginExecutionFilter>
880                   <action>
881                     <ignore></ignore>
882                   </action>
883                 </pluginExecution>
884
885                 <pluginExecution>
886                   <pluginExecutionFilter>
887                     <groupId>com.jcabi</groupId>
888                     <artifactId>jcabi-maven-plugin</artifactId>
889                     <versionRange>[0.0,)</versionRange>
890                     <goals>
891                       <goal>ajc</goal>
892                     </goals>
893                   </pluginExecutionFilter>
894                   <action>
895                     <execute/>
896                   </action>
897                 </pluginExecution>
898
899               </pluginExecutions>
900             </lifecycleMappingMetadata>
901           </configuration>
902         </plugin>
903       </plugins>
904     </pluginManagement>
905     <!-- Swagger Plugins End -->
906   </build>
907
908   <profiles>
909     <profile>
910       <id>docker-staging</id>
911       <properties>
912         <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
913         <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
914       </properties>
915     </profile>
916
917     <profile>
918       <id>docker</id>
919       <activation>
920         <activeByDefault>false</activeByDefault>
921       </activation>
922       <build>
923         <plugins>
924           <plugin>
925             <groupId>org.apache.maven.plugins</groupId>
926             <artifactId>maven-resources-plugin</artifactId>
927             <executions>
928               <execution>
929                 <id>copy-resources-apidocs</id>
930                 <phase>verify</phase>
931                 <goals>
932                   <goal>copy-resources</goal>
933                 </goals>
934                 <configuration>
935                   <outputDirectory>${basedir}/sdc-backend</outputDirectory>
936                   <resources>
937                     <resource>
938                       <directory>
939                         ${project.parent.basedir}/openecomp-be/tools/swagger-ui/target/api-docs
940                       </directory>
941                       <includes>
942                         <include>api-docs.war</include>
943                       </includes>
944                     </resource>
945                   </resources>
946                 </configuration>
947               </execution>
948
949               <execution>
950                 <id>copy-resources-be</id>
951                 <phase>verify</phase>
952                 <goals>
953                   <goal>copy-resources</goal>
954                 </goals>
955                 <configuration>
956                   <outputDirectory>${basedir}/sdc-backend</outputDirectory>
957                   <resources>
958                     <resource>
959                       <directory>${project.parent.basedir}/catalog-be/target</directory>
960                       <includes>
961                         <include>catalog-be-${project.version}.war</include>
962                       </includes>
963                     </resource>
964                     <resource>
965                       <directory>
966                         ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
967                       </directory>
968                       <includes>
969                         <include>onboarding-be-${project.version}.war</include>
970                       </includes>
971                     </resource>
972                   </resources>
973                 </configuration>
974               </execution>
975               <execution>
976                 <id>copy-normatives</id>
977                 <phase>verify</phase>
978                 <goals>
979                   <goal>copy-resources</goal>
980                 </goals>
981                 <configuration>
982                   <outputDirectory>
983                     sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/files/default
984                   </outputDirectory>
985                   <resources>
986                     <resource>
987                       <directory>${project.parent.basedir}/catalog-be/target</directory>
988                       <includes>
989                         <include>normatives.tar.gz</include>
990                       </includes>
991                     </resource>
992                   </resources>
993                 </configuration>
994               </execution>
995             </executions>
996           </plugin>
997           <plugin>
998             <groupId>io.fabric8</groupId>
999             <artifactId>docker-maven-plugin</artifactId>
1000             <configuration>
1001               <apiVersion>1.23</apiVersion>
1002               <registry>nexus3.onap.org:10001</registry>
1003               <authConfig>
1004                 <pull>
1005                   <username>docker</username>
1006                   <password>docker</password>
1007                 </pull>
1008               </authConfig>
1009               <images>
1010
1011                 <!-- Build backend image -->
1012                 <image>
1013                   <name>onap/sdc-backend</name>
1014                   <alias>sdc-backend</alias>
1015                   <build>
1016                     <cleanup>try</cleanup>
1017                     <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
1018                     <tags>
1019                       <tag>${docker.tag}</tag>
1020                       <tag>
1021                         ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
1022                       </tag>
1023                     </tags>
1024                   </build>
1025                 </image>
1026                 <!-- Build backend-init image -->
1027                 <image>
1028                   <name>onap/sdc-backend-init</name>
1029                   <alias>sdc-backend-init</alias>
1030                   <build>
1031                     <cleanup>try</cleanup>
1032                     <dockerFileDir>${project.basedir}/sdc-backend-init</dockerFileDir>
1033                     <tags>
1034                       <tag>${docker.tag}</tag>
1035                       <tag>
1036                         ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
1037                       </tag>
1038                     </tags>
1039                   </build>
1040                 </image>
1041               </images>
1042             </configuration>
1043             <executions>
1044               <execution>
1045                 <id>clean-images</id>
1046                 <phase>pre-clean</phase>
1047                 <goals>
1048                   <goal>remove</goal>
1049                 </goals>
1050                 <configuration>
1051                   <removeAll>true</removeAll>
1052                   <image>onap/sdc-backend,onap/sdc-backend-init</image>
1053                 </configuration>
1054               </execution>
1055
1056               <execution>
1057                 <id>generate-images</id>
1058                 <phase>install</phase>
1059                 <goals>
1060                   <goal>build</goal>
1061                 </goals>
1062               </execution>
1063
1064               <execution>
1065                 <id>push-images</id>
1066                 <phase>deploy</phase>
1067                 <goals>
1068                   <goal>push</goal>
1069                 </goals>
1070                 <configuration>
1071                   <image>onap/sdc-backend,onap/sdc-backend-init</image>
1072                 </configuration>
1073               </execution>
1074             </executions>
1075           </plugin>
1076         </plugins>
1077       </build>
1078     </profile>
1079   </profiles>
1080 </project>