b685620babb08f09f2c2c7a867b2c4c011092b65
[sdc.git] / asdctool / 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>asdctool</artifactId>
7   <packaging>jar</packaging>
8
9   <parent>
10     <groupId>org.openecomp.sdc</groupId>
11     <artifactId>sdc-main</artifactId>
12     <version>1.7.0-SNAPSHOT</version>
13   </parent>
14
15   <dependencies>
16     <!--JUnit Jupiter Engine to depend on the JUnit5 engine and JUnit 5 API -->
17     <dependency>
18       <groupId>org.junit.jupiter</groupId>
19       <artifactId>junit-jupiter-engine</artifactId>
20       <version>${junitJupiter.version}</version>
21       <scope>test</scope>
22     </dependency>
23     <!--JUnit Jupiter Engine to depend on the JUnit4 engine and JUnit 4 API  -->
24     <dependency>
25       <groupId>org.junit.vintage</groupId>
26       <artifactId>junit-vintage-engine</artifactId>
27       <version>${junitJupiter.version}</version>
28       <scope>test</scope>
29     </dependency>
30
31     <dependency>
32       <groupId>com.google.guava</groupId>
33       <artifactId>guava</artifactId>
34       <version>${guava.version}</version>
35       <scope>compile</scope>
36     </dependency>
37
38     <!-- ASDC dependencies -->
39     <dependency>
40       <groupId>org.openecomp.sdc.be</groupId>
41       <artifactId>common-be</artifactId>
42       <version>${project.version}</version>
43       <scope>compile</scope>
44     </dependency>
45     <dependency>
46       <groupId>org.openecomp.sdc</groupId>
47       <artifactId>common-app-api</artifactId>
48       <version>${project.version}</version>
49       <scope>compile</scope>
50     </dependency>
51
52     <dependency>
53       <groupId>org.openecomp.sdc.be</groupId>
54       <artifactId>catalog-dao</artifactId>
55       <version>${project.version}</version>
56       <scope>compile</scope>
57     </dependency>
58
59     <dependency>
60       <groupId>org.openecomp.sdc.be</groupId>
61       <artifactId>catalog-model</artifactId>
62       <version>${project.version}</version>
63       <scope>compile</scope>
64     </dependency>
65
66
67     <dependency>
68       <groupId>org.openecomp.sdc</groupId>
69       <artifactId>catalog-be</artifactId>
70       <version>${project.version}</version>
71
72       <!-- Comment Out in order to debug in eclipse -->
73       <classifier>classes</classifier>
74
75       <exclusions>
76         <exclusion>
77           <groupId>org.openecomp.ecompsdkos</groupId>
78           <artifactId>epsdk-fw</artifactId>
79         </exclusion>
80
81         <exclusion>
82           <groupId>org.onap.sdc.common</groupId>
83           <artifactId>onap-common-lib</artifactId>
84         </exclusion>
85
86         <exclusion>
87           <groupId>com.att.nsa</groupId>
88           <artifactId>cambriaClient</artifactId>
89         </exclusion>
90         <exclusion>
91           <groupId>com.att.nsa</groupId>
92           <artifactId>dmaapClient</artifactId>
93         </exclusion>
94         <exclusion>
95           <artifactId>slf4j-log4j12</artifactId>
96           <groupId>org.slf4j</groupId>
97         </exclusion>
98
99       </exclusions>
100
101       <scope>compile</scope>
102     </dependency>
103
104     <dependency>
105       <groupId>org.onap.portal.sdk</groupId>
106       <artifactId>epsdk-fw</artifactId>
107       <version>${ecomp.version}</version>
108       <scope>compile</scope>
109       <exclusions>
110         <exclusion>
111           <groupId>com.att.nsa</groupId>
112           <artifactId>cambriaClient</artifactId>
113         </exclusion>
114         <exclusion>
115           <groupId>com.att.nsa</groupId>
116           <artifactId>dmaapClient</artifactId>
117         </exclusion>
118         <exclusion>
119           <artifactId>slf4j-log4j12</artifactId>
120           <groupId>org.slf4j</groupId>
121         </exclusion>
122       </exclusions>
123     </dependency>
124
125
126     <!-- ASDC dependencies end -->
127     <dependency>
128       <groupId>org.eclipse.jetty</groupId>
129       <artifactId>jetty-server</artifactId>
130       <version>${jetty.version}</version>
131       <scope>compile</scope>
132     </dependency>
133
134     <dependency>
135       <groupId>org.eclipse.jetty</groupId>
136       <artifactId>jetty-util</artifactId>
137       <version>${jetty.version}</version>
138       <scope>compile</scope>
139     </dependency>
140
141     <!-- listen to file changes -->
142     <dependency>
143       <groupId>org.apache.commons</groupId>
144       <artifactId>commons-jci-core</artifactId>
145       <version>${commons-jci-core.version}</version>
146       <scope>compile</scope>
147     </dependency>
148
149     <dependency>
150       <groupId>commons-cli</groupId>
151       <artifactId>commons-cli</artifactId>
152       <version>1.4</version>
153     </dependency>
154
155     <dependency>
156       <groupId>org.eclipse.jetty</groupId>
157       <artifactId>jetty-servlet</artifactId>
158       <version>${jetty.version}</version>
159       <scope>compile</scope>
160     </dependency>
161
162     <dependency>
163       <groupId>org.glassfish.jersey.core</groupId>
164       <artifactId>jersey-server</artifactId>
165       <version>${jersey-bom.version}</version>
166       <scope>compile</scope>
167     </dependency>
168
169     <dependency>
170       <groupId>org.glassfish.jersey.containers</groupId>
171       <artifactId>jersey-container-servlet-core</artifactId>
172       <version>${jersey-bom.version}</version>
173       <scope>compile</scope>
174     </dependency>
175
176     <dependency>
177       <groupId>org.glassfish.jersey.containers</groupId>
178       <artifactId>jersey-container-jetty-http</artifactId>
179       <version>${jersey-bom.version}</version>
180       <scope>compile</scope>
181     </dependency>
182
183     <dependency>
184       <groupId>org.glassfish.jersey.media</groupId>
185       <artifactId>jersey-media-moxy</artifactId>
186       <version>${jersey-bom.version}</version>
187       <scope>compile</scope>
188     </dependency>
189
190     <dependency>
191       <groupId>org.glassfish.jersey.media</groupId>
192       <artifactId>jersey-media-multipart</artifactId>
193       <version>${jersey-bom.version}</version>
194       <scope>compile</scope>
195     </dependency>
196
197     <!-- slf4j + logback -->
198     <dependency>
199       <groupId>org.slf4j</groupId>
200       <artifactId>slf4j-api</artifactId>
201       <version>${slf4j-api.version}</version>
202       <scope>compile</scope>
203     </dependency>
204
205     <dependency>
206       <groupId>ch.qos.logback</groupId>
207       <artifactId>logback-classic</artifactId>
208       <version>${logback.version}</version>
209       <scope>compile</scope>
210     </dependency>
211
212     <dependency>
213       <groupId>ch.qos.logback</groupId>
214       <artifactId>logback-core</artifactId>
215       <version>${logback.version}</version>
216       <scope>compile</scope>
217     </dependency>
218
219     <!-- groovy -->
220     <dependency>
221       <groupId>org.codehaus.groovy</groupId>
222       <artifactId>groovy</artifactId>
223       <scope>compile</scope>
224     </dependency>
225
226     <dependency>
227       <groupId>org.apache.commons</groupId>
228       <artifactId>commons-configuration2</artifactId>
229       <version>${commons-configuration}</version>
230     </dependency>
231
232     <dependency>
233       <groupId>org.janusgraph</groupId>
234       <artifactId>janusgraph-core</artifactId>
235       <version>${janusgraph.version}</version>
236       <scope>compile</scope>
237       <exclusions>
238         <exclusion>
239           <groupId>org.json</groupId>
240           <artifactId>json</artifactId>
241         </exclusion>
242         <exclusion>
243           <groupId>org.slf4j</groupId>
244           <artifactId>slf4j-log4j12</artifactId>
245         </exclusion>
246         <exclusion>
247           <artifactId>commons-collections</artifactId>
248           <groupId>commons-collections</groupId>
249         </exclusion>
250         <exclusion>
251           <artifactId>groovy</artifactId>
252           <groupId>org.codehaus.groovy</groupId>
253         </exclusion>
254         <exclusion>
255           <groupId>org.apache.thrift</groupId>
256           <artifactId>libthrift</artifactId>
257         </exclusion>
258       </exclusions>
259     </dependency>
260
261     <dependency>
262       <groupId>com.googlecode.json-simple</groupId>
263       <artifactId>json-simple</artifactId>
264       <version>${json-simple.version}</version>
265       <scope>compile</scope>
266     </dependency>
267
268     <dependency>
269       <groupId>org.janusgraph</groupId>
270       <artifactId>janusgraph-cassandra</artifactId>
271       <version>${janusgraph.version}</version>
272       <scope>compile</scope>
273       <exclusions>
274         <exclusion>
275           <groupId>org.slf4j</groupId>
276           <artifactId>slf4j-log4j12</artifactId>
277         </exclusion>
278       </exclusions>
279     </dependency>
280
281     <dependency>
282       <groupId>commons-logging</groupId>
283       <artifactId>commons-logging</artifactId>
284       <version>${commons-logging}</version>
285       <scope>compile</scope>
286     </dependency>
287
288     <dependency>
289       <groupId>commons-codec</groupId>
290       <artifactId>commons-codec</artifactId>
291       <version>${commons-codec}</version>
292       <scope>compile</scope>
293     </dependency>
294
295     <dependency>
296       <groupId>com.fasterxml.jackson.core</groupId>
297       <artifactId>jackson-databind</artifactId>
298       <version>${jackson.version}</version>
299       <scope>compile</scope>
300     </dependency>
301
302     <!-- Explicitly specified in order to override older version included by epsdk-fw -->
303     <dependency>
304       <groupId>com.fasterxml.jackson.core</groupId>
305       <artifactId>jackson-annotations</artifactId>
306       <version>${jackson-annotations.version}</version>
307     </dependency>
308
309     <dependency>
310       <groupId>com.google.code.gson</groupId>
311       <artifactId>gson</artifactId>
312       <version>${gson.version}</version>
313       <scope>compile</scope>
314     </dependency>
315
316     <dependency>
317       <groupId>org.apache.httpcomponents</groupId>
318       <artifactId>httpclient</artifactId>
319       <version>${httpclient.version}</version>
320       <scope>compile</scope>
321     </dependency>
322
323     <dependency>
324       <groupId>org.apache.httpcomponents</groupId>
325       <artifactId>httpcore</artifactId>
326       <version>${httpcore.version}</version>
327       <scope>compile</scope>
328     </dependency>
329
330     <!-- Spring 4 dependencies -->
331     <dependency>
332       <groupId>org.springframework</groupId>
333       <artifactId>spring-core</artifactId>
334       <version>${spring.version}</version>
335       <scope>compile</scope>
336     </dependency>
337
338     <dependency>
339       <groupId>org.springframework</groupId>
340       <artifactId>spring-context</artifactId>
341       <version>${spring.version}</version>
342       <scope>compile</scope>
343     </dependency>
344
345     <dependency>
346       <groupId>org.springframework</groupId>
347       <artifactId>spring-expression</artifactId>
348       <version>${spring.version}</version>
349       <scope>compile</scope>
350     </dependency>
351
352     <dependency>
353       <groupId>org.springframework</groupId>
354       <artifactId>spring-beans</artifactId>
355       <version>${spring.version}</version>
356       <scope>compile</scope>
357     </dependency>
358
359     <dependency>
360       <groupId>org.springframework</groupId>
361       <artifactId>spring-aop</artifactId>
362       <version>${spring.version}</version>
363       <scope>compile</scope>
364     </dependency>
365
366     <!-- Spring 4 dependencies end -->
367     <!-- JavaConfig need this library -->
368     <dependency>
369       <groupId>cglib</groupId>
370       <artifactId>cglib</artifactId>
371       <version>3.2.4</version>
372       <scope>compile</scope>
373     </dependency>
374
375     <dependency>
376       <groupId>org.yaml</groupId>
377       <artifactId>snakeyaml</artifactId>
378       <version>${snakeyaml.version}</version>
379       <scope>compile</scope>
380     </dependency>
381
382     <dependency>
383       <groupId>org.functionaljava</groupId>
384       <artifactId>functionaljava</artifactId>
385       <version>${functionaljava.version}</version>
386       <scope>compile</scope>
387     </dependency>
388
389     <dependency>
390       <groupId>com.fasterxml.jackson.dataformat</groupId>
391       <artifactId>jackson-dataformat-yaml</artifactId>
392       <version>${jackson.version}</version>
393       <scope>compile</scope>
394     </dependency>
395
396     <!-- CASSANDRA -->
397     <dependency>
398       <groupId>com.datastax.cassandra</groupId>
399       <artifactId>cassandra-driver-core</artifactId>
400       <version>${cassandra.driver.version}</version>
401       <scope>compile</scope>
402     </dependency>
403
404     <dependency>
405       <groupId>com.datastax.cassandra</groupId>
406       <artifactId>cassandra-driver-mapping</artifactId>
407       <version>${cassandra.driver.version}</version>
408       <scope>compile</scope>
409     </dependency>
410
411     <!-- CASSANDRA END -->
412
413     <!-- OPEN CSV -->
414     <dependency>
415       <groupId>com.opencsv</groupId>
416       <artifactId>opencsv</artifactId>
417       <version>4.0</version>
418       <scope>compile</scope>
419     </dependency>
420
421     <dependency>
422       <groupId>org.apache.poi</groupId>
423       <artifactId>poi</artifactId>
424       <version>${apache-poi.version}</version>
425     </dependency>
426
427     <dependency>
428       <groupId>org.jdom</groupId>
429       <artifactId>jdom</artifactId>
430       <version>2.0.2</version>
431       <scope>compile</scope>
432     </dependency>
433
434     <!-- Temporary, till building the populate task which adding all components
435       to cache. We will use Serialization Utils. -->
436     <dependency>
437       <groupId>de.ruedigermoeller</groupId>
438       <artifactId>fst</artifactId>
439       <version>2.47</version>
440       <scope>compile</scope>
441     </dependency>
442
443     <!-- testing -->
444     <dependency>
445       <groupId>org.hamcrest</groupId>
446       <artifactId>hamcrest-all</artifactId>
447       <version>${hamcrest-all.version}</version>
448       <scope>test</scope>
449     </dependency>
450
451     <dependency>
452       <groupId>org.junit.jupiter</groupId>
453       <artifactId>junit-jupiter</artifactId>
454       <version>${junitJupiter.version}</version>
455       <scope>test</scope>
456     </dependency>
457
458     <dependency>
459       <groupId>org.mockito</groupId>
460       <artifactId>mockito-junit-jupiter</artifactId>
461       <version>${mockitoJupiter.version}</version>
462       <scope>test</scope>
463     </dependency>
464
465     <dependency>
466       <groupId>org.testng</groupId>
467       <artifactId>testng</artifactId>
468       <version>${testng.version}</version>
469       <scope>test</scope>
470     </dependency>
471
472     <dependency>
473       <groupId>org.mockito</groupId>
474       <artifactId>mockito-core</artifactId>
475       <scope>test</scope>
476     </dependency>
477
478     <dependency>
479       <groupId>org.assertj</groupId>
480       <artifactId>assertj-core</artifactId>
481       <scope>test</scope>
482     </dependency>
483
484     <dependency>
485       <groupId>com.google.code.bean-matchers</groupId>
486       <artifactId>bean-matchers</artifactId>
487       <version>${bean-matchers.version}</version>
488       <scope>test</scope>
489     </dependency>
490
491     <dependency>
492       <groupId>com.github.stefanbirkner</groupId>
493       <artifactId>system-rules</artifactId>
494       <version>1.19.0</version>
495       <scope>test</scope>
496     </dependency>
497
498     <!-- testing end -->
499
500     <dependency>
501       <groupId>io.netty</groupId>
502       <artifactId>netty-all</artifactId>
503     </dependency>
504
505     <dependency>
506       <groupId>io.netty</groupId>
507       <artifactId>netty-handler</artifactId>
508     </dependency>
509   </dependencies>
510
511   <build>
512     <finalName>${project.artifactId}-${project.version}-jar-with-dependencies</finalName>
513     <plugins>
514       <plugin>
515         <groupId>org.apache.maven.plugins</groupId>
516         <artifactId>maven-deploy-plugin</artifactId>
517         <configuration>
518           <skip>true</skip>
519         </configuration>
520       </plugin>
521
522       <plugin>
523         <groupId>org.apache.maven.plugins</groupId>
524         <artifactId>maven-assembly-plugin</artifactId>
525         <executions>
526           <execution>
527             <configuration>
528               <finalName>sdctool</finalName>
529               <appendAssemblyId>false</appendAssemblyId>
530               <descriptors>
531                 <descriptor>${project.basedir}/tarball.xml</descriptor>
532               </descriptors>
533             </configuration>
534             <id>assemble-file</id>
535             <phase>verify</phase>
536             <goals>
537               <goal>single</goal>
538             </goals>
539           </execution>
540         </executions>
541       </plugin>
542       <plugin>
543         <groupId>org.apache.maven.plugins</groupId>
544         <artifactId>maven-shade-plugin</artifactId>
545         <executions>
546           <execution>
547             <phase>package</phase>
548             <goals>
549               <goal>shade</goal>
550             </goals>
551             <configuration>
552               <filters>
553                 <filter>
554                   <artifact>org.openecomp.sdc:*</artifact>
555                   <excludes>
556                     <exclude>**/elasticsearch.yml</exclude>
557                   </excludes>
558                 </filter>
559                 <filter>
560                   <artifact>*:*</artifact>
561                   <excludes>
562                     <exclude>META-INF/*.SF</exclude>
563                     <exclude>META-INF/*.DSA</exclude>
564                     <exclude>META-INF/*.RSA</exclude>
565                   </excludes>
566                 </filter>
567               </filters>
568               <transformers>
569                 <transformer
570                   implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
571               </transformers>
572             </configuration>
573           </execution>
574         </executions>
575       </plugin>
576       <plugin>
577         <groupId>ru.yaal.maven</groupId>
578         <artifactId>write-text-files-maven-plugin</artifactId>
579         <configuration>
580           <charset>UTF-8</charset>
581           <files>
582             <file>
583               <path>
584                 ${project.basedir}\sdc-cassandra-init\chef-repo\cookbooks\cassandra-actions\attributes\version.rb
585               </path>
586               <lines>
587                 <line>
588                   normal['version']="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
589                 </line>
590               </lines>
591             </file>
592           </files>
593         </configuration>
594         <executions>
595           <execution>
596             <id>write-text-files</id>
597             <phase>prepare-package</phase>
598             <goals>
599               <goal>write-text-files</goal>
600             </goals>
601           </execution>
602         </executions>
603       </plugin>
604       <plugin>
605         <groupId>org.apache.maven.plugins</groupId>
606         <artifactId>maven-resources-plugin</artifactId>
607         <executions>
608           <execution>
609             <id>copy-tosca-folder</id>
610             <!-- here the phase you need -->
611             <phase>compile</phase>
612             <goals>
613               <goal>copy-resources</goal>
614             </goals>
615             <configuration>
616               <outputDirectory>${project.parent.basedir}/asdctool/tosca</outputDirectory>
617               <resources>
618                 <resource>
619                   <directory>${project.parent.basedir}/catalog-be/src/main/resources/import/tosca
620                   </directory>
621                   <filtering>true</filtering>
622                 </resource>
623               </resources>
624             </configuration>
625           </execution>
626         </executions>
627       </plugin>
628       <plugin>
629         <groupId>com.github.sylvainlaurent.maven</groupId>
630         <artifactId>yaml-json-validator-maven-plugin</artifactId>
631         <executions>
632           <execution>
633             <id>validate</id>
634             <phase>validate</phase>
635             <goals>
636               <goal>validate</goal>
637             </goals>
638             <configuration>
639               <validationSets>
640                 <validationSet>
641                   <includes>
642                     <include>src/main/resources/**/*.y*ml</include>
643                     <include>src/test/resources/**/*.y*ml</include>
644                   </includes>
645                 </validationSet>
646                 <validationSet>
647                   <includes>
648                     <include>src/main/resources/**/*.json</include>
649                     <include>src/test/resources/**/*.json</include>
650                   </includes>
651                   <excludes>
652                     <exclude>src/test/resources/graphError.json</exclude>
653                   </excludes>
654                 </validationSet>
655               </validationSets>
656             </configuration>
657           </execution>
658         </executions>
659       </plugin>
660     </plugins>
661   </build>
662   <profiles>
663     <profile>
664       <id>docker</id>
665       <activation>
666         <activeByDefault>false</activeByDefault>
667       </activation>
668       <build>
669         <plugins>
670           <plugin>
671             <groupId>org.apache.maven.plugins</groupId>
672             <artifactId>maven-resources-plugin</artifactId>
673             <executions>
674               <execution>
675                 <id>copy-sdctool</id>
676                 <phase>verify</phase>
677                 <goals>
678                   <goal>copy-resources</goal>
679                 </goals>
680                 <configuration>
681                   <outputDirectory>
682                     ${basedir}/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/files/default
683                   </outputDirectory>
684                   <resources>
685                     <resource>
686                       <directory>${project.parent.basedir}/asdctool/target</directory>
687                       <includes>
688                         <include>sdctool.tar</include>
689                       </includes>
690                     </resource>
691                   </resources>
692                 </configuration>
693               </execution>
694             </executions>
695           </plugin>
696           <plugin>
697             <groupId>io.fabric8</groupId>
698             <artifactId>docker-maven-plugin</artifactId>
699             <configuration>
700               <apiVersion>1.23</apiVersion>
701               <registry>nexus3.onap.org:10001</registry>
702               <authConfig>
703                 <pull>
704                   <username>docker</username>
705                   <password>docker</password>
706                 </pull>
707               </authConfig>
708               <images>
709                 <!-- Build cassandra-init image -->
710                 <image>
711                   <name>onap/sdc-cassandra-init</name>
712                   <alias>sdc-cassandra-init</alias>
713                   <build>
714                     <cleanup>try</cleanup>
715                     <dockerFileDir>${project.basedir}/sdc-cassandra-init</dockerFileDir>
716                     <tags>
717                       <tag>${docker.tag}</tag>
718                       <tag>
719                         ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
720                       </tag>
721                     </tags>
722                   </build>
723                 </image>
724               </images>
725             </configuration>
726             <executions>
727               <execution>
728                 <id>clean-images</id>
729                 <phase>pre-clean</phase>
730                 <goals>
731                   <goal>remove</goal>
732                 </goals>
733                 <configuration>
734                   <removeAll>true</removeAll>
735                   <image>onap/sdc-cassandra-init</image>
736                 </configuration>
737               </execution>
738
739               <execution>
740                 <id>generate-images</id>
741                 <phase>install</phase>
742                 <goals>
743                   <goal>build</goal>
744                 </goals>
745               </execution>
746
747               <execution>
748                 <id>push-images</id>
749                 <phase>deploy</phase>
750                 <goals>
751                   <goal>push</goal>
752                 </goals>
753                 <configuration>
754                   <image>onap/sdc-cassandra-init</image>
755                 </configuration>
756               </execution>
757             </executions>
758           </plugin>
759         </plugins>
760       </build>
761     </profile>
762   </profiles>
763 </project>