Release docker image of AAF to nexus
[aaf/authz.git] / authz-service / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!--\r
3   ============LICENSE_START====================================================\r
4   * org.onap.aaf\r
5   * ===========================================================================\r
6   * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
7   * ===========================================================================\r
8   * Licensed under the Apache License, Version 2.0 (the "License");\r
9   * you may not use this file except in compliance with the License.\r
10   * You may obtain a copy of the License at\r
11   * \r
12    *      http://www.apache.org/licenses/LICENSE-2.0\r
13   * \r
14    * Unless required by applicable law or agreed to in writing, software\r
15   * distributed under the License is distributed on an "AS IS" BASIS,\r
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
17   * See the License for the specific language governing permissions and\r
18   * limitations under the License.\r
19   * ============LICENSE_END====================================================\r
20   *\r
21   * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
22   *\r
23 -->\r
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
25         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
26         <modelVersion>4.0.0</modelVersion>\r
27         <parent>\r
28                 <groupId>org.onap.aaf.authz</groupId>\r
29                 <artifactId>parent</artifactId>\r
30                 <version>1.0.1-SNAPSHOT</version>\r
31                 <relativePath>../pom.xml</relativePath>\r
32         </parent>\r
33                 \r
34         <artifactId>authz-service</artifactId>\r
35         <name>Authz Service</name>\r
36         <description>API for Authorization and Authentication</description>\r
37                 <url>https://github.com/att/AAF</url>\r
38         <licenses>\r
39                 <license>\r
40                 <name>BSD License</name>\r
41                 <url> </url>\r
42                 </license>\r
43         </licenses>\r
44         <developers>\r
45                 <developer>\r
46                 <name>Jonathan Gathman</name>\r
47                 <email></email>\r
48         <organization>ATT</organization>\r
49         <organizationUrl></organizationUrl>\r
50                 </developer>\r
51         </developers>\r
52 \r
53         <properties>\r
54         <maven.build.timestamp.format>yyyy.MM.dd'T'hh.mm.ss'Z'</maven.build.timestamp.format>\r
55                 <maven.test.failure.ignore>true</maven.test.failure.ignore>\r
56                 <project.swmVersion>1</project.swmVersion>\r
57                         <project.innoVersion>1.0.0-SNAPSHOT</project.innoVersion>\r
58                 <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
59         <dockerLocation>${basedir}/target/</dockerLocation>\r
60                 <distFilesRootDirPath>opt/app/aaf/${project.artifactId}/${project.version}</distFilesRootDirPath>\r
61                         <sonar.language>java</sonar.language>\r
62                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
63                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
64                 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
65                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
66                 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
67                 <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
68         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
69                 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
70                 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
71                 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>\r
72                 <sitePath>/content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version}</sitePath>\r
73         <skip.docker.build>true</skip.docker.build>\r
74         <skip.docker.push>true</skip.docker.push>\r
75         <skip.staging.artifacts>false</skip.staging.artifacts>\r
76         </properties>\r
77         \r
78                 \r
79         <dependencies>\r
80         <dependency>\r
81             <groupId>org.onap.aaf.authz</groupId>\r
82             <artifactId>authz-client</artifactId>\r
83                         <version>${project.version}</version>\r
84         </dependency>\r
85                 \r
86                 <dependency>\r
87             <groupId>org.onap.aaf.authz</groupId>\r
88             <artifactId>authz-cmd</artifactId>\r
89                         <version>${project.version}</version>\r
90         </dependency>           \r
91         <dependency>\r
92             <groupId>org.onap.aaf.authz</groupId>\r
93             <artifactId>authz-core</artifactId>\r
94                         <version>${project.version}</version>\r
95             <exclusions>\r
96                           <exclusion> \r
97                                         <groupId>javax.servlet</groupId>\r
98                         <artifactId>servlet-api</artifactId>\r
99                    </exclusion>\r
100                     </exclusions> \r
101         </dependency>\r
102         \r
103         <dependency>\r
104             <groupId>org.onap.aaf.authz</groupId>\r
105             <artifactId>authz-cass</artifactId>\r
106                         <version>${project.version}</version>\r
107         </dependency>\r
108 \r
109         <dependency>\r
110             <groupId>org.onap.aaf.authz</groupId>\r
111             <artifactId>authz-defOrg</artifactId>\r
112             <version>${project.version}</version>\r
113         </dependency>\r
114 \r
115 \r
116         \r
117         <dependency > \r
118                         <groupId>org.onap.aaf.inno</groupId>\r
119                         <artifactId>env</artifactId>\r
120                         <version>${project.innoVersion}</version>\r
121                 </dependency>\r
122 \r
123 \r
124                 <dependency>\r
125                         <groupId>org.onap.aaf.cadi</groupId>\r
126                         <artifactId>cadi-core</artifactId>\r
127                         <version>${project.cadiVersion}</version>\r
128                 </dependency>\r
129 \r
130                 <dependency>\r
131                         <groupId>com.att.aft</groupId>\r
132                         <artifactId>dme2</artifactId>\r
133                 </dependency>\r
134 \r
135                 <dependency>\r
136                         <groupId>org.onap.aaf.inno</groupId>\r
137                         <artifactId>rosetta</artifactId>\r
138                         <version>${project.innoVersion}</version>\r
139                 </dependency>\r
140                 <dependency>\r
141                         <groupId>org.onap.aaf.cadi</groupId>\r
142                         <artifactId>cadi-aaf</artifactId>\r
143                         <version>${project.cadiVersion}</version>\r
144                 </dependency>   \r
145         </dependencies>\r
146 \r
147 \r
148         <build>\r
149             <plugins>\r
150         \r
151                 \r
152 <plugin>\r
153         <groupId>com.spotify</groupId>\r
154         <artifactId>docker-maven-plugin</artifactId>\r
155         <version>1.0.0</version>\r
156         <configuration>\r
157           <imageName>onap/aaf/authz-service</imageName>\r
158          <dockerDirectory>${dockerLocation}</dockerDirectory>\r
159           <imageTags>\r
160             <imageTag>latest</imageTag>\r
161             <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>\r
162             <imageTag>${project.docker.latesttag.version}</imageTag>\r
163           </imageTags>\r
164           <forceTags>true</forceTags>\r
165                   <resources>\r
166             <resource>\r
167                             <targetPath>/</targetPath>\r
168                     <directory>${project.build.directory}/opt</directory>\r
169                     <filtering>true</filtering>\r
170                      <includes>\r
171                         <include>**/*</include>\r
172                             </includes>\r
173             </resource>\r
174          </resources>  \r
175                  \r
176                  </configuration>\r
177         <executions>\r
178        <!--   <execution>\r
179             <id>build-image</id>\r
180             <phase>package</phase>\r
181             <goals>\r
182               <goal>build</goal>\r
183             </goals>\r
184             <configuration>\r
185               <skipDockerBuild>${skip.docker.build}</skipDockerBuild>\r
186             </configuration>\r
187           </execution>  -->\r
188 \r
189           <execution>\r
190             <id>tag-image-latest-timestamp</id>\r
191             <phase>package</phase>\r
192             <goals>\r
193               <goal>tag</goal>\r
194             </goals>\r
195             <configuration>\r
196               <image>onap/aaf/authz-service</image>\r
197               <newName>onap/aaf/authz-service:${project.docker.latesttagtimestamp.version}</newName>\r
198               <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
199             </configuration>\r
200           </execution>\r
201           <execution>\r
202             <id>push-image-latest-timestamp</id>\r
203             <phase>deploy</phase>\r
204             <goals>\r
205               <goal>push</goal>\r
206             </goals>\r
207             <configuration>\r
208               <imageName>onap/aaf/authz-service:${project.docker.latesttagtimestamp.version}</imageName>\r
209               <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
210             </configuration>\r
211           </execution>\r
212           <execution>\r
213             <id>tag-image-latest</id>\r
214             <phase>package</phase>\r
215             <goals>\r
216               <goal>tag</goal>\r
217             </goals>\r
218             <configuration>\r
219               <image>onap/aaf/authz-service</image>\r
220               <newName>onap/aaf/authz-service:${project.docker.latesttag.version}</newName>\r
221               <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
222             </configuration>\r
223           </execution>\r
224           <execution>\r
225             <id>push-image-latest</id>\r
226             <phase>deploy</phase>\r
227             <goals>\r
228               <goal>push</goal>\r
229             </goals>\r
230             <configuration>\r
231               <imageName>onap/aaf/authz-service:${project.docker.latesttag.version}</imageName>\r
232               <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
233             </configuration>\r
234           </execution>\r
235           <execution>\r
236             <id>tag-image</id>\r
237             <phase>package</phase>\r
238             <goals>\r
239               <goal>tag</goal>\r
240             </goals>\r
241             <configuration>\r
242               <image>onap/aaf/authz-service</image>\r
243               <newName>onap/aaf/authz-service:latest</newName>\r
244               <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
245             </configuration>\r
246           </execution>\r
247           <execution>\r
248             <id>push-image</id>\r
249             <phase>deploy</phase>\r
250             <goals>\r
251               <goal>push</goal>\r
252             </goals>\r
253             <configuration>\r
254               <imageName>onap/aaf/authz-service:latest</imageName>\r
255               <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
256             </configuration>\r
257           </execution>\r
258         </executions>\r
259       </plugin>\r
260 \r
261  <plugin>\r
262                 <artifactId>maven-resources-plugin</artifactId>\r
263                 <version>2.7</version>\r
264               <executions>\r
265                     <execution>\r
266                         <id>copy-docker-file</id>\r
267                         <phase>package</phase>\r
268                         <goals>\r
269                             <goal>copy-resources</goal>\r
270                         </goals>\r
271                         <configuration>\r
272                             <outputDirectory>${dockerLocation}</outputDirectory>\r
273                             <overwrite>true</overwrite>\r
274                             <resources>\r
275                                 <resource>\r
276                                     <directory>${basedir}/src/main/resources/docker</directory>\r
277                                     <filtering>true</filtering>\r
278                                     <includes>\r
279                                         <include>**/*</include>\r
280                                     </includes>\r
281                                 </resource>\r
282                             </resources>\r
283                         </configuration>\r
284                     </execution>  \r
285       <execution>\r
286         <id>copy-resources-1</id>\r
287         <phase>validate</phase>\r
288         <goals>\r
289           <goal>copy-resources</goal>\r
290         </goals>\r
291         <configuration>\r
292          <outputDirectory>${project.build.directory}/opt/dme2reg/</outputDirectory>\r
293           <resources>\r
294             <resource>\r
295                         <directory>${project.basedir}/src/main/resources/dme2reg/</directory> \r
296                                                  <includes>\r
297                                                  <include>**/*.txt</include>\r
298                         </includes>\r
299                     </resource>\r
300           </resources>\r
301         </configuration>\r
302       </execution>\r
303       <execution>\r
304         <id>copy-resources-2</id>\r
305         <phase>validate</phase>\r
306         <goals>\r
307           <goal>copy-resources</goal>\r
308         </goals>\r
309         <configuration>\r
310           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/etc</outputDirectory>\r
311           <resources>\r
312             <resource>\r
313                         <directory>${project.basedir}/src/main/resources/etc</directory>\r
314                         <includes>\r
315                             <include>**/**</include>\r
316                         </includes>\r
317                     </resource>\r
318           </resources>\r
319         </configuration>\r
320       </execution>\r
321           \r
322            <execution>\r
323         <id>copy-resources-3</id>\r
324         <phase>validate</phase>\r
325         <goals>\r
326           <goal>copy-resources</goal>\r
327         </goals>\r
328         <configuration>\r
329           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/lib</outputDirectory>\r
330           <resources>\r
331             <resource>\r
332                         <directory>${project.basedir}/../authz-cmd/target</directory>\r
333                         <includes>\r
334                             <include>**/*.jar</include>\r
335                         </includes>\r
336                     </resource>\r
337           </resources>\r
338         </configuration>\r
339       </execution>\r
340           <execution>\r
341         <id>copy-resources-4</id>\r
342         <phase>validate</phase>\r
343         <goals>\r
344           <goal>copy-resources</goal>\r
345         </goals>\r
346         <configuration>\r
347           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/</outputDirectory>\r
348           <resources>\r
349             <resource>\r
350                         <directory>${project.basedir}/../authz-cmd</directory>\r
351                         <includes>\r
352                             <include>**/aafcli.sh</include>\r
353                         </includes>\r
354                     </resource>\r
355           </resources>\r
356         </configuration>\r
357       </execution>\r
358                 <execution>\r
359         <id>copy-resources-5</id>\r
360         <phase>validate</phase>\r
361         <goals>\r
362           <goal>copy-resources</goal>\r
363         </goals>\r
364         <configuration>\r
365           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/etc/</outputDirectory>\r
366           <resources>\r
367             <resource>\r
368                         <directory>${project.basedir}/src/main/config</directory>\r
369                         <includes>\r
370                             <include>**/**</include>\r
371                         </includes>\r
372                     </resource>\r
373           </resources>\r
374         </configuration>\r
375       </execution>\r
376           <execution>\r
377         <id>copy-resources-6</id>\r
378         <phase>validate</phase>\r
379         <goals>\r
380           <goal>copy-resources</goal>\r
381         </goals>\r
382         <configuration>\r
383           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/etc/data</outputDirectory>\r
384           <resources>\r
385             <resource>\r
386                         <directory>${project.basedir}/../opt/app/aaf/data</directory>\r
387                         <includes>\r
388                             <include>**/**</include>\r
389                         </includes>\r
390                     </resource>\r
391           </resources>\r
392         </configuration>\r
393                 </execution>\r
394     </executions>\r
395   </plugin>\r
396                         <plugin>\r
397                                 <groupId>org.apache.maven.plugins</groupId>\r
398                                 <artifactId>maven-dependency-plugin</artifactId>\r
399                                 <version>2.10</version>\r
400                                 <executions>\r
401                                         <execution>\r
402                                                 <id>copy-dependencies</id>\r
403                                                 <phase>package</phase>\r
404                                                 <goals>\r
405                                                         <goal>copy-dependencies</goal>\r
406                                                 </goals>\r
407                                                 <configuration>\r
408                                                         <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/lib</outputDirectory>\r
409                                                         <overWriteReleases>false</overWriteReleases>\r
410                                                         <overWriteSnapshots>false</overWriteSnapshots>\r
411                                                         <overWriteIfNewer>true</overWriteIfNewer>\r
412                                                 </configuration>\r
413                                         </execution>\r
414                                 </executions>\r
415                         </plugin>\r
416                                 \r
417                     <plugin>\r
418                         <groupId>org.codehaus.mojo</groupId>\r
419                         <artifactId>exec-maven-plugin</artifactId>\r
420                         <version>1.5.0</version>\r
421                         <configuration>\r
422                             <executable>java</executable>\r
423                             <arguments>\r
424                                 <argument>-DAFT_LATITUDE=33</argument>\r
425                                 <argument>-DAFT_LONGITUDE=-84</argument>\r
426                                 <argument>-DAFT_ENVIRONMENT=AFTUAT</argument>\r
427         \r
428                                 <argument>-XX:NewRatio=3</argument>\r
429                                 <argument>-XX:+PrintGCTimeStamps</argument>\r
430                                 <argument>-XX:+PrintGCDetails</argument>\r
431                                 <argument>-Xloggc:gc.log</argument>\r
432                                 <argument>-classpath</argument>\r
433         \r
434                                 <classpath>\r
435                                 \r
436                                 </classpath>\r
437                                 <argument>org.onap.aaf.authz.service.AuthAPI</argument>\r
438         \r
439                            <argument>service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=Dev</argument>\r
440                             </arguments>\r
441                         </configuration>\r
442                     </plugin>\r
443         \r
444                     <plugin>\r
445                                 <groupId>org.apache.maven.plugins</groupId>\r
446                                 <artifactId>maven-jar-plugin</artifactId>\r
447                                         <configuration>\r
448                                                 <excludes>\r
449                                 <exclude>*.properties</exclude>\r
450                                 </excludes>\r
451                                         </configuration>\r
452                                         <version>2.3.1</version>\r
453                                 </plugin>\r
454  \r
455 \r
456                 <plugin>\r
457                         <groupId>org.apache.maven.plugins</groupId>\r
458                         <artifactId>maven-javadoc-plugin</artifactId>\r
459                         <version>2.10.4</version>\r
460                         <configuration>\r
461                         <failOnError>false</failOnError>\r
462                         </configuration>\r
463                         <executions>\r
464                                 <execution>\r
465                                         <id>attach-javadocs</id>\r
466                                         <goals>\r
467                                                 <goal>jar</goal>\r
468                                         </goals>\r
469                                 </execution>\r
470                         </executions>\r
471                 </plugin> \r
472            \r
473            \r
474                <plugin>\r
475                       <groupId>org.apache.maven.plugins</groupId>\r
476                       <artifactId>maven-source-plugin</artifactId>\r
477                       <version>2.2.1</version>\r
478                       <executions>\r
479                         <execution>\r
480                           <id>attach-sources</id>\r
481                           <goals>\r
482                             <goal>jar-no-fork</goal>\r
483                           </goals>\r
484                         </execution>\r
485                       </executions>\r
486                     </plugin>\r
487                         \r
488 <plugin>\r
489                                 <groupId>org.sonatype.plugins</groupId>\r
490                                 <artifactId>nexus-staging-maven-plugin</artifactId>\r
491                                 <version>1.6.7</version>\r
492                                 <extensions>true</extensions>\r
493                                 <configuration>\r
494                                         <nexusUrl>${nexusproxy}</nexusUrl>\r
495                                         <stagingProfileId>176c31dfe190a</stagingProfileId>\r
496                                         <serverId>ecomp-staging</serverId>\r
497                                 </configuration>\r
498                         </plugin>               \r
499                         <plugin>\r
500                                 <groupId>org.jacoco</groupId>\r
501                                 <artifactId>jacoco-maven-plugin</artifactId>\r
502                                 <version>0.7.7.201606060606</version>\r
503                                 <configuration>\r
504                                         <dumpOnExit>true</dumpOnExit>\r
505                                         <includes>\r
506                                                 <include>org.onap.aaf.*</include>\r
507                                         </includes>\r
508                                 </configuration>\r
509                                 <executions>\r
510                                         <execution>\r
511                                                 <id>pre-unit-test</id>\r
512                                                 <goals>\r
513                                                         <goal>prepare-agent</goal>\r
514                                                 </goals>\r
515                                                 <configuration>\r
516                                                         <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
517                                                         <!-- <append>true</append> -->\r
518                                                 </configuration>\r
519                                         </execution>\r
520                                         <execution>\r
521                                                 <id>pre-integration-test</id>\r
522                                                 <phase>pre-integration-test</phase>\r
523                                                 <goals>\r
524                                                         <goal>prepare-agent</goal>\r
525                                                 </goals>\r
526                                                 <configuration>\r
527                                                         <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>\r
528                                                         <!-- <append>true</append> -->\r
529                                                 </configuration>\r
530                                         </execution>\r
531                                         <execution>\r
532                         <goals>\r
533                             <goal>merge</goal>\r
534                         </goals>\r
535                         <phase>post-integration-test</phase>\r
536                         <configuration>\r
537                             <fileSets>\r
538                                 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">\r
539                                     <directory>${project.build.directory}/coverage-reports</directory>\r
540                                     <includes>\r
541                                         <include>*.exec</include>\r
542                                     </includes>\r
543                                 </fileSet>\r
544                             </fileSets>\r
545                             <destFile>${project.build.directory}/jacoco-dev.exec</destFile>\r
546                         </configuration>\r
547                     </execution>\r
548                                 </executions>\r
549                         </plugin>\r
550                 \r
551                         </plugins>\r
552 \r
553         </build>\r
554 \r
555 \r
556                 <distributionManagement>\r
557                 <repository>\r
558                         <id>ecomp-releases</id>\r
559                         <name>AAF Release Repository</name>\r
560                         <url>${nexusproxy}${releaseNexusPath}</url>\r
561                 </repository>\r
562                 <snapshotRepository>\r
563                         <id>ecomp-snapshots</id>\r
564                         <name>AAF Snapshot Repository</name>\r
565                         <url>${nexusproxy}${snapshotNexusPath}</url>\r
566                 </snapshotRepository>\r
567                 <site>\r
568                         <id>ecomp-site</id>\r
569                         <url>dav:${nexusproxy}${sitePath}</url>\r
570                 </site>\r
571         </distributionManagement>\r
572  <profiles>\r
573     <profile>\r
574       <id>docker</id>\r
575       <properties>\r
576         <skip.staging.artifacts>true</skip.staging.artifacts>\r
577         <skip.docker.build>false</skip.docker.build>\r
578         <skip.docker.tag>false</skip.docker.tag>\r
579         <skip.docker.push>false</skip.docker.push>\r
580       </properties>\r
581     </profile>\r
582   </profiles>\r
583 </project>\r