fd5410ddad0da7270bcaebb35fa6328479da9366
[clamp.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4   ONAP CLAMP
5   ================================================================================
6   Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
7                               reserved.
8   ================================================================================
9   Licensed under the Apache License, Version 2.0 (the "License");
10   you may not use this file except in compliance with the License.
11   You may obtain a copy of the License at
12
13   http://www.apache.org/licenses/LICENSE-2.0
14
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
20   ============LICENSE_END============================================
21   ===================================================================
22 -->
23
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25                 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26                 <modelVersion>4.0.0</modelVersion>
27                 <groupId>org.onap.clamp</groupId>
28                 <artifactId>clds</artifactId>
29                 <version>2.0.1-SNAPSHOT</version>
30                 <name>clamp</name>
31
32                 <parent>
33                                 <groupId>org.onap.oparent</groupId>
34                                 <artifactId>oparent</artifactId>
35                                 <version>1.1.0</version>
36                 </parent>
37
38                 <description>
39            This project build the ONAP CLAMP JAR that contains CLAMP back-end code and its UI part.
40
41            By Default "mvn clean install" command will execute also the unit tests
42            and the integration tests. The integration tests require a docker engine running.
43
44            If you want to skip the integration test you can by doing:
45            "mvn clean install -DskipITs=true"
46
47            For Spring it's possible to specify the application.properties location
48            "mvn clean install -Dspring.config.location=classpath:application-test.properties"
49
50            The application.properties contains the location of the CLAMP parameters files:
51                                 - org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
52                                 - org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
53
54                 </description>
55
56                 <properties>
57                                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
58                                 <clamp.project.version>${project.version}</clamp.project.version>
59                                 <clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
60                                 <maven.compiler.source>1.8</maven.compiler.source>
61                                 <maven.compiler.target>1.8</maven.compiler.target>
62                                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
63                                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
64
65                                 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
66                                 <docker.http-cache.port.host>8085</docker.http-cache.port.host>
67                                 <project.scm.id>git-server</project.scm.id>
68                                 <java.version>1.8</java.version>
69
70                                 <swagger.jaxrs2.version>2.0.0-rc4</swagger.jaxrs2.version>
71                                 <guava.version>20.0</guava.version>
72                                 <eelf.core.version>1.0.0</eelf.core.version>
73                                 <camel.version>2.20.1</camel.version>
74                                 <springboot.version>1.5.12.RELEASE</springboot.version>
75
76                                 <sonar.language>java</sonar.language>
77                                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
78                                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
79                                 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
80                                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
81                                 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
82                                 <sonar.projectVersion>${project.version}</sonar.projectVersion>
83
84                                 <docker.push.registry>localhost:5000</docker.push.registry>
85                                 <skip.docker.build>true</skip.docker.build>
86                                 <skip.docker.push>true</skip.docker.push>
87                                 <skip.staging.artifacts>false</skip.staging.artifacts>
88                                 <python.http.proxy.param></python.http.proxy.param>
89                 </properties>
90
91                 <distributionManagement>
92                                 <repository>
93                                                 <id>ecomp-releases</id>
94                                                 <name>Clamp Release Repository</name>
95                                                 <url>https://nexus.onap.org/content/repositories/releases/</url>
96                                 </repository>
97                                 <snapshotRepository>
98                                                 <id>ecomp-snapshots</id>
99                                                 <name>Clamp Snapshot Repository</name>
100                                                 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
101                                 </snapshotRepository>
102                                 <site>
103                                                 <id>ecomp-site</id>
104                                                 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
105                                 </site>
106                 </distributionManagement>
107
108                 <repositories>
109                                 <repository>
110                                                 <id>central</id>
111                                                 <name>Maven 2 repository 2</name>
112                                                 <url>http://repo2.maven.org/maven2/</url>
113                                 </repository>
114                                 <repository>
115                                                 <id>ecomp-releases</id>
116                                                 <name>ONAP Release Repository</name>
117                                                 <url>https://nexus.onap.org/content/repositories/releases/</url>
118                                 </repository>
119                                 <repository>
120                                                 <id>ecomp-staging</id>
121                                                 <name>ONAP Staging Repository</name>
122                                                 <url>https://nexus.onap.org/content/repositories/staging/</url>
123                                 </repository>
124                                 <repository>
125                                                 <id>ecomp-snapshots</id>
126                                                 <name>ONAP Snapshot Repository</name>
127                                                 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
128                                                 <snapshots>
129                                                                 <enabled>true</enabled>
130                                                 </snapshots>
131                                                 <releases>
132                                                                 <enabled>false</enabled>
133                                                 </releases>
134                                 </repository>
135                                 <repository>
136                                                 <id>spring-repo</id>
137                                                 <name>Spring repo</name>
138                                                 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
139                                 </repository>
140                                 <repository>
141                                                 <id>repository.jboss.org-public</id>
142                                                 <name>JBoss.org Maven repository</name>
143                                                 <url>https://repository.jboss.org/nexus/content/groups/public</url>
144                                 </repository>
145                                 <repository>
146                                         <id>jcentral</id>
147                                         <name>bintray</name>
148                                         <url>http://jcenter.bintray.com</url>
149                                         <snapshots>
150                                         <enabled>false</enabled>
151                                         </snapshots>
152                                 </repository>
153                 </repositories>
154
155                 <dependencyManagement>
156                                 <dependencies>
157                                                 <!-- Spring Boot BOM -->
158                                                 <dependency>
159                                                                 <groupId>org.springframework.boot</groupId>
160                                                                 <artifactId>spring-boot-dependencies</artifactId>
161                                                                 <version>${springboot.version}</version>
162                                                                 <type>pom</type>
163                                                                 <scope>import</scope>
164                                                 </dependency>
165                                                 <!-- Camel BOM -->
166                                                 <dependency>
167                                                                 <groupId>org.apache.camel</groupId>
168                                                                 <artifactId>camel-spring-boot-dependencies</artifactId>
169                                                                 <version>${camel.version}</version>
170                                                                 <type>pom</type>
171                                                                 <scope>import</scope>
172                                                 </dependency>
173                                 </dependencies>
174                 </dependencyManagement>
175
176                 <dependencies>
177                                 <dependency>
178                                                 <groupId>com.att.eelf</groupId>
179                                                 <artifactId>eelf-core</artifactId>
180                                                 <version>${eelf.core.version}</version>
181                                 </dependency>
182                                 <!-- For CAMEL -->
183                                 <dependency>
184                                                 <groupId>org.apache.camel</groupId>
185                                                 <artifactId>camel-spring-boot-starter</artifactId>
186                                 </dependency>
187                                 <dependency>
188                                                 <groupId>org.apache.camel</groupId>
189                                                 <artifactId>camel-jaxb-starter</artifactId>
190                                 </dependency>
191                                 <dependency>
192                                                 <groupId>org.apache.camel</groupId>
193                                                 <artifactId>camel-servlet-starter</artifactId>
194                                 </dependency>
195                                 <dependency>
196                                                 <groupId>javax.xml.bind</groupId>
197                                                 <artifactId>jaxb-api</artifactId>
198                                                 <version>2.3.0</version>
199                                 </dependency> 
200                                 <!-- Spring famework -->
201                                 <dependency>
202                                                 <groupId>org.springframework.boot</groupId>
203                                                 <artifactId>spring-boot-starter-web</artifactId>
204                                 </dependency>
205                                 <dependency>
206                                                 <groupId>org.springframework.boot</groupId>
207                                                 <artifactId>spring-boot-starter-tomcat</artifactId>
208                                 </dependency>
209                                 <dependency>
210                                                 <groupId>com.paypal.springboot</groupId>
211                                                 <artifactId>resteasy-spring-boot-starter</artifactId>
212                                                 <version>2.3.4-RELEASE</version>
213                                 </dependency>
214                                 <dependency>
215                                                 <groupId>org.springframework</groupId>
216                                                 <artifactId>spring-jdbc</artifactId>
217                                 </dependency>
218                                 <dependency>
219                                                 <groupId>org.springframework.boot</groupId>
220                                                 <artifactId>spring-boot-starter-security</artifactId>
221                                 </dependency>
222                                 <dependency>
223                                                 <groupId>org.springframework.boot</groupId>
224                                                 <artifactId>spring-boot-starter-actuator</artifactId>
225                                 </dependency>
226                                 <dependency>
227                                                 <groupId>org.springframework.boot</groupId>
228                                                 <artifactId>spring-boot-starter-test</artifactId>
229                                                 <scope>test</scope>
230                                                 <exclusions>
231                                                                 <exclusion>
232                                                                                 <groupId>com.vaadin.external.google</groupId>
233                                                                                 <artifactId>android-json</artifactId>
234                                                                 </exclusion>
235                                                 </exclusions>
236                                 </dependency>
237                                 <!-- Others dependencies -->
238                                 <dependency>
239                                                 <groupId>ch.qos.logback</groupId>
240                                                 <artifactId>logback-core</artifactId>
241                                                 <version>1.2.3</version>
242                                 </dependency>
243                                 <dependency>
244                                                 <groupId>ch.qos.logback</groupId>
245                                                 <artifactId>logback-classic</artifactId>
246                                                 <version>1.2.3</version>
247                                 </dependency>
248                                 <dependency>
249                                                 <groupId>commons-dbcp</groupId>
250                                                 <artifactId>commons-dbcp</artifactId>
251                                                 <version>1.4</version>
252                                 </dependency>
253                                 <dependency>
254                                                 <groupId>commons-io</groupId>
255                                                 <artifactId>commons-io</artifactId>
256                                                 <version>2.6</version>
257                                 </dependency>
258                                 <dependency>
259                                                 <groupId>com.googlecode.json-simple</groupId>
260                                                 <artifactId>json-simple</artifactId>
261                                 </dependency>
262                                 <dependency>
263                                                 <groupId>org.apache.commons</groupId>
264                                                 <artifactId>commons-vfs2</artifactId>
265                                                 <version>2.2</version>
266                                 </dependency>
267                                 <dependency>
268                                                 <groupId>joda-time</groupId>
269                                                 <artifactId>joda-time</artifactId>
270                                 </dependency>
271                                 <dependency>
272                                                 <groupId>org.slf4j</groupId>
273                                                 <artifactId>slf4j-api</artifactId>
274                                 </dependency>
275                                 <dependency>
276                                                 <groupId>javax.ws.rs</groupId>
277                                                 <artifactId>javax.ws.rs-api</artifactId>
278                                                 <version>2.0</version>
279                                 </dependency>
280                                 <dependency>
281                                                 <groupId>junit</groupId>
282                                                 <artifactId>junit</artifactId>
283                                 </dependency>
284                                 <dependency>
285                                                 <groupId>javax.transaction</groupId>
286                                                 <artifactId>jta</artifactId>
287                                                 <version>1.1</version>
288                                 </dependency>
289                                 <dependency>
290                                                 <groupId>javax.persistence</groupId>
291                                                 <artifactId>persistence-api</artifactId>
292                                                 <version>1.0.2</version>
293                                 </dependency>
294                                 <dependency>
295                                                 <groupId>org.hibernate</groupId>
296                                                 <artifactId>hibernate-annotations</artifactId>
297                                                 <version>3.5.6-Final</version>
298                                 </dependency>
299                                 <dependency>
300                                                 <groupId>dom4j</groupId>
301                                                 <artifactId>dom4j</artifactId>
302                                 </dependency>
303
304                                 <dependency>
305                                                 <groupId>org.onap.policy.engine</groupId>
306                                                 <artifactId>PolicyEngineAPI</artifactId>
307                                                 <version>1.2.0</version>
308                                                 <exclusions>
309                                                                 <exclusion>
310                                                                                 <groupId>com.google.guava</groupId>
311                                                                                 <artifactId>guava</artifactId>
312                                                                 </exclusion>
313                                                                 <exclusion>
314                                                                                 <artifactId>log4j</artifactId>
315                                                                                 <groupId>log4j</groupId>
316                                                                 </exclusion>
317                                                                 <exclusion>
318                                                                                 <groupId>org.slf4j</groupId>
319                                                                                 <artifactId>slf4j-log4j12</artifactId>
320                                                                 </exclusion>
321                                                                 <exclusion>
322                                                                                 <artifactId>apache-log4j-extras</artifactId>
323                                                                                 <groupId>log4j</groupId>
324                                                                 </exclusion>
325                                                                 <exclusion>
326                                                                                 <groupId>mysql</groupId>
327                                                                                 <artifactId>mysql-connector-java</artifactId>
328                                                                 </exclusion>
329                                                                 <exclusion>
330                                                                                 <groupId>commons-io</groupId>
331                                                                                 <artifactId>commons-io</artifactId>
332                                                                 </exclusion>
333                                                                 <exclusion>
334                                                                                 <artifactId>grizzly-http</artifactId>
335                                                                                 <groupId>org.glassfish.grizzly</groupId>
336                                                                 </exclusion>
337                                                 </exclusions>
338                                 </dependency>
339                                 <dependency>
340                                                 <groupId>org.onap.policy.common</groupId>
341                                                 <artifactId>ONAP-Logging</artifactId>
342                                                 <version>1.1.3</version>
343                                                 <exclusions>
344                                                                 <exclusion>
345                                                                                 <artifactId>log4j</artifactId>
346                                                                                 <groupId>log4j</groupId>
347                                                                 </exclusion>
348                                                                 <exclusion>
349                                                                                 <groupId>org.slf4j</groupId>
350                                                                                 <artifactId>slf4j-log4j12</artifactId>
351                                                                 </exclusion>
352                                                                 <exclusion>
353                                                                                 <artifactId>apache-log4j-extras</artifactId>
354                                                                                 <groupId>log4j</groupId>
355                                                                 </exclusion>
356                                                 </exclusions>
357                                 </dependency>
358                                 <dependency>
359                                                 <groupId>org.onap.policy.engine</groupId>
360                                                 <artifactId>PolicyEngineUtils</artifactId>
361                                                 <version>1.1.3</version>
362                                                 <exclusions>
363                                                                 <exclusion>
364                                                                                 <artifactId>log4j</artifactId>
365                                                                                 <groupId>log4j</groupId>
366                                                                 </exclusion>
367                                                                 <exclusion>
368                                                                                 <groupId>org.slf4j</groupId>
369                                                                                 <artifactId>slf4j-log4j12</artifactId>
370                                                                 </exclusion>
371                                                                 <exclusion>
372                                                                                 <artifactId>apache-log4j-extras</artifactId>
373                                                                                 <groupId>log4j</groupId>
374                                                                 </exclusion>
375                                                                 <exclusion>
376                                                                                 <groupId>mysql</groupId>
377                                                                                 <artifactId>mysql-connector-java</artifactId>
378                                                                 </exclusion>
379                                                                 <exclusion>
380                                                                                 <groupId>org.mariadb.jdbc</groupId>
381                                                                                 <artifactId>mariadb-java-client</artifactId>
382                                                                 </exclusion>
383                                                                 <exclusion>
384                                                                                 <groupId>com.att.nsa</groupId>
385                                                                                 <artifactId>dmaapClient</artifactId>
386                                                                 </exclusion>
387                                                 </exclusions>
388                                 </dependency>
389                                 <dependency>
390                                                 <groupId>org.onap.policy.drools-applications</groupId>
391                                                 <artifactId>policy-yaml</artifactId>
392                                                 <version>1.1.3</version>
393                                                 <exclusions>
394                                                                 <exclusion>
395                                                                                 <artifactId>log4j</artifactId>
396                                                                                 <groupId>log4j</groupId>
397                                                                 </exclusion>
398                                                                 <exclusion>
399                                                                                 <groupId>org.slf4j</groupId>
400                                                                                 <artifactId>slf4j-log4j12</artifactId>
401                                                                 </exclusion>
402                                                                 <exclusion>
403                                                                                 <artifactId>apache-log4j-extras</artifactId>
404                                                                                 <groupId>log4j</groupId>
405                                                                 </exclusion>
406                                                 </exclusions>
407                                 </dependency>
408                                 <dependency>
409                                                 <groupId>org.onap.policy.drools-applications</groupId>
410                                                 <artifactId>sdc</artifactId>
411                                                 <version>1.1.3</version>
412                                                 <exclusions>
413                                                                 <exclusion>
414                                                                                 <artifactId>log4j</artifactId>
415                                                                                 <groupId>log4j</groupId>
416                                                                 </exclusion>
417                                                                 <exclusion>
418                                                                                 <groupId>org.slf4j</groupId>
419                                                                                 <artifactId>slf4j-log4j12</artifactId>
420                                                                 </exclusion>
421                                                                 <exclusion>
422                                                                                 <artifactId>apache-log4j-extras</artifactId>
423                                                                                 <groupId>log4j</groupId>
424                                                                 </exclusion>
425                                                 </exclusions>
426                                 </dependency>
427                                 <dependency>
428                                                 <groupId>org.onap.policy.drools-applications</groupId>
429                                                 <artifactId>aai</artifactId>
430                                                 <version>1.1.3</version>
431                                                 <exclusions>
432                                                                 <exclusion>
433                                                                                 <artifactId>log4j</artifactId>
434                                                                                 <groupId>log4j</groupId>
435                                                                 </exclusion>
436                                                                 <exclusion>
437                                                                                 <groupId>org.slf4j</groupId>
438                                                                                 <artifactId>slf4j-log4j12</artifactId>
439                                                                 </exclusion>
440                                                                 <exclusion>
441                                                                                 <artifactId>apache-log4j-extras</artifactId>
442                                                                                 <groupId>log4j</groupId>
443                                                                 </exclusion>
444                                                 </exclusions>
445                                 </dependency>
446                                 <dependency>
447                                                 <groupId>org.apache.commons</groupId>
448                                                 <artifactId>commons-csv</artifactId>
449                                                 <version>1.3</version>
450                                 </dependency>
451                                 <dependency>
452                                                 <groupId>com.sun.faces</groupId>
453                                                 <artifactId>jsf-api</artifactId>
454                                                 <version>2.1.7</version>
455                                 </dependency>
456                                 <dependency>
457                                                 <groupId>com.sun.faces</groupId>
458                                                 <artifactId>jsf-impl</artifactId>
459                                                 <version>2.1.7</version>
460                                 </dependency>
461                                 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
462                                 <dependency>
463                                         <groupId>org.codehaus.plexus</groupId>
464                                         <artifactId>plexus-utils</artifactId>
465                                         <version>3.0.24</version>
466                                 </dependency>
467                                 <dependency>
468                                         <groupId>commons-fileupload</groupId>
469                                         <artifactId>commons-fileupload</artifactId>
470                                         <version>1.3.3</version>
471                                 </dependency>
472                                 <dependency>
473                                         <groupId>org.jboss.spec.javax.ws.rs</groupId>
474                                         <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
475                                         <version>1.0.1.Final</version>
476                                 </dependency>
477                                 <!-- Remove the MYSQL connector and replace it by Mariadb -->
478                                 <dependency>
479                                                 <groupId>org.mariadb.jdbc</groupId>
480                                                 <artifactId>mariadb-java-client</artifactId>
481                                                 <version>2.2.1</version>
482                                 </dependency>
483                                 <!-- For SDC Controller -->
484                                 <dependency>
485                                                 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
486                                                 <artifactId>sdc-distribution-client</artifactId>
487                                                 <version>1.3.0</version>
488                                 </dependency>
489                                 <dependency>
490                                         <groupId>org.onap.sdc.sdc-tosca</groupId>
491                                         <artifactId>sdc-tosca</artifactId>
492                                         <version>1.3.0</version>
493                                 </dependency>
494                                 <!-- To generate Swagger.json, swagger.html and swagger.pdf -->
495                                 <dependency>
496                                         <groupId>io.springfox</groupId>
497                                         <artifactId>springfox-swagger2</artifactId>
498                                         <version>2.4.0</version>
499                                         <scope>test</scope>
500                                 </dependency>
501                                 <dependency>
502                                         <groupId>io.github.robwin</groupId>
503                                         <artifactId>assertj-swagger</artifactId>
504                                         <version>0.2.0</version>
505                                         <scope>test</scope>
506                                 </dependency> 
507                                 <dependency>
508                                         <groupId>io.github.swagger2markup</groupId>
509                                         <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
510                                         <version>1.2.0</version>
511                                         <scope>test</scope>
512                                 </dependency>
513                         </dependencies>
514                         <pluginRepositories>
515                                 <pluginRepository>
516                                         <snapshots>
517                                                 <enabled>false</enabled>
518                                         </snapshots>
519                                         <id>jcenter-releases</id>
520                                         <name>jcenter</name>
521                                         <url>http://jcenter.bintray.com</url>
522                                 </pluginRepository>
523                         </pluginRepositories>
524                 <build>
525                                 <finalName>clamp</finalName>
526
527                                 <testResources>
528                                                 <testResource>
529                                                                 <directory>src/test/resources</directory>
530                                                                 <excludes>
531                                                                                 <exclude>**/*.jks</exclude>
532                                                                                 <exclude>**/*.csar</exclude>
533                                                                 </excludes>
534                                                                 <filtering>true</filtering>
535                                                 </testResource>
536                                                 <testResource>
537                                                                 <directory>src/test/resources/https</directory>
538                                                                 <includes>
539                                                                                 <include>**.jks</include>
540                                                                 </includes>
541                                                                 <filtering>false</filtering>
542                                                                 <targetPath>https</targetPath>
543                                                 </testResource>
544                                           <testResource>
545                                                                 <directory>src/test/resources/example/sdc</directory>
546                                                                 <includes>
547                                                                                 <include>**.csar</include>
548                                                                 </includes>
549                                                                 <filtering>false</filtering>
550                                                                 <targetPath>example/sdc</targetPath>
551                                                 </testResource>
552                                 </testResources>
553                                 <resources>
554                                                 <resource>
555                                                                 <directory>src/main/resources</directory>
556                                                                 <filtering>true</filtering>
557                                                 </resource>
558                                                 <resource>
559                                                                 <directory>src/main/docker</directory>
560                                                                 <includes>
561                                                                                 <include>**/*</include>
562                                                                 </includes>
563                                                                 <filtering>true</filtering>
564                                                 </resource>
565                                 </resources>
566
567                                 <plugins>
568                                         <!-- Scan Clamp code and generate the swagger.json file with all the APIs -->
569                                         <plugin>
570                                                 <groupId>com.sebastian-daschner</groupId>
571                                                 <artifactId>jaxrs-analyzer-maven-plugin</artifactId>
572                                                 <version>0.14</version>
573                                                 <executions>
574                                                         <execution>
575                                                                 <phase>test</phase>
576                                                                 <goals>
577                                                                         <goal>analyze-jaxrs</goal>
578                                                                 </goals>
579                                                                 <configuration>
580                                                                         <backend>swagger</backend>
581                                                                         <resourcesDir>../docs/swagger/</resourcesDir>
582                                                                 </configuration>
583                                                         </execution>
584                                                 </executions>
585                                         </plugin>
586
587                                         <!-- Read the swagger.json file and the definition from SwaggerConfig.java;
588                                                 generate a list of .adoc files containing the APIs info in more structured way  -->
589                                         <plugin>
590                                                 <groupId>io.github.swagger2markup</groupId>
591                                                 <artifactId>swagger2markup-maven-plugin</artifactId>
592                                                 <version>1.3.1</version>
593                                                 <dependencies>
594                                                         <dependency>
595                                                                 <groupId>io.github.swagger2markup</groupId>
596                                                                 <artifactId>swagger2markup-import-files-ext</artifactId>
597                                                                 <version>1.3.1</version>
598                                                         </dependency>
599                                                         <dependency>
600                                                                 <groupId>io.github.swagger2markup</groupId>
601                                                                 <artifactId>swagger2markup-spring-restdocs-ext</artifactId>
602                                                                 <version>1.3.1</version>
603                                                         </dependency>
604                                                 </dependencies>
605                                                 <configuration>
606                                                         <swaggerInput>${project.basedir}/docs/swagger/swagger.json</swaggerInput>
607                                                         <outputDir>${project.build.directory}/asciidoc/generated</outputDir>
608                                                         <config>
609                                                                 <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
610                                                         </config>
611                                                 </configuration>
612                                                 <executions>
613                                                         <execution>
614                                                                 <phase>test</phase>
615                                                                 <goals>
616                                                                         <goal>convertSwagger2markup</goal>
617                                                                 </goals>
618                                                         </execution>
619                                                 </executions>
620                                         </plugin>
621
622                                         <!-- Run the generated asciidoc through Asciidoctor to generate
623                                         other documentation types, such as PDFs or HTML5 -->
624                                         <plugin>
625                                                 <groupId>org.asciidoctor</groupId>
626                                                 <artifactId>asciidoctor-maven-plugin</artifactId>
627                                                 <version>1.5.3</version>
628                                                 <dependencies>
629                                                         <dependency>
630                                                                 <groupId>org.asciidoctor</groupId>
631                                                                 <artifactId>asciidoctorj-pdf</artifactId>
632                                                                 <version>1.5.0-alpha.10.1</version>
633                                                         </dependency>
634                                                         <dependency>
635                                                                 <groupId>org.jruby</groupId>
636                                                                 <artifactId>jruby-complete</artifactId>
637                                                                 <version>1.7.21</version>
638                                                         </dependency>
639                                                 </dependencies>
640                                                 <configuration>
641                                                         <sourceDirectory>${project.basedir}/src/main/resources/asciidoc</sourceDirectory>
642                                                         <sourceDocumentName>swagger.adoc</sourceDocumentName>
643                                                         <attributes>
644                                                                 <doctype>book</doctype>
645                                                                 <toc>left</toc>
646                                                                 <toclevels>3</toclevels>
647                                                                 <numbered></numbered>
648                                                                 <hardbreaks></hardbreaks>
649                                                                 <sectlinks></sectlinks>
650                                                                 <sectanchors></sectanchors>
651                                                                 <generated>${project.build.directory}/asciidoc/generated</generated>
652                                                         </attributes>
653                                                 </configuration>
654
655                                                 <executions>
656                                                         <execution>
657                                                                 <id>output-html</id>
658                                                                 <phase>test</phase>
659                                                                 <goals>
660                                                                         <goal>process-asciidoc</goal>
661                                                                 </goals>
662                                                                 <configuration>
663                                                                         <backend>html5</backend>
664                                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
665                                                                         <outputDirectory>${project.basedir}/src/main/resources/META-INF/resources/</outputDirectory>
666                                                                 </configuration>
667                                                         </execution>
668                                                         <execution>
669                                                                 <id>output-pdf</id>
670                                                                 <phase>test</phase>
671                                                                 <goals>
672                                                                         <goal>process-asciidoc</goal>
673                                                                 </goals>
674                                                                 <configuration>
675                                                                         <backend>pdf</backend>
676                                                                         <outputDirectory>${project.basedir}/docs/swagger</outputDirectory>
677                                                                 </configuration>
678                                                         </execution>
679                                                 </executions>
680                                         </plugin>
681                                                 <plugin>
682                                                                 <groupId>org.codehaus.groovy.maven</groupId>
683                                                                 <artifactId>gmaven-plugin</artifactId>
684                                                                 <version>1.0</version>
685                                                                 <executions>
686                                                                                 <execution>
687                                                                                                 <phase>validate</phase>
688                                                                                                 <goals>
689                                                                                                                 <goal>execute</goal>
690                                                                                                 </goals>
691                                                                                                 <configuration>
692                                                                                                                 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
693                                                                                                 </configuration>
694                                                                                 </execution>
695                                                                 </executions>
696                                                 </plugin>
697                                                 <plugin>
698                                                                 <groupId>org.apache.maven.plugins</groupId>
699                                                                 <artifactId>maven-jar-plugin</artifactId>
700                                                                 <version>3.0.2</version>
701                                                                 <executions>
702                                                                                 <execution>
703                                                                                                 <id>jar-with-only-classes</id>
704                                                                                                 <phase>package</phase>
705                                                                                                 <goals>
706                                                                                                                 <goal>jar</goal>
707                                                                                                 </goals>
708                                                                                                 <configuration>
709                                                                                                                 <classifier>classes</classifier>
710                                                                                                                 <includes>
711                                                                                                                                 <include>org/**</include>
712                                                                                                                 </includes>
713                                                                                                 </configuration>
714                                                                                 </execution>
715                                                                 </executions>
716                                                 </plugin>
717                                                 <plugin>
718                                                                 <groupId>org.codehaus.mojo</groupId>
719                                                                 <artifactId>build-helper-maven-plugin</artifactId>
720                                                                 <version>3.0.0</version>
721                                                                 <executions>
722                                                                                 <execution>
723                                                                                                 <goals>
724                                                                                                                 <goal>attach-artifact</goal>
725                                                                                                 </goals>
726                                                                                                 <phase>package</phase>
727                                                                                                 <configuration>
728                                                                                                                 <artifacts>
729                                                                                                                                 <artifact>
730                                                                                                                                                 <file>${project.build.directory}/clamp-classes.jar</file>
731                                                                                                                                                 <type>jar</type>
732                                                                                                                                                 <classifier>classes</classifier>
733                                                                                                                                 </artifact>
734                                                                                                                 </artifacts>
735                                                                                                 </configuration>
736                                                                                 </execution>
737                                                                 </executions>
738                                                 </plugin>
739
740                                                 <plugin>
741                                                                 <groupId>org.springframework.boot</groupId>
742                                                                 <artifactId>spring-boot-maven-plugin</artifactId>
743                                                                 <version>${springboot.version}</version>
744                                                                 <executions>
745                                                                                 <execution>
746                                                                                                 <goals>
747                                                                                                                 <goal>repackage</goal>
748                                                                                                 </goals>
749                                                                                                 <phase>package</phase>
750                                                                                 </execution>
751                                                                 </executions>
752                                                 </plugin>
753                                                 <plugin>
754                                                                 <groupId>org.sonatype.plugins</groupId>
755                                                                 <artifactId>nexus-staging-maven-plugin</artifactId>
756                                                                 <version>1.6.7</version>
757                                                                 <extensions>true</extensions>
758                                                                 <configuration>
759                                                                                 <nexusUrl>https://nexus.onap.org</nexusUrl>
760                                                                                 <stagingProfileId>176c31dfe190a</stagingProfileId>
761                                                                                 <serverId>ecomp-staging</serverId>
762                                                                                 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
763                                                                 </configuration>
764                                                 </plugin>
765                                                 <plugin>
766                                                                 <groupId>com.spotify</groupId>
767                                                                 <artifactId>docker-maven-plugin</artifactId>
768                                                                 <version>1.1.0</version>
769                                                                 <configuration>
770                                                                 <dockerHost>unix:///var/run/docker.sock</dockerHost>
771                                                                                 <imageName>onap/clamp</imageName>
772                                                                                 <dockerDirectory>src/main/docker</dockerDirectory>
773                                                                                 <serverId>docker-hub</serverId>
774                                                                                 <imageTags>
775                                                                                                 <imageTag>latest</imageTag>
776                                                                                                 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
777                                                                                                 <imageTag>${project.docker.latesttag.version}</imageTag>
778                                                                                 </imageTags>
779                                                                                 <forceTags>true</forceTags>
780                                                                                 <resources>
781                                                                                                 <resource>
782                                                                                                                 <targetPath>/</targetPath>
783                                                                                                                 <directory>${project.build.directory}</directory>
784                                                                                                                 <include>${project.build.finalName}.jar</include>
785                                                                                                 </resource>
786                                                                                                 <resource>
787                                                                                                                 <targetPath>/</targetPath>
788                                                                                                                 <directory>${project.build.directory}</directory>
789                                                                                                                 <include>etc/config/**</include>
790                                                                                                 </resource>
791                                                                                                 <resource>
792                                                                                                                 <targetPath>/</targetPath>
793                                                                                                                 <directory>${project.build.directory}</directory>
794                                                                                                                 <include>etc/keystore/**</include>
795                                                                                                 </resource>
796                                                                                 </resources>
797                                                                 </configuration>
798                                                                 <executions>
799                                                                                 <execution>
800                                                                                                 <id>build-image</id>
801                                                                                                 <phase>package</phase>
802                                                                                                 <goals>
803                                                                                                                 <goal>build</goal>
804                                                                                                 </goals>
805                                                                                                 <configuration>
806                                                                                                                 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
807                                                                                                                 <buildArgs>
808                                                                                                                                 <http_proxy>${env.HTTP_PROXY}</http_proxy>
809                                                                                                                                 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
810                                                                                                                 </buildArgs>
811                                                                                                 </configuration>
812                                                                                 </execution>
813
814                                                                                 <execution>
815                                                                                                 <id>tag-image-latest-timestamp</id>
816                                                                                                 <phase>package</phase>
817                                                                                                 <goals>
818                                                                                                                 <goal>tag</goal>
819                                                                                                 </goals>
820                                                                                                 <configuration>
821                                                                                                                 <image>onap/clamp</image>
822                                                                                                                 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
823                                                                                                                 <skipDockerTag>${skip.docker.push}</skipDockerTag>
824                                                                                                 </configuration>
825                                                                                 </execution>
826                                                                                 <execution>
827                                                                                                 <id>push-image-latest-timestamp</id>
828                                                                                                 <phase>deploy</phase>
829                                                                                                 <goals>
830                                                                                                                 <goal>push</goal>
831                                                                                                 </goals>
832                                                                                                 <configuration>
833                                                                                                                 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
834                                                                                                                 <skipDockerPush>${skip.docker.push}</skipDockerPush>
835                                                                                                 </configuration>
836                                                                                 </execution>
837                                                                                 <execution>
838                                                                                                 <id>tag-image-latest</id>
839                                                                                                 <phase>package</phase>
840                                                                                                 <goals>
841                                                                                                                 <goal>tag</goal>
842                                                                                                 </goals>
843                                                                                                 <configuration>
844                                                                                                                 <image>onap/clamp</image>
845                                                                                                                 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
846                                                                                                                 <skipDockerTag>${skip.docker.push}</skipDockerTag>
847                                                                                                 </configuration>
848                                                                                 </execution>
849                                                                                 <execution>
850                                                                                                 <id>push-image-latest</id>
851                                                                                                 <phase>deploy</phase>
852                                                                                                 <goals>
853                                                                                                                 <goal>push</goal>
854                                                                                                 </goals>
855                                                                                                 <configuration>
856                                                                                                                 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
857                                                                                                                 <skipDockerPush>${skip.docker.push}</skipDockerPush>
858                                                                                                 </configuration>
859                                                                                 </execution>
860                                                                                 <execution>
861                                                                                                 <id>tag-image</id>
862                                                                                                 <phase>package</phase>
863                                                                                                 <goals>
864                                                                                                                 <goal>tag</goal>
865                                                                                                 </goals>
866                                                                                                 <configuration>
867                                                                                                                 <image>onap/clamp</image>
868                                                                                                                 <newName>${docker.push.registry}/onap/clamp:latest</newName>
869                                                                                                                 <skipDockerTag>${skip.docker.push}</skipDockerTag>
870                                                                                                 </configuration>
871                                                                                 </execution>
872                                                                                 <execution>
873                                                                                                 <id>push-image</id>
874                                                                                                 <phase>deploy</phase>
875                                                                                                 <goals>
876                                                                                                                 <goal>push</goal>
877                                                                                                 </goals>
878                                                                                                 <configuration>
879                                                                                                                 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
880                                                                                                                 <skipDockerPush>${skip.docker.push}</skipDockerPush>
881                                                                                                 </configuration>
882                                                                                 </execution>
883                                                                 </executions>
884                                                 </plugin>
885                                                 <plugin>
886                                                                 <groupId>org.apache.maven.plugins</groupId>
887                                                                 <artifactId>maven-surefire-plugin</artifactId>
888                                                                 <version>2.19.1</version>
889                                                                 <configuration>
890                                                                                 <forkCount>1</forkCount>
891                                                                                 <reuseForks>false</reuseForks>
892                                                                 </configuration>
893                                                 </plugin>
894
895                                                 <plugin>
896                                                                 <groupId>org.apache.maven.plugins</groupId>
897                                                                 <artifactId>maven-failsafe-plugin</artifactId>
898                                                                 <version>2.16</version>
899
900                                                                 <executions>
901                                                                                 <execution>
902                                                                                                 <id>integration-tests</id>
903                                                                                                 <goals>
904                                                                                                                 <goal>integration-test</goal>
905                                                                                                                 <goal>verify</goal>
906                                                                                                 </goals>
907                                                                                                 <configuration>
908                                                                                                                 <includes>
909                                                                                                                                 <include>**/*ItCase.java</include>
910                                                                                                                 </includes>
911                                                                                                                 <forkCount>1</forkCount>
912                                                                                                                 <reuseForks>false</reuseForks>
913                                                                                                 </configuration>
914                                                                                 </execution>
915                                                                 </executions>
916
917                                                 </plugin>
918                                                 <plugin>
919                                                                 <groupId>io.fabric8</groupId>
920                                                                 <artifactId>docker-maven-plugin</artifactId>
921                                                                 <version>0.16.5</version>
922                                                                 <configuration>
923                                                                                 <verbose>true</verbose>
924                                                                                 <apiVersion>1.23</apiVersion>
925                                                                                 <images>
926                                                                                                 <image>
927                                                                                                                 <name>mariadb:10.1.11</name>
928                                                                                                                 <alias>mariadb</alias>
929                                                                                                                 <run>
930                                                                                                                                 <env>
931                                                                                                                                                 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
932                                                                                                                                 </env>
933                                                                                                                                 <hostname>mariadb</hostname>
934                                                                                                                                 <volumes>
935                                                                                                                                                 <bind>
936                                                                                                                                                                 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
937                                                                                                                                                                 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
938                                                                                                                                                 </bind>
939                                                                                                                                 </volumes>
940                                                                                                                                 <wait>
941                                                                                                                                                 <log>socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution</log>
942                                                                                                                                                 <time>600000</time>
943                                                                                                                                 </wait>
944                                                                                                                                 <ports>
945                                                                                                                                                 <port>${docker.mariadb.port.host}:3306</port>
946                                                                                                                                 </ports>
947                                                                                                                 </run>
948                                                                                                 </image>
949                                                                                                 <image>
950                                                                                                                 <name>python:2-slim</name>
951                                                                                                                 <alias>python</alias>
952                                                                                                                 <run>
953                                                                                                                                 <hostname>python</hostname>
954                                                                                                                                 <volumes>
955                                                                                                                                                 <bind>
956                                                                                                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
957                                                                                                                                                                 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
958                                                                                                                                                 </bind>
959                                                                                                                                 </volumes>
960                                                                                                                                 <wait>
961                                                                                                                                                 <tcp>
962                                                                                                                                                                 <ports>
963                                                                                                                                                                                 <port>8080</port>
964                                                                                                                                                                 </ports>
965                                                                                                                                                                 <mode>direct</mode>
966                                                                                                                                                 </tcp>
967                                                                                                                                                 <time>120000</time>
968                                                                                                                                 </wait>
969                                                                                                                                 <ports>
970                                                                                                                                                 <port>${docker.http-cache.port.host}:8080</port>
971                                                                                                                                 </ports>
972                                                                                                                                 <workingDir>/usr/src/http-cache-app</workingDir>
973                                                                                                                                 <cmd>
974                                                                                                                                                 <shell>./start_http_cache.sh ${python.http.proxy.param} --python_proxyaddress=localhost:${docker.http-cache.port.host}</shell>
975                                                                                                                                 </cmd>
976                                                                                                                 </run>
977                                                                                                 </image>
978                                                                                 </images>
979                                                                                 <skip>${skipITs}</skip>
980                                                                 </configuration>
981
982                                                                 <executions>
983                                                                                 <execution>
984                                                                                                 <id>docker-start-for-it</id>
985                                                                                                 <phase>pre-integration-test</phase>
986                                                                                                 <goals>
987                                                                                                                 <goal>start</goal>
988                                                                                                 </goals>
989                                                                                                 <configuration>
990                                                                                                                 <skip>${skipITs}</skip>
991                                                                                                 </configuration>
992                                                                                 </execution>
993                                                                                 <execution>
994                                                                                                 <id>docker-stop-for-it</id>
995                                                                                                 <phase>post-integration-test</phase>
996                                                                                                 <goals>
997                                                                                                                 <goal>stop</goal>
998                                                                                                 </goals>
999                                                                                                 <configuration>
1000                                                                                                                 <skip>${skipITs}</skip>
1001                                                                                                 </configuration>
1002                                                                                 </execution>
1003                                                                 </executions>
1004                                                 </plugin>
1005
1006                                                 <plugin>
1007                                                                 <groupId>org.jacoco</groupId>
1008                                                                 <artifactId>jacoco-maven-plugin</artifactId>
1009                                                                 <version>0.7.7.201606060606</version>
1010                                                                 <configuration>
1011                                                                                 <dumpOnExit>true</dumpOnExit>
1012                                                                                 <includes>
1013                                                                                                 <include>org.onap.clamp.*</include>
1014                                                                                 </includes>
1015                                                                 </configuration>
1016                                                                 <executions>
1017                                                                                 <execution>
1018                                                                                                 <id>pre-unit-test</id>
1019                                                                                                 <goals>
1020                                                                                                                 <goal>prepare-agent</goal>
1021                                                                                                 </goals>
1022                                                                                                 <configuration>
1023                                                                                                                 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
1024                                                                                                                 <!-- <append>true</append> -->
1025                                                                                                 </configuration>
1026                                                                                 </execution>
1027                                                                                 <execution>
1028                                                                                                 <id>pre-integration-test</id>
1029                                                                                                 <phase>pre-integration-test</phase>
1030                                                                                                 <goals>
1031                                                                                                                 <goal>prepare-agent</goal>
1032                                                                                                 </goals>
1033                                                                                                 <configuration>
1034                                                                                                                 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
1035                                                                                                                 <!-- <append>true</append> -->
1036                                                                                                 </configuration>
1037                                                                                 </execution>
1038                                                                                 <execution>
1039                                                                                                 <goals>
1040                                                                                                                 <goal>merge</goal>
1041                                                                                                 </goals>
1042                                                                                                 <phase>post-integration-test</phase>
1043                                                                                                 <configuration>
1044                                                                                                                 <fileSets>
1045                                                                                                                                 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
1046                                                                                                                                                 <directory>${project.build.directory}/coverage-reports</directory>
1047                                                                                                                                                 <includes>
1048                                                                                                                                                                 <include>*.exec</include>
1049                                                                                                                                                 </includes>
1050                                                                                                                                 </fileSet>
1051                                                                                                                 </fileSets>
1052                                                                                                                 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
1053                                                                                                 </configuration>
1054                                                                                 </execution>
1055                                                                 </executions>
1056                                                 </plugin>
1057
1058                                                 <!-- This plugin will be useful when we will have multi-modules project -->
1059                                                 <plugin>
1060                                                                 <groupId>org.codehaus.mojo</groupId>
1061                                                                 <artifactId>versions-maven-plugin</artifactId>
1062                                                                 <version>1.3.1</version>
1063                                                 </plugin>
1064                                 </plugins>
1065                 </build>
1066                 <profiles>
1067                                 <profile>
1068                                                 <id>docker</id>
1069                                                 <properties>
1070                                                                 <skip.staging.artifacts>true</skip.staging.artifacts>
1071                                                                 <skip.docker.build>false</skip.docker.build>
1072                                                                 <skip.docker.tag>false</skip.docker.tag>
1073                                                                 <skip.docker.push>false</skip.docker.push>
1074                                                 </properties>
1075                                 </profile>
1076                 </profiles>
1077 </project>