Change ajsc pom to put docker plugins into profile
[aai/aai-service.git] / ajsc-aai / pom.xml
1 <?xml version="1.0"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4   <modelVersion>4.0.0</modelVersion>
5   <parent>
6     <groupId>org.openecomp.aai.aai-service</groupId>
7     <artifactId>aai-service</artifactId>
8     <version>1.0.0-SNAPSHOT</version>
9   </parent>
10   <artifactId>ajsc-aai</artifactId>
11   <name>ajsc</name>
12   <url>http://maven.apache.org</url>
13   <properties>
14                 <dockerLocation>${basedir}/target/swm/package/nix/dist_files/</dockerLocation>
15                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 
17   </properties>
18   <dependencies>
19                 <!-- AJSC related dependencies -->
20                 <dependency>
21                         <groupId>com.att.ajsc</groupId>
22                         <artifactId>ajsc-runner</artifactId>
23                         <version>${ajscRuntimeVersion}</version>
24                 </dependency>
25                 <dependency>
26                         <groupId>com.att.ajsc</groupId>
27                         <artifactId>ajsc-core</artifactId>
28                         <version>${ajscRuntimeVersion}</version>
29                         <scope>provided</scope>
30                 </dependency>
31                 
32                 <dependency>
33                         <groupId>dom4j</groupId>
34                         <artifactId>dom4j</artifactId>
35                         <version>1.6.1</version>
36                 </dependency>
37
38                 <dependency>
39                         <groupId>commons-lang</groupId>
40                         <artifactId>commons-lang</artifactId>
41                         <version>2.6</version>
42                 </dependency>
43
44                 <dependency> 
45                         <groupId>com.att.eelf</groupId> 
46                         <artifactId>eelf-core</artifactId> 
47                         <version>0.0.1</version> 
48                 </dependency> 
49  
50                 <dependency> 
51                         <groupId>com.att.eelf</groupId> 
52                         <artifactId>eelf-maven-plugin</artifactId> 
53                         <version>0.0.1</version> 
54                 </dependency>
55
56                 <dependency>
57                         <groupId>ch.qos.logback</groupId>
58                         <artifactId>logback-core</artifactId>
59                         <version>1.1.7</version>
60                 </dependency>
61
62                 <dependency>
63                         <groupId>ch.qos.logback</groupId>
64                         <artifactId>logback-classic</artifactId>
65                         <version>1.1.7</version>
66                 </dependency>
67
68                 <dependency>
69                         <groupId>ch.qos.logback</groupId>
70                         <artifactId>logback-access</artifactId>
71                         <version>1.1.7</version>
72                 </dependency>
73
74                 <dependency>
75                         <groupId>org.codehaus.janino</groupId>
76                         <artifactId>janino</artifactId>
77                         <version>2.7.8</version>
78                 </dependency>
79
80                 <dependency>
81                         <groupId>commons-io</groupId>
82                         <artifactId>commons-io</artifactId>
83                 </dependency>
84                 <dependency>
85                         <groupId>commons-collections</groupId>
86                         <artifactId>commons-collections</artifactId>
87                 </dependency>
88
89
90
91                 <dependency>
92                         <groupId>junit</groupId>
93                         <artifactId>junit</artifactId>
94                         <scope>test</scope>
95                 </dependency>
96                 <dependency>
97                         <groupId>com.google.guava</groupId>
98                         <artifactId>guava</artifactId>
99                         <version>16.0</version>
100                 </dependency>
101                 <dependency>
102                         <groupId>com.thinkaurelius.titan</groupId>
103                         <artifactId>titan-core</artifactId>
104                         <version>1.0.0</version>
105                         <exclusions>
106                                 <exclusion>
107                                         <groupId>org.slf4j</groupId>
108                                         <artifactId>slf4j-log4j12</artifactId>
109                                 </exclusion>
110                         </exclusions>
111                 </dependency>
112                 <dependency>
113                         <groupId>com.thinkaurelius.titan</groupId>
114                         <artifactId>titan-hbase</artifactId>
115                         <version>1.0.0</version>
116                         <exclusions>
117                                 <exclusion>
118                                         <groupId>org.slf4j</groupId>
119                                         <artifactId>slf4j-log4j12</artifactId>
120                                 </exclusion>
121                         </exclusions>
122                 </dependency>
123                 <dependency>
124                         <groupId>org.apache.tinkerpop</groupId>
125                         <artifactId>tinkerpop</artifactId>
126                         <version>3.1.0-incubating</version>
127                         <type>pom</type>
128                 </dependency>
129                 <dependency>
130                         <groupId>org.apache.hbase</groupId>
131                         <artifactId>hbase-client</artifactId>
132                         <version>1.0.2</version>
133                         <exclusions>
134                                 <exclusion>
135                                         <groupId>org.slf4j</groupId>
136                                         <artifactId>slf4j-log4j12</artifactId>
137                                 </exclusion>
138                                 <exclusion>
139                                         <artifactId>log4j</artifactId>
140                                         <groupId>log4j</groupId>
141                                 </exclusion>
142                         </exclusions>
143                 </dependency>
144                 <dependency>
145                         <groupId>org.apache.hbase</groupId>
146                         <artifactId>hbase-protocol</artifactId>
147                         <version>1.0.2</version>
148                         <exclusions>
149                                 <exclusion>
150                                         <artifactId>log4j</artifactId>
151                                         <groupId>log4j</groupId>
152                                 </exclusion>
153                         </exclusions>
154                 </dependency>
155                 <dependency>
156                         <groupId>org.apache.hbase</groupId>
157                         <artifactId>hbase-common</artifactId>
158                         <version>1.0.2</version>
159                         <exclusions>
160                                 <exclusion>
161                                         <artifactId>log4j</artifactId>
162                                         <groupId>log4j</groupId>
163                                 </exclusion>
164                         </exclusions>
165                 </dependency>
166                 <dependency>
167                         <groupId>com.google.inject.extensions</groupId>
168                         <artifactId>guice-servlet</artifactId>
169                         <version>3.0</version>
170                 </dependency>
171                 <dependency>
172                         <groupId>com.google.inject</groupId>
173                         <artifactId>guice</artifactId>
174                         <version>3.0</version>
175                 </dependency>
176
177                 <dependency>
178                         <groupId>com.sun.jersey</groupId>
179                         <artifactId>jersey-json</artifactId>
180                         <version>1.18</version>
181                 </dependency>
182                 <dependency>
183                         <groupId>jivesoftware</groupId>
184                         <artifactId>smack</artifactId>
185                         <version>3.0.4</version>
186                 </dependency>
187
188                 <dependency>
189                         <groupId>com.fasterxml.jackson.jaxrs</groupId>
190                         <artifactId>jackson-jaxrs-json-provider</artifactId>
191                         <version>2.1.4</version>
192                 </dependency>
193                 <dependency>
194                         <groupId>com.googlecode.json-simple</groupId>
195                         <artifactId>json-simple</artifactId>
196                         <version>1.1.1</version>
197                 </dependency>
198                 <dependency>
199                         <groupId>com.sun.jersey</groupId>
200                         <artifactId>jersey-client</artifactId>
201                         <version>1.18</version>
202                 </dependency>
203                 <dependency>
204                         <groupId>org.springframework</groupId>
205                         <artifactId>spring-web</artifactId>
206                         <version>4.2.5.RELEASE</version>
207                 </dependency>
208                 <dependency>
209                         <groupId>org.springframework.ws</groupId>
210                         <artifactId>spring-ws</artifactId>
211                         <version>1.5.2</version>
212                         <!--<version>2.1.3-RELEASE</version> -->
213                 </dependency>
214                 <dependency>
215                         <groupId>org.springframework</groupId>
216                         <artifactId>spring-core</artifactId>
217                         <version>4.2.5.RELEASE</version>
218                 </dependency>
219                 <dependency>
220                         <groupId>org.mockito</groupId>
221                         <artifactId>mockito-all</artifactId>
222                         <version>1.10.19</version>
223                         <scope>test</scope>
224                 </dependency>
225                 <dependency>
226                         <groupId>org.powermock</groupId>
227                         <artifactId>powermock-module-junit4</artifactId>
228                         <version>1.6.2</version>
229                         <scope>test</scope>
230                 </dependency>
231                 <dependency>
232                         <groupId>org.powermock</groupId>
233                         <artifactId>powermock-api-mockito</artifactId>
234                         <version>1.6.2</version>
235                         <scope>test</scope>
236                 </dependency>
237                 <dependency>
238                         <groupId>com.beust</groupId>
239                         <artifactId>jcommander</artifactId>
240                         <version>1.48</version>
241                 </dependency>
242                 <dependency>
243                         <groupId>org.json</groupId>
244                         <artifactId>json</artifactId>
245                         <version>20090211</version>
246                 </dependency>
247                 <dependency>
248                         <groupId>org.freemarker</groupId>
249                         <artifactId>freemarker</artifactId>
250                         <version>2.3.14</version>
251                 </dependency>
252                 <dependency>
253                         <groupId>javax.xml.bind</groupId>
254                         <artifactId>jaxb-api</artifactId>
255                         <version>2.2.11</version>
256                 </dependency>
257                 <dependency>
258                         <groupId>com.sun.xml.bind</groupId>
259                         <artifactId>jaxb-impl</artifactId>
260                         <version>2.2.11</version>
261                 </dependency>
262                 <dependency>
263                         <groupId>com.sun.xml.bind</groupId>
264                         <artifactId>jaxb-core</artifactId>
265                         <version>2.2.11</version>
266                 </dependency>
267                 <dependency>
268                         <groupId>com.sun.xml.bind</groupId>
269                         <artifactId>jaxb-xjc</artifactId>
270                         <version>2.2.11</version>
271                 </dependency>
272                 <dependency>
273                         <groupId>org.eclipse.persistence</groupId>
274                         <artifactId>eclipselink</artifactId>
275                         <version>2.6.2</version>
276                 </dependency>
277                 <dependency>
278                         <groupId>org.eclipse.persistence</groupId>
279                         <artifactId>org.eclipse.persistence.moxy</artifactId>
280                         <version>2.6.2</version>
281                         <scope>compile</scope>
282                 </dependency>
283                 <dependency>
284                         <groupId>org.powermock</groupId>
285                         <artifactId>powermock-module-javaagent</artifactId>
286                         <version>1.6.2</version>
287                         <scope>test</scope>
288                 </dependency>
289                 <dependency>
290                         <groupId>org.powermock</groupId>
291                         <artifactId>powermock-module-junit4-rule-agent</artifactId>
292                         <version>1.6.2</version>
293                         <scope>test</scope>
294                 </dependency>
295                 <dependency>
296                         <groupId>com.github.fge</groupId>
297                         <artifactId>json-patch</artifactId>
298                         <version>1.9</version>
299                 </dependency>
300                 <dependency>
301                         <groupId>org.javatuples</groupId>
302                         <artifactId>javatuples</artifactId>
303                         <version>1.2</version>
304                         <scope>compile</scope>
305                 </dependency>
306                 <dependency>
307                         <groupId>com.google.code.gson</groupId>
308                         <artifactId>gson</artifactId>
309                         <version>2.7</version>
310                 </dependency>
311                 <dependency>
312                         <groupId>com.att.nsa</groupId>
313                         <artifactId>dmaapClient</artifactId>
314                         <version>0.2.12</version>
315                 </dependency>
316                 <dependency>
317                         <groupId>org.apache.httpcomponents</groupId>
318                         <artifactId>httpcore</artifactId>
319                         <version>4.4</version>
320                 </dependency>
321                 <dependency>
322                         <groupId>org.apache.activemq</groupId>
323                         <artifactId>activemq-broker</artifactId>
324                         <version>5.12.2</version>
325                 </dependency>   
326
327         <dependency>
328                 <groupId>org.openecomp.aai.aai-service</groupId>
329                 <artifactId>annotations</artifactId>
330                 <version>1.0.0-SNAPSHOT</version>
331         </dependency>
332   </dependencies>
333   <build>
334     <plugins>   
335                 <plugin>
336                         <groupId>org.jvnet.jaxb2.maven2</groupId>
337                                 <artifactId>maven-jaxb2-plugin</artifactId>
338                                 <version>0.13.1</version>
339                                 <executions>
340                                         <execution>
341                                                 <id>gen-xjc</id>
342                                                 <goals>
343                                                         <goal>generate</goal>
344                                                 </goals>
345                                         </execution>
346                                 </executions>
347                                 <configuration>
348                                         <extension>true</extension>
349                                         <args>
350                                                 <arg>-Xannotate</arg>
351                                         </args>
352                                         <generateDirectory>target/generated-sources</generateDirectory>
353                                         <schemaDirectory>src/main/aai_schema</schemaDirectory>
354                                         <bindingDirectory>src/main/xjb</bindingDirectory>
355                                         <plugins>
356                                                 <plugin>
357                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
358                                                         <artifactId>jaxb2-basics-annotate</artifactId>
359                                                         <version>1.0.2</version>
360                                                 </plugin>
361                                                 <plugin>
362                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
363                                                         <artifactId>jaxb2-basics</artifactId>
364                                                         <version>1.11.1</version>
365                                                 </plugin>
366                                                 <plugin>
367                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
368                                                         <artifactId>jaxb2-basics-runtime</artifactId>
369                                                         <version>1.11.1</version>
370                                                 </plugin>
371                                                 <plugin>
372                                                         <groupId>org.jvnet.jaxb2_commons</groupId>
373                                                         <artifactId>jaxb2-basics-tools</artifactId>
374                                                         <version>1.11.1</version>
375                                                 </plugin>
376                                                 <plugin>
377                                                         <groupId>org.openecomp.aai.aai-service</groupId>
378                                                         <artifactId>annotations</artifactId>
379                                                         <version>${project.release}</version>
380                                                 </plugin>
381                                         </plugins>
382                                 </configuration>
383                         </plugin>
384                         <plugin>
385                                 <groupId>org.jsonschema2pojo</groupId>
386                                 <artifactId>jsonschema2pojo-maven-plugin</artifactId>
387                                 <version>0.4.13</version>
388                                 <configuration>
389                                         <sourceType>jsonschema</sourceType>
390                                         <sourceDirectory>src/main/resources/json</sourceDirectory>
391                                         <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
392                                         <annotationStyle>jackson2</annotationStyle>
393                                         <generateBuilders>true</generateBuilders>
394                                 </configuration>
395                         </plugin>
396                         <plugin>
397                                 <groupId>org.apache.maven.plugins</groupId>
398                                 <artifactId>maven-jar-plugin</artifactId>
399                                 <version>2.4</version>
400                                 <executions>
401                                         <execution>
402                                                 <id>aai-custom-jar</id>
403                                                 <phase>prepare-package</phase>
404                                                 <goals>
405                                                         <goal>jar</goal>
406                                                 </goals>
407                                                 <configuration>
408                                                         <includes>
409                                                                 <include>org/openecomp/aai/util/**/*</include>
410                                                         </includes>
411                                                         <finalName>aai-custom</finalName>
412                                                 </configuration>
413                                         </execution>
414                                         <execution>
415                                                 <id>aai-logging-jar</id>
416                                                 <phase>prepare-package</phase>
417                                                 <goals>
418                                                         <goal>jar</goal>
419                                                 </goals>
420                                                 <configuration>
421                                                         <includes>
422                                                                 <include>org/openecomp/aai/logging/**/*</include>
423                                                         </includes>
424                                                         <finalName>aai-logging</finalName>
425                                                 </configuration>
426                                         </execution>
427                                 </executions>
428                         </plugin>
429                         <plugin>
430                                 <groupId>org.apache.maven.plugins</groupId>
431                                 <artifactId>maven-dependency-plugin</artifactId>
432                                 <version>2.5.1</version>
433                                 <executions>
434                                         <execution>
435                                                 <id>copy-agent</id>
436                                                 <phase>process-test-classes</phase>
437                                                 <goals>
438                                                         <goal>copy</goal>
439                                                 </goals>
440                                                 <configuration>
441                                                         <artifactItems>
442                                                                 <artifactItem>
443                                                                         <groupId>org.powermock</groupId>
444                                                                         <artifactId>powermock-module-javaagent</artifactId>
445                                                                         <version>1.6.2</version>
446                                                                         <outputDirectory>${project.build.directory}/agents</outputDirectory>
447                                                                         <destFileName>powermock-javaagent.jar</destFileName>
448                                                                 </artifactItem>
449                                                         </artifactItems>
450                                                 </configuration>
451                                         </execution>
452                                 </executions>
453                         </plugin>
454                         <plugin>
455                             <groupId>org.apache.maven.plugins</groupId>
456                             <artifactId>maven-dependency-plugin</artifactId>
457                             <executions>
458                               <execution>
459                                 <id>unpack-schema-dependency</id>
460                                 <phase>initialize</phase>
461                                 <goals>
462                                   <goal>unpack</goal>
463                                 </goals>
464                               </execution>
465                             </executions>
466                             <configuration>
467                               <artifactItems>
468                                 <artifactItem>
469                                   <groupId>org.openecomp.aai.aai-service</groupId>
470                                   <artifactId>aai-schema</artifactId>
471                                   <version>1.0.0-SNAPSHOT</version>
472                                   <outputDirectory>bundleconfig-local/etc</outputDirectory>
473                                   <includes>oxm/*.xml</includes>
474                                 </artifactItem>
475                                 <artifactItem>
476                                   <groupId>org.openecomp.aai.aai-service</groupId>
477                                   <artifactId>aai-schema</artifactId>
478                                   <version>1.0.0-SNAPSHOT</version>
479                                   <outputDirectory>src/main</outputDirectory>
480                                   <includes>aai_schema/*.xsd</includes>
481                                 </artifactItem>
482                               </artifactItems>
483                               <!-- other configurations here -->
484                             </configuration>
485                           </plugin>
486                         <plugin>
487                                 <groupId>org.apache.maven.plugins</groupId>
488                                 <artifactId>maven-surefire-plugin</artifactId>
489                                 <version>2.12.4</version>
490                                 <configuration>
491                                         <reuseForks>false</reuseForks>
492                                         <threadCount>1</threadCount> 
493                                         <argLine>-javaagent:${project.build.directory}/agents/powermock-javaagent.jar
494                                                 -noverify</argLine>
495                                         <systemPropertyVariables>
496                                                 <AJSC_HOME>.</AJSC_HOME>
497                                                 <BUNDLECONFIG_DIR>bundleconfig-local</BUNDLECONFIG_DIR>
498                                         </systemPropertyVariables>
499                                         <excludes>
500                                 <exclude>**/*.java</exclude>            
501                                         </excludes>
502                                 </configuration>
503                         </plugin>
504                         <plugin>
505                         <groupId>org.apache.maven.plugins</groupId>
506                         <artifactId>maven-deploy-plugin</artifactId>
507                         <executions>
508                                 <execution>
509                                 <id>default-deploy</id>
510                                 <phase>none</phase>
511                                 </execution>
512                                 </executions>
513                         </plugin> 
514                         </plugins>
515         </build>
516                 <profiles>
517                 <!-- Use this profile to run the AJSC locally. This profile can be successfully 
518                         shutdown WITHIN eclipse even in a Windows environment. Debugging is also 
519                         available with this profile. -->
520                 <profile>
521                         <id>passwordGenerator</id>
522                         <build>
523                                 <defaultGoal>initialize</defaultGoal>
524                                 <plugins>
525                                         <plugin>
526                                                 <groupId>org.codehaus.mojo</groupId>
527                                                 <artifactId>exec-maven-plugin</artifactId>
528                                                 <version>1.3.2</version>
529                                                 <executions>
530                                                         <execution>
531                                                                 <phase>initialize</phase>
532                                                                 <goals>
533                                                                         <goal>java</goal>
534                                                                 </goals>
535                                                                 <configuration>
536                                                                         <mainClass>org.eclipse.jetty.util.security.Password</mainClass>
537                                                                         <arguments>
538                                                                                 <argument>user</argument>
539                                                                                 <argument>changeit</argument>
540                                                                         </arguments>
541                                                                 </configuration>
542                                                         </execution>
543                                                 </executions>
544                                                 <configuration>
545                                                         <executable>java</executable>
546                                                 </configuration>
547                                         </plugin>                                       
548                                 </plugins>
549                         </build>
550                 </profile>
551                 <profile>
552                   <id>docker</id>
553                   <build>
554                         <defaultGoal>docker:build</defaultGoal>
555                         <plugins>
556                          <plugin>
557                         <groupId>org.apache.maven.plugins</groupId>
558                         <artifactId>maven-resources-plugin</artifactId>
559                         <version>2.7</version>
560                         <executions>
561                             <execution>
562                                 <id>copy-docker-file</id>
563                                 <phase>package</phase>
564                                 <goals>
565                                     <goal>copy-resources</goal>
566                                 </goals>
567                                 <configuration>
568                                     <outputDirectory>${dockerLocation}</outputDirectory>
569                                     <overwrite>true</overwrite>
570                                     <resources>
571                                         <resource>
572                                             <directory>${basedir}/src/main/resources/docker</directory>
573                                             <filtering>true</filtering>
574                                             <includes>
575                                                 <include>**/*</include>
576                                             </includes>
577                                         </resource>
578                                     </resources>
579                                 </configuration>
580                             </execution>
581                             <execution>
582                                 <id>copy-commonlibs-file</id>
583                                 <phase>package</phase>
584                                 <goals>
585                                     <goal>copy-resources</goal>
586                                 </goals>
587                                 <configuration>
588                                     <outputDirectory>${dockerLocation}/commonLibs</outputDirectory>
589                                     <overwrite>true</overwrite>
590                                     <resources>
591                                         <resource>
592                                             <directory>${basedir}/target/commonLibs</directory>
593                                             <filtering>false</filtering>
594                                             <includes>
595                                                 <include>*.jar</include>
596                                             </includes>
597                                         </resource>
598                                     </resources>
599                                 </configuration>
600                             </execution>
601                         </executions>
602                     </plugin>
603                     <plugin>
604                         <groupId>com.spotify</groupId>
605                         <artifactId>docker-maven-plugin</artifactId>
606                         <version>0.4.11</version>
607                         <configuration>
608                                 <verbose>true</verbose>
609                                                 
610                             <imageName>${docker.push.registry}/${project.artifactId}</imageName>
611                             <dockerDirectory>${dockerLocation}</dockerDirectory>
612                             <serverId>docker-hub</serverId>                   
613                             <imageTags>
614                                 <imageTag>${docker_imageversion}</imageTag>
615                                 <imageTag>latest</imageTag>
616                             </imageTags>
617                             <forceTags>true</forceTags>
618                         </configuration>
619                     </plugin>
620                          </plugins>
621                  </build>
622                 </profile>
623         </profiles>
624 </project>