1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
5 ================================================================================
6 Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
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
13 http://www.apache.org/licenses/LICENSE-2.0
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 ECOMP is a trademark and service mark of AT&T Intellectual Property.
25 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
26 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
27 <modelVersion>4.0.0</modelVersion>
28 <groupId>org.onap.clamp</groupId>
29 <artifactId>clds</artifactId>
30 <version>2.0.0-SNAPSHOT</version>
34 <groupId>org.onap.oparent</groupId>
35 <artifactId>oparent</artifactId>
36 <version>1.1.0-SNAPSHOT</version>
40 This project build the ONAP CLAMP JAR that contains CLAMP back-end code and its UI part.
42 By Default "mvn clean install" command will execute also the unit tests
43 and the integration tests. The integration tests require a docker engine running.
45 If you want to skip the intergation test you can by doing:
46 "mvn clean install -DskipITs=true"
48 For Spring it's possible to specify the application.properties location
49 "mvn clean install -Dspring.config.location=classpath:application-test.properties"
51 The application.properties contains the location of the CLAMP parameters files:
52 - org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.properties
53 - org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
54 - org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
55 - org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
60 <maven.build.timestamp.format>yyyy.MM.dd'T'hh.mm.ss'Z'</maven.build.timestamp.format>
61 <clamp.project.version>${project.version}</clamp.project.version>
62 <clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
63 <maven.compiler.source>1.8</maven.compiler.source>
64 <maven.compiler.target>1.8</maven.compiler.target>
65 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
66 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
68 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
69 <docker.http-cache.port.host>2080</docker.http-cache.port.host>
70 <project.scm.id>git-server</project.scm.id>
71 <java.version>1.8</java.version>
73 <eelf.core.version>1.0.0</eelf.core.version>
74 <camel.version>2.20.1</camel.version>
75 <springboot.version>1.5.10.RELEASE</springboot.version>
77 <sonar.language>java</sonar.language>
78 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
79 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
80 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
81 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
82 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
83 <sonar.projectVersion>${project.version}</sonar.projectVersion>
85 <docker.push.registry>localhost:5000</docker.push.registry>
86 <skip.docker.build>true</skip.docker.build>
87 <skip.docker.push>true</skip.docker.push>
88 <skip.staging.artifacts>false</skip.staging.artifacts>
89 <http.proxy></http.proxy>
93 <distributionManagement>
95 <id>ecomp-releases</id>
96 <name>Clamp Release Repository</name>
97 <url>https://nexus.onap.org/content/repositories/releases/</url>
100 <id>ecomp-snapshots</id>
101 <name>Clamp Snapshot Repository</name>
102 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
103 </snapshotRepository>
106 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
108 </distributionManagement>
113 <name>Maven 2 repository 2</name>
114 <url>http://repo2.maven.org/maven2/</url>
117 <id>ecomp-releases</id>
118 <name>ONAP Release Repository</name>
119 <url>https://nexus.onap.org/content/repositories/releases/</url>
122 <id>ecomp-staging</id>
123 <name>ONAP Staging Repository</name>
124 <url>https://nexus.onap.org/content/repositories/staging/</url>
127 <id>ecomp-snapshots</id>
128 <name>ONAP Snapshot Repository</name>
129 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
131 <enabled>true</enabled>
134 <enabled>false</enabled>
139 <name>Spring repo</name>
140 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
143 <id>repository.jboss.org-public</id>
144 <name>JBoss.org Maven repository</name>
145 <url>https://repository.jboss.org/nexus/content/groups/public</url>
149 <dependencyManagement>
151 <!-- Spring Boot BOM -->
153 <groupId>org.springframework.boot</groupId>
154 <artifactId>spring-boot-dependencies</artifactId>
155 <version>${springboot.version}</version>
157 <scope>import</scope>
161 <groupId>org.apache.camel</groupId>
162 <artifactId>camel-spring-boot-dependencies</artifactId>
163 <version>${camel.version}</version>
165 <scope>import</scope>
168 </dependencyManagement>
172 <groupId>com.att.eelf</groupId>
173 <artifactId>eelf-core</artifactId>
174 <version>${eelf.core.version}</version>
178 <groupId>org.apache.camel</groupId>
179 <artifactId>camel-spring-boot-starter</artifactId>
182 <groupId>org.apache.camel</groupId>
183 <artifactId>camel-jaxb-starter</artifactId>
186 <groupId>org.apache.camel</groupId>
187 <artifactId>camel-servlet-starter</artifactId>
189 <!-- Spring famework -->
191 <groupId>org.springframework.boot</groupId>
192 <artifactId>spring-boot-starter-web</artifactId>
195 <groupId>org.springframework.boot</groupId>
196 <artifactId>spring-boot-starter-tomcat</artifactId>
199 <groupId>com.paypal.springboot</groupId>
200 <artifactId>resteasy-spring-boot-starter</artifactId>
201 <version>2.3.4-RELEASE</version>
204 <groupId>org.springframework</groupId>
205 <artifactId>spring-jdbc</artifactId>
208 <groupId>org.springframework.boot</groupId>
209 <artifactId>spring-boot-starter-security</artifactId>
212 <groupId>org.springframework.boot</groupId>
213 <artifactId>spring-boot-starter-actuator</artifactId>
216 <groupId>org.springframework.boot</groupId>
217 <artifactId>spring-boot-starter-test</artifactId>
221 <groupId>com.vaadin.external.google</groupId>
222 <artifactId>android-json</artifactId>
226 <!-- Others dependencies -->
228 <groupId>ch.qos.logback</groupId>
229 <artifactId>logback-core</artifactId>
230 <version>1.2.3</version>
233 <groupId>ch.qos.logback</groupId>
234 <artifactId>logback-classic</artifactId>
235 <version>1.2.3</version>
238 <groupId>commons-dbcp</groupId>
239 <artifactId>commons-dbcp</artifactId>
240 <version>1.4</version>
243 <groupId>commons-io</groupId>
244 <artifactId>commons-io</artifactId>
245 <version>2.6</version>
248 <groupId>com.googlecode.json-simple</groupId>
249 <artifactId>json-simple</artifactId>
252 <groupId>org.apache.commons</groupId>
253 <artifactId>commons-vfs2</artifactId>
254 <version>2.2</version>
257 <groupId>joda-time</groupId>
258 <artifactId>joda-time</artifactId>
261 <groupId>org.slf4j</groupId>
262 <artifactId>slf4j-api</artifactId>
265 <groupId>javax.ws.rs</groupId>
266 <artifactId>javax.ws.rs-api</artifactId>
267 <version>2.0</version>
270 <groupId>junit</groupId>
271 <artifactId>junit</artifactId>
274 <groupId>com.fasterxml.jackson.core</groupId>
275 <artifactId>jackson-core</artifactId>
278 <groupId>com.fasterxml.jackson.core</groupId>
279 <artifactId>jackson-databind</artifactId>
282 <groupId>javax.transaction</groupId>
283 <artifactId>jta</artifactId>
284 <version>1.1</version>
287 <groupId>javax.persistence</groupId>
288 <artifactId>persistence-api</artifactId>
289 <version>1.0.2</version>
292 <groupId>org.hibernate</groupId>
293 <artifactId>hibernate-annotations</artifactId>
294 <version>3.5.6-Final</version>
297 <groupId>dom4j</groupId>
298 <artifactId>dom4j</artifactId>
302 <groupId>org.onap.policy.engine</groupId>
303 <artifactId>PolicyEngineAPI</artifactId>
304 <version>1.1.0</version>
307 <artifactId>log4j</artifactId>
308 <groupId>log4j</groupId>
311 <groupId>org.slf4j</groupId>
312 <artifactId>slf4j-log4j12</artifactId>
315 <artifactId>apache-log4j-extras</artifactId>
316 <groupId>log4j</groupId>
319 <artifactId>jackson-databind</artifactId>
320 <groupId>com.fasterxml.jackson.core</groupId>
323 <groupId>mysql</groupId>
324 <artifactId>mysql-connector-java</artifactId>
327 <groupId>commons-io</groupId>
328 <artifactId>commons-io</artifactId>
333 <groupId>org.onap.policy.common</groupId>
334 <artifactId>ONAP-Logging</artifactId>
335 <version>1.1.0</version>
338 <artifactId>log4j</artifactId>
339 <groupId>log4j</groupId>
342 <groupId>org.slf4j</groupId>
343 <artifactId>slf4j-log4j12</artifactId>
346 <artifactId>apache-log4j-extras</artifactId>
347 <groupId>log4j</groupId>
352 <groupId>org.onap.policy.engine</groupId>
353 <artifactId>PolicyEngineUtils</artifactId>
354 <version>1.1.0</version>
357 <artifactId>log4j</artifactId>
358 <groupId>log4j</groupId>
361 <groupId>org.slf4j</groupId>
362 <artifactId>slf4j-log4j12</artifactId>
365 <artifactId>apache-log4j-extras</artifactId>
366 <groupId>log4j</groupId>
369 <groupId>mysql</groupId>
370 <artifactId>mysql-connector-java</artifactId>
373 <groupId>org.mariadb.jdbc</groupId>
374 <artifactId>mariadb-java-client</artifactId>
377 <groupId>com.att.nsa</groupId>
378 <artifactId>dmaapClient</artifactId>
383 <groupId>org.onap.policy.drools-applications</groupId>
384 <artifactId>policy-yaml</artifactId>
385 <version>1.1.0</version>
388 <artifactId>log4j</artifactId>
389 <groupId>log4j</groupId>
392 <groupId>org.slf4j</groupId>
393 <artifactId>slf4j-log4j12</artifactId>
396 <artifactId>apache-log4j-extras</artifactId>
397 <groupId>log4j</groupId>
402 <groupId>org.onap.policy.drools-applications</groupId>
403 <artifactId>sdc</artifactId>
404 <version>1.1.0</version>
407 <artifactId>log4j</artifactId>
408 <groupId>log4j</groupId>
411 <groupId>org.slf4j</groupId>
412 <artifactId>slf4j-log4j12</artifactId>
415 <artifactId>apache-log4j-extras</artifactId>
416 <groupId>log4j</groupId>
421 <groupId>org.onap.policy.drools-applications</groupId>
422 <artifactId>aai</artifactId>
423 <version>1.1.0</version>
426 <artifactId>log4j</artifactId>
427 <groupId>log4j</groupId>
430 <groupId>org.slf4j</groupId>
431 <artifactId>slf4j-log4j12</artifactId>
434 <artifactId>apache-log4j-extras</artifactId>
435 <groupId>log4j</groupId>
440 <groupId>com.fasterxml.jackson.core</groupId>
441 <artifactId>jackson-databind</artifactId>
444 <groupId>com.fasterxml.jackson.dataformat</groupId>
445 <artifactId>jackson-dataformat-yaml</artifactId>
448 <groupId>org.apache.commons</groupId>
449 <artifactId>commons-csv</artifactId>
450 <version>1.3</version>
453 <groupId>com.sun.faces</groupId>
454 <artifactId>jsf-api</artifactId>
455 <version>2.1.7</version>
458 <groupId>com.sun.faces</groupId>
459 <artifactId>jsf-impl</artifactId>
460 <version>2.1.7</version>
462 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
464 <groupId>org.codehaus.plexus</groupId>
465 <artifactId>plexus-utils</artifactId>
466 <version>3.0.24</version>
469 <groupId>commons-fileupload</groupId>
470 <artifactId>commons-fileupload</artifactId>
471 <version>1.3.3</version>
474 <groupId>org.jboss.spec.javax.ws.rs</groupId>
475 <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
476 <version>1.0.1.Final</version>
478 <!-- Remove the MYSQL connector and replace it by Mariadb -->
480 <groupId>org.mariadb.jdbc</groupId>
481 <artifactId>mariadb-java-client</artifactId>
482 <version>2.2.1</version>
484 <!-- For SDC Controller -->
486 <groupId>org.openecomp.sdc.sdc-distribution-client</groupId>
487 <artifactId>sdc-distribution-client</artifactId>
488 <version>1.2.3</version>
493 <finalName>clamp</finalName>
497 <directory>src/test/resources</directory>
499 <exclude>**/*.jks</exclude>
501 <filtering>true</filtering>
504 <directory>src/test/resources/https</directory>
506 <include>**.jks</include>
508 <filtering>false</filtering>
509 <targetPath>https</targetPath>
514 <directory>src/main/resources</directory>
515 <filtering>true</filtering>
518 <directory>src/main/docker</directory>
520 <include>**/*</include>
522 <filtering>true</filtering>
528 <groupId>org.codehaus.groovy.maven</groupId>
529 <artifactId>gmaven-plugin</artifactId>
530 <version>1.0</version>
533 <phase>validate</phase>
538 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
544 <groupId>org.apache.maven.plugins</groupId>
545 <artifactId>maven-jar-plugin</artifactId>
546 <version>3.0.2</version>
549 <id>jar-with-only-classes</id>
550 <phase>package</phase>
555 <classifier>classes</classifier>
557 <include>org/**</include>
564 <groupId>org.codehaus.mojo</groupId>
565 <artifactId>build-helper-maven-plugin</artifactId>
566 <version>3.0.0</version>
570 <goal>attach-artifact</goal>
572 <phase>package</phase>
576 <file>${project.build.directory}/clamp-classes.jar</file>
578 <classifier>classes</classifier>
587 <groupId>org.springframework.boot</groupId>
588 <artifactId>spring-boot-maven-plugin</artifactId>
589 <version>${springboot.version}</version>
593 <goal>repackage</goal>
595 <phase>package</phase>
600 <groupId>org.sonatype.plugins</groupId>
601 <artifactId>nexus-staging-maven-plugin</artifactId>
602 <version>1.6.7</version>
603 <extensions>true</extensions>
605 <nexusUrl>https://nexus.onap.org</nexusUrl>
606 <stagingProfileId>176c31dfe190a</stagingProfileId>
607 <serverId>ecomp-staging</serverId>
608 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
612 <groupId>com.spotify</groupId>
613 <artifactId>docker-maven-plugin</artifactId>
614 <version>1.0.0</version>
616 <imageName>onap/clamp</imageName>
617 <dockerDirectory>src/main/docker</dockerDirectory>
618 <serverId>docker-hub</serverId>
620 <imageTag>latest</imageTag>
621 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
622 <imageTag>${project.docker.latesttag.version}</imageTag>
624 <forceTags>true</forceTags>
627 <targetPath>/</targetPath>
628 <directory>${project.build.directory}</directory>
629 <include>${project.build.finalName}.jar</include>
632 <targetPath>/</targetPath>
633 <directory>${project.build.directory}</directory>
634 <include>etc/config/**</include>
637 <targetPath>/</targetPath>
638 <directory>${project.build.directory}</directory>
639 <include>etc/keystore/**</include>
646 <phase>package</phase>
651 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
653 <http_proxy>${env.HTTP_PROXY}</http_proxy>
654 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
660 <id>tag-image-latest-timestamp</id>
661 <phase>package</phase>
666 <image>onap/clamp</image>
667 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
668 <skipDockerTag>${skip.docker.push}</skipDockerTag>
672 <id>push-image-latest-timestamp</id>
673 <phase>deploy</phase>
678 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
679 <skipDockerPush>${skip.docker.push}</skipDockerPush>
683 <id>tag-image-latest</id>
684 <phase>package</phase>
689 <image>onap/clamp</image>
690 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
691 <skipDockerTag>${skip.docker.push}</skipDockerTag>
695 <id>push-image-latest</id>
696 <phase>deploy</phase>
701 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
702 <skipDockerPush>${skip.docker.push}</skipDockerPush>
707 <phase>package</phase>
712 <image>onap/clamp</image>
713 <newName>${docker.push.registry}/onap/clamp:latest</newName>
714 <skipDockerTag>${skip.docker.push}</skipDockerTag>
719 <phase>deploy</phase>
724 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
725 <skipDockerPush>${skip.docker.push}</skipDockerPush>
731 <groupId>org.apache.maven.plugins</groupId>
732 <artifactId>maven-surefire-plugin</artifactId>
733 <version>2.19.1</version>
735 <forkCount>1</forkCount>
736 <reuseForks>false</reuseForks>
741 <groupId>org.apache.maven.plugins</groupId>
742 <artifactId>maven-failsafe-plugin</artifactId>
743 <version>2.16</version>
747 <id>integration-tests</id>
749 <goal>integration-test</goal>
754 <include>**/*ItCase.java</include>
756 <forkCount>1</forkCount>
757 <reuseForks>false</reuseForks>
764 <groupId>io.fabric8</groupId>
765 <artifactId>docker-maven-plugin</artifactId>
766 <version>0.16.5</version>
768 <verbose>true</verbose>
769 <apiVersion>1.23</apiVersion>
772 <name>mariadb:10.1.11</name>
773 <alias>mariadb</alias>
776 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
778 <hostname>mariadb</hostname>
781 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
782 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
786 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
790 <port>${docker.mariadb.port.host}:3306</port>
795 <name>python:2-slim</name>
796 <alias>python</alias>
798 <hostname>python</hostname>
801 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
802 <volume>${project.basedir}/src/test/resources/http-cache/sdc-example/:/usr/src/http-cache-app/data-cache</volume>
815 <port>${docker.http-cache.port.host}:8080</port>
817 <workingDir>/usr/src/http-cache-app</workingDir>
819 <shell>./start_http_cache.sh ${http.proxy}</shell>
824 <skip>${skipITs}</skip>
829 <id>docker-start-for-it</id>
830 <phase>pre-integration-test</phase>
835 <skip>${skipITs}</skip>
839 <id>docker-stop-for-it</id>
840 <phase>post-integration-test</phase>
845 <skip>${skipITs}</skip>
852 <groupId>org.jacoco</groupId>
853 <artifactId>jacoco-maven-plugin</artifactId>
854 <version>0.7.7.201606060606</version>
856 <dumpOnExit>true</dumpOnExit>
858 <include>org.onap.clamp.*</include>
863 <id>pre-unit-test</id>
865 <goal>prepare-agent</goal>
868 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
869 <!-- <append>true</append> -->
873 <id>pre-integration-test</id>
874 <phase>pre-integration-test</phase>
876 <goal>prepare-agent</goal>
879 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
880 <!-- <append>true</append> -->
887 <phase>post-integration-test</phase>
890 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
891 <directory>${project.build.directory}/coverage-reports</directory>
893 <include>*.exec</include>
897 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
903 <!-- This plugin will be useful when we will have multi-modules project -->
905 <groupId>org.codehaus.mojo</groupId>
906 <artifactId>versions-maven-plugin</artifactId>
907 <version>1.3.1</version>
915 <skip.staging.artifacts>true</skip.staging.artifacts>
916 <skip.docker.build>false</skip.docker.build>
917 <skip.docker.tag>false</skip.docker.tag>
918 <skip.docker.push>false</skip.docker.push>