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>src/main/resources/docker</dockerDirectory>\r
159           <serverId>docker-hub</serverId>\r
160           <imageTags>\r
161             <imageTag>latest</imageTag>\r
162             <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>\r
163             <imageTag>${project.docker.latesttag.version}</imageTag>\r
164           </imageTags>\r
165           <forceTags>true</forceTags>\r
166                   <resources>\r
167             <resource>\r
168                             <targetPath>/</targetPath>\r
169                     <directory>${project.build.directory}/opt</directory>\r
170                     <filtering>true</filtering>\r
171                      <includes>\r
172                         <include>**/*</include>\r
173                             </includes>\r
174             </resource>\r
175          </resources>  \r
176                  \r
177                  </configuration>\r
178         <executions>\r
179           <execution>\r
180             <id>build-image</id>\r
181             <phase>package</phase>\r
182             <goals>\r
183               <goal>build</goal>\r
184             </goals>\r
185             <configuration>\r
186               <skipDockerBuild>${skip.docker.build}</skipDockerBuild>\r
187             </configuration>\r
188           </execution>\r
189 \r
190           <execution>\r
191             <id>tag-image-latest-timestamp</id>\r
192             <phase>package</phase>\r
193             <goals>\r
194               <goal>tag</goal>\r
195             </goals>\r
196             <configuration>\r
197               <image>onap/aaf/authz-service</image>\r
198               <newName>onap/aaf/authz-service:${project.docker.latesttagtimestamp.version}</newName>\r
199               <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
200             </configuration>\r
201           </execution>\r
202           <execution>\r
203             <id>push-image-latest-timestamp</id>\r
204             <phase>deploy</phase>\r
205             <goals>\r
206               <goal>push</goal>\r
207             </goals>\r
208             <configuration>\r
209               <imageName>onap/aaf/authz-service:${project.docker.latesttagtimestamp.version}</imageName>\r
210               <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
211             </configuration>\r
212           </execution>\r
213           <execution>\r
214             <id>tag-image-latest</id>\r
215             <phase>package</phase>\r
216             <goals>\r
217               <goal>tag</goal>\r
218             </goals>\r
219             <configuration>\r
220               <image>onap/aaf/authz-service</image>\r
221               <newName>onap/aaf/authz-service:${project.docker.latesttag.version}</newName>\r
222               <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
223             </configuration>\r
224           </execution>\r
225           <execution>\r
226             <id>push-image-latest</id>\r
227             <phase>deploy</phase>\r
228             <goals>\r
229               <goal>push</goal>\r
230             </goals>\r
231             <configuration>\r
232               <imageName>onap/aaf/authz-service:${project.docker.latesttag.version}</imageName>\r
233               <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
234             </configuration>\r
235           </execution>\r
236           <execution>\r
237             <id>tag-image</id>\r
238             <phase>package</phase>\r
239             <goals>\r
240               <goal>tag</goal>\r
241             </goals>\r
242             <configuration>\r
243               <image>onap/aaf/authz-service</image>\r
244               <newName>onap/aaf/authz-service:latest</newName>\r
245               <skipDockerTag>${skip.docker.push}</skipDockerTag>\r
246             </configuration>\r
247           </execution>\r
248           <execution>\r
249             <id>push-image</id>\r
250             <phase>deploy</phase>\r
251             <goals>\r
252               <goal>push</goal>\r
253             </goals>\r
254             <configuration>\r
255               <imageName>onap/aaf/authz-service:latest</imageName>\r
256               <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
257             </configuration>\r
258           </execution>\r
259         </executions>\r
260       </plugin>\r
261 \r
262  <plugin>\r
263                 <artifactId>maven-resources-plugin</artifactId>\r
264                 <version>2.7</version>\r
265               <executions>\r
266                     <execution>\r
267                         <id>copy-docker-file</id>\r
268                         <phase>package</phase>\r
269                         <goals>\r
270                             <goal>copy-resources</goal>\r
271                         </goals>\r
272                         <configuration>\r
273                             <outputDirectory>${dockerLocation}</outputDirectory>\r
274                             <overwrite>true</overwrite>\r
275                             <resources>\r
276                                 <resource>\r
277                                     <directory>${basedir}/src/main/resources/docker</directory>\r
278                                     <filtering>true</filtering>\r
279                                     <includes>\r
280                                         <include>**/*</include>\r
281                                     </includes>\r
282                                 </resource>\r
283                             </resources>\r
284                         </configuration>\r
285                     </execution>  \r
286       <execution>\r
287         <id>copy-resources-1</id>\r
288         <phase>validate</phase>\r
289         <goals>\r
290           <goal>copy-resources</goal>\r
291         </goals>\r
292         <configuration>\r
293          <outputDirectory>${project.build.directory}/opt/dme2reg/</outputDirectory>\r
294           <resources>\r
295             <resource>\r
296                         <directory>${project.basedir}/src/main/resources/dme2reg/</directory> \r
297                                                  <includes>\r
298                                                  <include>**/*.txt</include>\r
299                         </includes>\r
300                     </resource>\r
301           </resources>\r
302         </configuration>\r
303       </execution>\r
304       <execution>\r
305         <id>copy-resources-2</id>\r
306         <phase>validate</phase>\r
307         <goals>\r
308           <goal>copy-resources</goal>\r
309         </goals>\r
310         <configuration>\r
311           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/etc</outputDirectory>\r
312           <resources>\r
313             <resource>\r
314                         <directory>${project.basedir}/src/main/resources/etc</directory>\r
315                         <includes>\r
316                             <include>**/**</include>\r
317                         </includes>\r
318                     </resource>\r
319           </resources>\r
320         </configuration>\r
321       </execution>\r
322           \r
323            <execution>\r
324         <id>copy-resources-3</id>\r
325         <phase>validate</phase>\r
326         <goals>\r
327           <goal>copy-resources</goal>\r
328         </goals>\r
329         <configuration>\r
330           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/lib</outputDirectory>\r
331           <resources>\r
332             <resource>\r
333                         <directory>${project.basedir}/../authz-cmd/target</directory>\r
334                         <includes>\r
335                             <include>**/*.jar</include>\r
336                         </includes>\r
337                     </resource>\r
338           </resources>\r
339         </configuration>\r
340       </execution>\r
341           <execution>\r
342         <id>copy-resources-4</id>\r
343         <phase>validate</phase>\r
344         <goals>\r
345           <goal>copy-resources</goal>\r
346         </goals>\r
347         <configuration>\r
348           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/</outputDirectory>\r
349           <resources>\r
350             <resource>\r
351                         <directory>${project.basedir}/../authz-cmd</directory>\r
352                         <includes>\r
353                             <include>**/aafcli.sh</include>\r
354                         </includes>\r
355                     </resource>\r
356           </resources>\r
357         </configuration>\r
358       </execution>\r
359                 <execution>\r
360         <id>copy-resources-5</id>\r
361         <phase>validate</phase>\r
362         <goals>\r
363           <goal>copy-resources</goal>\r
364         </goals>\r
365         <configuration>\r
366           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/etc/</outputDirectory>\r
367           <resources>\r
368             <resource>\r
369                         <directory>${project.basedir}/src/main/config</directory>\r
370                         <includes>\r
371                             <include>**/**</include>\r
372                         </includes>\r
373                     </resource>\r
374           </resources>\r
375         </configuration>\r
376       </execution>\r
377           <execution>\r
378         <id>copy-resources-6</id>\r
379         <phase>validate</phase>\r
380         <goals>\r
381           <goal>copy-resources</goal>\r
382         </goals>\r
383         <configuration>\r
384           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/etc/data</outputDirectory>\r
385           <resources>\r
386             <resource>\r
387                         <directory>${project.basedir}/../opt/app/aaf/data</directory>\r
388                         <includes>\r
389                             <include>**/**</include>\r
390                         </includes>\r
391                     </resource>\r
392           </resources>\r
393         </configuration>\r
394                 </execution>\r
395     </executions>\r
396   </plugin>\r
397                         <plugin>\r
398                                 <groupId>org.apache.maven.plugins</groupId>\r
399                                 <artifactId>maven-dependency-plugin</artifactId>\r
400                                 <version>2.10</version>\r
401                                 <executions>\r
402                                         <execution>\r
403                                                 <id>copy-dependencies</id>\r
404                                                 <phase>package</phase>\r
405                                                 <goals>\r
406                                                         <goal>copy-dependencies</goal>\r
407                                                 </goals>\r
408                                                 <configuration>\r
409                                                         <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/lib</outputDirectory>\r
410                                                         <overWriteReleases>false</overWriteReleases>\r
411                                                         <overWriteSnapshots>false</overWriteSnapshots>\r
412                                                         <overWriteIfNewer>true</overWriteIfNewer>\r
413                                                 </configuration>\r
414                                         </execution>\r
415                                 </executions>\r
416                         </plugin>\r
417                                 \r
418                     <plugin>\r
419                         <groupId>org.codehaus.mojo</groupId>\r
420                         <artifactId>exec-maven-plugin</artifactId>\r
421                         <version>1.5.0</version>\r
422                         <configuration>\r
423                             <executable>java</executable>\r
424                             <arguments>\r
425                                 <argument>-DAFT_LATITUDE=33</argument>\r
426                                 <argument>-DAFT_LONGITUDE=-84</argument>\r
427                                 <argument>-DAFT_ENVIRONMENT=AFTUAT</argument>\r
428         \r
429                                 <argument>-XX:NewRatio=3</argument>\r
430                                 <argument>-XX:+PrintGCTimeStamps</argument>\r
431                                 <argument>-XX:+PrintGCDetails</argument>\r
432                                 <argument>-Xloggc:gc.log</argument>\r
433                                 <argument>-classpath</argument>\r
434         \r
435                                 <classpath>\r
436                                 \r
437                                 </classpath>\r
438                                 <argument>org.onap.aaf.authz.service.AuthAPI</argument>\r
439         \r
440                            <argument>service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=Dev</argument>\r
441                             </arguments>\r
442                         </configuration>\r
443                     </plugin>\r
444         \r
445                     <plugin>\r
446                                 <groupId>org.apache.maven.plugins</groupId>\r
447                                 <artifactId>maven-jar-plugin</artifactId>\r
448                                         <configuration>\r
449                                                 <excludes>\r
450                                 <exclude>*.properties</exclude>\r
451                                 </excludes>\r
452                                         </configuration>\r
453                                         <version>2.3.1</version>\r
454                                 </plugin>\r
455  \r
456 \r
457                 <plugin>\r
458                         <groupId>org.apache.maven.plugins</groupId>\r
459                         <artifactId>maven-javadoc-plugin</artifactId>\r
460                         <version>2.10.4</version>\r
461                         <configuration>\r
462                         <failOnError>false</failOnError>\r
463                         </configuration>\r
464                         <executions>\r
465                                 <execution>\r
466                                         <id>attach-javadocs</id>\r
467                                         <goals>\r
468                                                 <goal>jar</goal>\r
469                                         </goals>\r
470                                 </execution>\r
471                         </executions>\r
472                 </plugin> \r
473            \r
474            \r
475                <plugin>\r
476                       <groupId>org.apache.maven.plugins</groupId>\r
477                       <artifactId>maven-source-plugin</artifactId>\r
478                       <version>2.2.1</version>\r
479                       <executions>\r
480                         <execution>\r
481                           <id>attach-sources</id>\r
482                           <goals>\r
483                             <goal>jar-no-fork</goal>\r
484                           </goals>\r
485                         </execution>\r
486                       </executions>\r
487                     </plugin>\r
488                         \r
489 <plugin>\r
490                                 <groupId>org.sonatype.plugins</groupId>\r
491                                 <artifactId>nexus-staging-maven-plugin</artifactId>\r
492                                 <version>1.6.7</version>\r
493                                 <extensions>true</extensions>\r
494                                 <configuration>\r
495                                         <nexusUrl>${nexusproxy}</nexusUrl>\r
496                                         <stagingProfileId>176c31dfe190a</stagingProfileId>\r
497                                         <serverId>ecomp-staging</serverId>\r
498                                 </configuration>\r
499                         </plugin>               \r
500                         <plugin>\r
501                                 <groupId>org.jacoco</groupId>\r
502                                 <artifactId>jacoco-maven-plugin</artifactId>\r
503                                 <version>0.7.7.201606060606</version>\r
504                                 <configuration>\r
505                                         <dumpOnExit>true</dumpOnExit>\r
506                                         <includes>\r
507                                                 <include>org.onap.aaf.*</include>\r
508                                         </includes>\r
509                                 </configuration>\r
510                                 <executions>\r
511                                         <execution>\r
512                                                 <id>pre-unit-test</id>\r
513                                                 <goals>\r
514                                                         <goal>prepare-agent</goal>\r
515                                                 </goals>\r
516                                                 <configuration>\r
517                                                         <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
518                                                         <!-- <append>true</append> -->\r
519                                                 </configuration>\r
520                                         </execution>\r
521                                         <execution>\r
522                                                 <id>pre-integration-test</id>\r
523                                                 <phase>pre-integration-test</phase>\r
524                                                 <goals>\r
525                                                         <goal>prepare-agent</goal>\r
526                                                 </goals>\r
527                                                 <configuration>\r
528                                                         <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>\r
529                                                         <!-- <append>true</append> -->\r
530                                                 </configuration>\r
531                                         </execution>\r
532                                         <execution>\r
533                         <goals>\r
534                             <goal>merge</goal>\r
535                         </goals>\r
536                         <phase>post-integration-test</phase>\r
537                         <configuration>\r
538                             <fileSets>\r
539                                 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">\r
540                                     <directory>${project.build.directory}/coverage-reports</directory>\r
541                                     <includes>\r
542                                         <include>*.exec</include>\r
543                                     </includes>\r
544                                 </fileSet>\r
545                             </fileSets>\r
546                             <destFile>${project.build.directory}/jacoco-dev.exec</destFile>\r
547                         </configuration>\r
548                     </execution>\r
549                                 </executions>\r
550                         </plugin>\r
551                 \r
552                         </plugins>\r
553 \r
554         </build>\r
555 \r
556 \r
557                 <distributionManagement>\r
558                 <repository>\r
559                         <id>ecomp-releases</id>\r
560                         <name>AAF Release Repository</name>\r
561                         <url>${nexusproxy}${releaseNexusPath}</url>\r
562                 </repository>\r
563                 <snapshotRepository>\r
564                         <id>ecomp-snapshots</id>\r
565                         <name>AAF Snapshot Repository</name>\r
566                         <url>${nexusproxy}${snapshotNexusPath}</url>\r
567                 </snapshotRepository>\r
568                 <site>\r
569                         <id>ecomp-site</id>\r
570                         <url>dav:${nexusproxy}${sitePath}</url>\r
571                 </site>\r
572         </distributionManagement>\r
573  <profiles>\r
574     <profile>\r
575       <id>docker</id>\r
576       <properties>\r
577         <skip.staging.artifacts>true</skip.staging.artifacts>\r
578         <skip.docker.build>false</skip.docker.build>\r
579         <skip.docker.tag>false</skip.docker.tag>\r
580         <skip.docker.push>false</skip.docker.push>\r
581       </properties>\r
582     </profile>\r
583   </profiles>\r
584 </project>\r