Release docker image of AAF to onap 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.0-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.test.failure.ignore>true</maven.test.failure.ignore>\r
55                 <project.swmVersion>1</project.swmVersion>\r
56                         <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
57             <dockerLocation>${basedir}/target/</dockerLocation>\r
58                 <docker.registry>nexus3.onap.org</docker.registry>\r
59                 <distFilesRootDirPath>opt/app/aaf/${project.artifactId}/${project.version}</distFilesRootDirPath>\r
60                         <sonar.language>java</sonar.language>\r
61                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
62                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
63                 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
64                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
65                 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
66                 <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
67         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
68                 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
69                 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
70                 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>\r
71                 <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>\r
72         </properties>\r
73         \r
74                 \r
75         <dependencies>\r
76         <dependency>\r
77             <groupId>org.onap.aaf.authz</groupId>\r
78             <artifactId>authz-client</artifactId>\r
79                         <version>${project.version}</version>\r
80         </dependency>\r
81                 \r
82                 <dependency>\r
83             <groupId>org.onap.aaf.authz</groupId>\r
84             <artifactId>authz-cmd</artifactId>\r
85                         <version>${project.version}</version>\r
86         </dependency>           \r
87         <dependency>\r
88             <groupId>org.onap.aaf.authz</groupId>\r
89             <artifactId>authz-core</artifactId>\r
90                         <version>${project.version}</version>\r
91             <exclusions>\r
92                           <exclusion> \r
93                                         <groupId>javax.servlet</groupId>\r
94                         <artifactId>servlet-api</artifactId>\r
95                    </exclusion>\r
96                     </exclusions> \r
97         </dependency>\r
98         \r
99         <dependency>\r
100             <groupId>org.onap.aaf.authz</groupId>\r
101             <artifactId>authz-cass</artifactId>\r
102                         <version>${project.version}</version>\r
103         </dependency>\r
104 \r
105         <dependency>\r
106             <groupId>org.onap.aaf.authz</groupId>\r
107             <artifactId>authz-defOrg</artifactId>\r
108             <version>${project.version}</version>\r
109         </dependency>\r
110 \r
111 \r
112         \r
113         <dependency > \r
114                         <groupId>org.onap.aaf.inno</groupId>\r
115                         <artifactId>env</artifactId>\r
116                         <version>${project.version}</version>\r
117                 </dependency>\r
118 \r
119 \r
120                 <dependency>\r
121                         <groupId>org.onap.aaf.cadi</groupId>\r
122                         <artifactId>cadi-core</artifactId>\r
123                         <version>${project.version}</version>\r
124                 </dependency>\r
125 \r
126                 <dependency>\r
127                         <groupId>com.att.aft</groupId>\r
128                         <artifactId>dme2</artifactId>\r
129                 </dependency>\r
130 \r
131                 <dependency>\r
132                         <groupId>org.onap.aaf.inno</groupId>\r
133                         <artifactId>rosetta</artifactId>\r
134                         <version>${project.version}</version>\r
135                 </dependency>\r
136                 <dependency>\r
137                         <groupId>org.onap.aaf.cadi</groupId>\r
138                         <artifactId>cadi-aaf</artifactId>\r
139                         <version>${project.version}</version>\r
140                 </dependency>   \r
141         </dependencies>\r
142         \r
143         <build>\r
144             <plugins>\r
145                 <plugin>\r
146                 <groupId>org.apache.maven.plugins</groupId>\r
147                 <artifactId>maven-resources-plugin</artifactId>\r
148                 <version>2.7</version>\r
149                 <executions>\r
150                     <execution>\r
151                         <id>copy-docker-file</id>\r
152                         <phase>package</phase>\r
153                         <goals>\r
154                             <goal>copy-resources</goal>\r
155                         </goals>\r
156                         <configuration>\r
157                             <outputDirectory>${dockerLocation}</outputDirectory>\r
158                             <overwrite>true</overwrite>\r
159                             <resources>\r
160                                 <resource>\r
161                                     <directory>${basedir}/src/main/resources/docker</directory>\r
162                                     <filtering>true</filtering>\r
163                                     <includes>\r
164                                         <include>**/*</include>\r
165                                     </includes>\r
166                                 </resource>\r
167                             </resources>\r
168                         </configuration>\r
169                     </execution>\r
170                 </executions>\r
171             </plugin>\r
172                         <plugin>\r
173                 <groupId>com.spotify</groupId>\r
174                 <artifactId>docker-maven-plugin</artifactId>\r
175                 <version>0.4.11</version>\r
176                 <configuration>\r
177                     <imageName>onap/aaf/authz-service</imageName>\r
178                     <dockerDirectory>${dockerLocation}</dockerDirectory>\r
179                     <serverId>docker-hub</serverId>\r
180                      <registryUrl>https://${docker.registry}</registryUrl>\r
181                     <imageTags>\r
182                         <imageTag>${project.version}</imageTag>\r
183                         <imageTag>latest</imageTag>\r
184                     </imageTags>\r
185                                              <resources>\r
186                                 <resource>\r
187                                                                 <targetPath>/</targetPath>\r
188                                     <directory>/${basedir}/target/opt</directory>\r
189                                     <filtering>true</filtering>\r
190                                     <includes>\r
191                                         <include>**/*</include>\r
192                                     </includes>\r
193                                 </resource>\r
194                             </resources>\r
195                     <forceTags>true</forceTags>\r
196                 </configuration>\r
197             </plugin>\r
198                         <plugin>\r
199     <artifactId>maven-resources-plugin</artifactId>\r
200     <version>2.7</version>\r
201     <executions>\r
202       <execution>\r
203         <id>copy-resources-1</id>\r
204         <phase>validate</phase>\r
205         <goals>\r
206           <goal>copy-resources</goal>\r
207         </goals>\r
208         <configuration>\r
209          <outputDirectory>${project.build.directory}/opt/dme2reg/</outputDirectory>\r
210           <resources>\r
211             <resource>\r
212                         <directory>${project.basedir}/src/main/resources/dme2reg/</directory> \r
213                                                  <includes>\r
214                                                  <include>**/*.txt</include>\r
215                         </includes>\r
216                     </resource>\r
217           </resources>\r
218         </configuration>\r
219       </execution>\r
220       <execution>\r
221         <id>copy-resources-2</id>\r
222         <phase>validate</phase>\r
223         <goals>\r
224           <goal>copy-resources</goal>\r
225         </goals>\r
226         <configuration>\r
227           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/etc</outputDirectory>\r
228           <resources>\r
229             <resource>\r
230                         <directory>${project.basedir}/src/main/resources/etc</directory>\r
231                         <includes>\r
232                             <include>**/**</include>\r
233                         </includes>\r
234                     </resource>\r
235           </resources>\r
236         </configuration>\r
237       </execution>\r
238           \r
239            <execution>\r
240         <id>copy-resources-3</id>\r
241         <phase>validate</phase>\r
242         <goals>\r
243           <goal>copy-resources</goal>\r
244         </goals>\r
245         <configuration>\r
246           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/lib</outputDirectory>\r
247           <resources>\r
248             <resource>\r
249                         <directory>${project.basedir}/../authz-cmd/target</directory>\r
250                         <includes>\r
251                             <include>**/authz-cmd-1.0.0-SNAPSHOT-jar-with-dependencies.jar</include>\r
252                         </includes>\r
253                     </resource>\r
254           </resources>\r
255         </configuration>\r
256       </execution>\r
257           <execution>\r
258         <id>copy-resources-4</id>\r
259         <phase>validate</phase>\r
260         <goals>\r
261           <goal>copy-resources</goal>\r
262         </goals>\r
263         <configuration>\r
264           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}</outputDirectory>\r
265           <resources>\r
266             <resource>\r
267                         <directory>${project.basedir}/../authz-cmd</directory>\r
268                         <includes>\r
269                             <include>**/aafcli.sh</include>\r
270                         </includes>\r
271                     </resource>\r
272           </resources>\r
273         </configuration>\r
274       </execution>\r
275            <execution>\r
276         <id>copy-resources-5</id>\r
277         <phase>validate</phase>\r
278         <goals>\r
279           <goal>copy-resources</goal>\r
280         </goals>\r
281         <configuration>\r
282           <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/etc</outputDirectory>\r
283           <resources>\r
284             <resource>\r
285                         <directory>${project.basedir}/../authz-cmd/etc</directory>\r
286                         <includes>\r
287                             <include>**/**</include>\r
288                         </includes>\r
289                     </resource>\r
290           </resources>\r
291         </configuration>\r
292       </execution>\r
293     </executions>\r
294   </plugin>\r
295                         <plugin>\r
296                                 <groupId>org.apache.maven.plugins</groupId>\r
297                                 <artifactId>maven-dependency-plugin</artifactId>\r
298                                 <version>2.10</version>\r
299                                 <executions>\r
300                                         <execution>\r
301                                                 <id>copy-dependencies</id>\r
302                                                 <phase>package</phase>\r
303                                                 <goals>\r
304                                                         <goal>copy-dependencies</goal>\r
305                                                 </goals>\r
306                                                 <configuration>\r
307                                                         <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/lib</outputDirectory>\r
308                                                         <overWriteReleases>false</overWriteReleases>\r
309                                                         <overWriteSnapshots>false</overWriteSnapshots>\r
310                                                         <overWriteIfNewer>true</overWriteIfNewer>\r
311                                                 </configuration>\r
312                                         </execution>\r
313                                 </executions>\r
314                         </plugin>\r
315                                 \r
316                     <plugin>\r
317                         <groupId>org.codehaus.mojo</groupId>\r
318                         <artifactId>exec-maven-plugin</artifactId>\r
319                         <version>1.5.0</version>\r
320                         <configuration>\r
321                             <executable>java</executable>\r
322                             <arguments>\r
323                                 <argument>-DAFT_LATITUDE=33</argument>\r
324                                 <argument>-DAFT_LONGITUDE=-84</argument>\r
325                                 <argument>-DAFT_ENVIRONMENT=AFTUAT</argument>\r
326         \r
327                                 <argument>-XX:NewRatio=3</argument>\r
328                                 <argument>-XX:+PrintGCTimeStamps</argument>\r
329                                 <argument>-XX:+PrintGCDetails</argument>\r
330                                 <argument>-Xloggc:gc.log</argument>\r
331                                 <argument>-classpath</argument>\r
332         \r
333                                 <classpath>\r
334                                 \r
335                                 </classpath>\r
336                                 <argument>org.onap.aaf.authz.service.AuthAPI</argument>\r
337         \r
338                            <argument>service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=Dev</argument>\r
339                             </arguments>\r
340                         </configuration>\r
341                     </plugin>\r
342         \r
343                     <plugin>\r
344                                 <groupId>org.apache.maven.plugins</groupId>\r
345                                 <artifactId>maven-jar-plugin</artifactId>\r
346                                         <configuration>\r
347                                                 <excludes>\r
348                                 <exclude>*.properties</exclude>\r
349                                 </excludes>\r
350                                         </configuration>\r
351                                         <version>2.3.1</version>\r
352                                 </plugin>\r
353 \r
354                                 <plugin>\r
355                                         <groupId>org.apache.maven.plugins</groupId>\r
356                                         <artifactId>maven-deploy-plugin</artifactId>\r
357                                         <configuration>\r
358                                                 <skip>true</skip>\r
359                                         </configuration>\r
360                             </plugin>  \r
361 \r
362                 <plugin>\r
363                         <groupId>org.apache.maven.plugins</groupId>\r
364                         <artifactId>maven-javadoc-plugin</artifactId>\r
365                         <configuration>\r
366                         <failOnError>false</failOnError>\r
367                         </configuration>\r
368                         <executions>\r
369                                 <execution>\r
370                                         <id>attach-javadocs</id>\r
371                                         <goals>\r
372                                                 <goal>jar</goal>\r
373                                         </goals>\r
374                                 </execution>\r
375                         </executions>\r
376                 </plugin> \r
377            \r
378            \r
379                <plugin>\r
380                       <groupId>org.apache.maven.plugins</groupId>\r
381                       <artifactId>maven-source-plugin</artifactId>\r
382                       <version>2.2.1</version>\r
383                       <executions>\r
384                         <execution>\r
385                           <id>attach-sources</id>\r
386                           <goals>\r
387                             <goal>jar-no-fork</goal>\r
388                           </goals>\r
389                         </execution>\r
390                       </executions>\r
391                     </plugin>\r
392                         \r
393 <plugin>\r
394                                 <groupId>org.sonatype.plugins</groupId>\r
395                                 <artifactId>nexus-staging-maven-plugin</artifactId>\r
396                                 <version>1.6.7</version>\r
397                                 <extensions>true</extensions>\r
398                                 <configuration>\r
399                                         <nexusUrl>${nexusproxy}</nexusUrl>\r
400                                         <stagingProfileId>176c31dfe190a</stagingProfileId>\r
401                                         <serverId>ecomp-staging</serverId>\r
402                                 </configuration>\r
403                         </plugin>               \r
404                         <plugin>\r
405                                 <groupId>org.jacoco</groupId>\r
406                                 <artifactId>jacoco-maven-plugin</artifactId>\r
407                                 <version>0.7.7.201606060606</version>\r
408                                 <configuration>\r
409                                         <dumpOnExit>true</dumpOnExit>\r
410                                         <includes>\r
411                                                 <include>org.onap.aaf.*</include>\r
412                                         </includes>\r
413                                 </configuration>\r
414                                 <executions>\r
415                                         <execution>\r
416                                                 <id>pre-unit-test</id>\r
417                                                 <goals>\r
418                                                         <goal>prepare-agent</goal>\r
419                                                 </goals>\r
420                                                 <configuration>\r
421                                                         <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>\r
422                                                         <!-- <append>true</append> -->\r
423                                                 </configuration>\r
424                                         </execution>\r
425                                         <execution>\r
426                                                 <id>pre-integration-test</id>\r
427                                                 <phase>pre-integration-test</phase>\r
428                                                 <goals>\r
429                                                         <goal>prepare-agent</goal>\r
430                                                 </goals>\r
431                                                 <configuration>\r
432                                                         <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>\r
433                                                         <!-- <append>true</append> -->\r
434                                                 </configuration>\r
435                                         </execution>\r
436                                         <execution>\r
437                         <goals>\r
438                             <goal>merge</goal>\r
439                         </goals>\r
440                         <phase>post-integration-test</phase>\r
441                         <configuration>\r
442                             <fileSets>\r
443                                 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">\r
444                                     <directory>${project.build.directory}/coverage-reports</directory>\r
445                                     <includes>\r
446                                         <include>*.exec</include>\r
447                                     </includes>\r
448                                 </fileSet>\r
449                             </fileSets>\r
450                             <destFile>${project.build.directory}/jacoco-dev.exec</destFile>\r
451                         </configuration>\r
452                     </execution>\r
453                                 </executions>\r
454                         </plugin>\r
455                 \r
456                         </plugins>\r
457 \r
458         </build>\r
459 \r
460                 <distributionManagement>\r
461                 <repository>\r
462                         <id>ecomp-releases</id>\r
463                         <name>AAF Release Repository</name>\r
464                         <url>${nexusproxy}${releaseNexusPath}</url>\r
465                 </repository>\r
466                 <snapshotRepository>\r
467                         <id>ecomp-snapshots</id>\r
468                         <name>AAF Snapshot Repository</name>\r
469                         <url>${nexusproxy}${snapshotNexusPath}</url>\r
470                 </snapshotRepository>\r
471                 <site>\r
472                         <id>ecomp-site</id>\r
473                         <url>dav:${nexusproxy}${sitePath}</url>\r
474                 </site>\r
475         </distributionManagement>\r
476 <pluginRepositories>\r
477         <pluginRepository>\r
478             <id>onap-plugin-snapshots</id>\r
479             <url>https://nexus.onap.org/content/repositories/snapshots/</url>\r
480         </pluginRepository>\r
481     </pluginRepositories>\r
482         \r
483         <repositories>\r
484                 <repository>\r
485                         <id>central</id>\r
486                         <name>Maven 2 repository 2</name>\r
487                         <url>http://repo2.maven.org/maven2/</url>\r
488                 </repository>\r
489                 <repository>\r
490             <id>onap-jar-snapshots</id>\r
491             <url>https://nexus.onap.org/content/repositories/snapshots</url>\r
492         </repository>\r
493                 <repository>\r
494                         <id>spring-repo</id>\r
495                         <name>Spring repo</name>\r
496                         <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>\r
497                 </repository>\r
498                 <repository>\r
499                         <id>repository.jboss.org-public</id>\r
500                         <name>JBoss.org Maven repository</name>\r
501                         <url>https://repository.jboss.org/nexus/content/groups/public</url>\r
502                 </repository>\r
503         </repositories>\r
504 </project>\r