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.0</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>
296 <!-- <dependency> -->
297 <!-- <groupId>org.apache.geronimo.specs</groupId> -->
298 <!-- <artifactId>geronimo-jpa_2.0_spec</artifactId> -->
299 <!-- <version>1.1</version> -->
300 <!-- </dependency> -->
302 <groupId>dom4j</groupId>
303 <artifactId>dom4j</artifactId>
307 <groupId>org.onap.policy.engine</groupId>
308 <artifactId>PolicyEngineAPI</artifactId>
309 <version>1.1.0</version>
312 <artifactId>log4j</artifactId>
313 <groupId>log4j</groupId>
316 <groupId>org.slf4j</groupId>
317 <artifactId>slf4j-log4j12</artifactId>
320 <artifactId>apache-log4j-extras</artifactId>
321 <groupId>log4j</groupId>
324 <artifactId>jackson-databind</artifactId>
325 <groupId>com.fasterxml.jackson.core</groupId>
328 <groupId>mysql</groupId>
329 <artifactId>mysql-connector-java</artifactId>
332 <groupId>commons-io</groupId>
333 <artifactId>commons-io</artifactId>
338 <groupId>org.onap.policy.common</groupId>
339 <artifactId>ONAP-Logging</artifactId>
340 <version>1.1.0</version>
343 <artifactId>log4j</artifactId>
344 <groupId>log4j</groupId>
347 <groupId>org.slf4j</groupId>
348 <artifactId>slf4j-log4j12</artifactId>
351 <artifactId>apache-log4j-extras</artifactId>
352 <groupId>log4j</groupId>
357 <groupId>org.onap.policy.engine</groupId>
358 <artifactId>PolicyEngineUtils</artifactId>
359 <version>1.1.0</version>
362 <artifactId>log4j</artifactId>
363 <groupId>log4j</groupId>
366 <groupId>org.slf4j</groupId>
367 <artifactId>slf4j-log4j12</artifactId>
370 <artifactId>apache-log4j-extras</artifactId>
371 <groupId>log4j</groupId>
374 <groupId>mysql</groupId>
375 <artifactId>mysql-connector-java</artifactId>
378 <groupId>org.mariadb.jdbc</groupId>
379 <artifactId>mariadb-java-client</artifactId>
382 <groupId>com.att.nsa</groupId>
383 <artifactId>dmaapClient</artifactId>
388 <groupId>org.onap.policy.drools-applications</groupId>
389 <artifactId>policy-yaml</artifactId>
390 <version>1.1.0</version>
393 <artifactId>log4j</artifactId>
394 <groupId>log4j</groupId>
397 <groupId>org.slf4j</groupId>
398 <artifactId>slf4j-log4j12</artifactId>
401 <artifactId>apache-log4j-extras</artifactId>
402 <groupId>log4j</groupId>
407 <groupId>org.onap.policy.drools-applications</groupId>
408 <artifactId>sdc</artifactId>
409 <version>1.1.0</version>
412 <artifactId>log4j</artifactId>
413 <groupId>log4j</groupId>
416 <groupId>org.slf4j</groupId>
417 <artifactId>slf4j-log4j12</artifactId>
420 <artifactId>apache-log4j-extras</artifactId>
421 <groupId>log4j</groupId>
426 <groupId>org.onap.policy.drools-applications</groupId>
427 <artifactId>aai</artifactId>
428 <version>1.1.0</version>
431 <artifactId>log4j</artifactId>
432 <groupId>log4j</groupId>
435 <groupId>org.slf4j</groupId>
436 <artifactId>slf4j-log4j12</artifactId>
439 <artifactId>apache-log4j-extras</artifactId>
440 <groupId>log4j</groupId>
445 <groupId>com.fasterxml.jackson.core</groupId>
446 <artifactId>jackson-databind</artifactId>
449 <groupId>com.fasterxml.jackson.dataformat</groupId>
450 <artifactId>jackson-dataformat-yaml</artifactId>
453 <groupId>org.apache.commons</groupId>
454 <artifactId>commons-csv</artifactId>
455 <version>1.3</version>
458 <groupId>com.sun.faces</groupId>
459 <artifactId>jsf-api</artifactId>
460 <version>2.1.7</version>
463 <groupId>com.sun.faces</groupId>
464 <artifactId>jsf-impl</artifactId>
465 <version>2.1.7</version>
467 <!-- Remove the MYSQL connector and replace it by Mariadb -->
469 <groupId>org.mariadb.jdbc</groupId>
470 <artifactId>mariadb-java-client</artifactId>
471 <version>2.1.1</version>
476 <finalName>clamp</finalName>
480 <directory>src/test/resources</directory>
482 <exclude>**/*.jks</exclude>
484 <filtering>true</filtering>
487 <directory>src/test/resources/https</directory>
489 <include>**.jks</include>
491 <filtering>false</filtering>
492 <targetPath>https</targetPath>
497 <directory>src/main/resources</directory>
498 <filtering>true</filtering>
501 <directory>src/main/docker</directory>
503 <include>**/*</include>
505 <filtering>true</filtering>
511 <groupId>org.codehaus.groovy.maven</groupId>
512 <artifactId>gmaven-plugin</artifactId>
513 <version>1.0</version>
516 <phase>validate</phase>
521 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
527 <groupId>org.apache.maven.plugins</groupId>
528 <artifactId>maven-jar-plugin</artifactId>
529 <version>3.0.2</version>
532 <id>jar-with-only-classes</id>
533 <phase>package</phase>
538 <classifier>classes</classifier>
540 <include>org/**</include>
547 <groupId>org.codehaus.mojo</groupId>
548 <artifactId>build-helper-maven-plugin</artifactId>
549 <version>3.0.0</version>
553 <goal>attach-artifact</goal>
555 <phase>package</phase>
559 <file>${project.build.directory}/clamp-classes.jar</file>
561 <classifier>classes</classifier>
570 <groupId>org.springframework.boot</groupId>
571 <artifactId>spring-boot-maven-plugin</artifactId>
572 <version>${springboot.version}</version>
576 <goal>repackage</goal>
578 <phase>package</phase>
583 <groupId>org.sonatype.plugins</groupId>
584 <artifactId>nexus-staging-maven-plugin</artifactId>
585 <version>1.6.7</version>
586 <extensions>true</extensions>
588 <nexusUrl>https://nexus.onap.org</nexusUrl>
589 <stagingProfileId>176c31dfe190a</stagingProfileId>
590 <serverId>ecomp-staging</serverId>
591 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
595 <groupId>com.spotify</groupId>
596 <artifactId>docker-maven-plugin</artifactId>
597 <version>1.0.0</version>
599 <imageName>onap/clamp</imageName>
600 <dockerDirectory>src/main/docker</dockerDirectory>
601 <serverId>docker-hub</serverId>
603 <imageTag>latest</imageTag>
604 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
605 <imageTag>${project.docker.latesttag.version}</imageTag>
607 <forceTags>true</forceTags>
610 <targetPath>/</targetPath>
611 <directory>${project.build.directory}</directory>
612 <include>${project.build.finalName}.jar</include>
615 <targetPath>/</targetPath>
616 <directory>${project.build.directory}</directory>
617 <include>etc/config/**</include>
620 <targetPath>/</targetPath>
621 <directory>${project.build.directory}</directory>
622 <include>etc/keystore/**</include>
629 <phase>package</phase>
634 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
636 <http_proxy>${env.HTTP_PROXY}</http_proxy>
637 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
643 <id>tag-image-latest-timestamp</id>
644 <phase>package</phase>
649 <image>onap/clamp</image>
650 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
651 <skipDockerTag>${skip.docker.push}</skipDockerTag>
655 <id>push-image-latest-timestamp</id>
656 <phase>deploy</phase>
661 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
662 <skipDockerPush>${skip.docker.push}</skipDockerPush>
666 <id>tag-image-latest</id>
667 <phase>package</phase>
672 <image>onap/clamp</image>
673 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
674 <skipDockerTag>${skip.docker.push}</skipDockerTag>
678 <id>push-image-latest</id>
679 <phase>deploy</phase>
684 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
685 <skipDockerPush>${skip.docker.push}</skipDockerPush>
690 <phase>package</phase>
695 <image>onap/clamp</image>
696 <newName>${docker.push.registry}/onap/clamp:latest</newName>
697 <skipDockerTag>${skip.docker.push}</skipDockerTag>
702 <phase>deploy</phase>
707 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
708 <skipDockerPush>${skip.docker.push}</skipDockerPush>
714 <groupId>org.apache.maven.plugins</groupId>
715 <artifactId>maven-surefire-plugin</artifactId>
716 <version>2.19.1</version>
718 <forkCount>1</forkCount>
719 <reuseForks>false</reuseForks>
724 <groupId>org.apache.maven.plugins</groupId>
725 <artifactId>maven-failsafe-plugin</artifactId>
726 <version>2.16</version>
730 <id>integration-tests</id>
732 <goal>integration-test</goal>
737 <include>**/*ItCase.java</include>
739 <forkCount>1</forkCount>
740 <reuseForks>false</reuseForks>
747 <groupId>io.fabric8</groupId>
748 <artifactId>docker-maven-plugin</artifactId>
749 <version>0.16.5</version>
751 <verbose>true</verbose>
752 <apiVersion>1.23</apiVersion>
755 <name>mariadb:10.1.11</name>
756 <alias>mariadb</alias>
759 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
761 <hostname>mariadb</hostname>
764 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
765 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
769 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
773 <port>${docker.mariadb.port.host}:3306</port>
778 <name>python:2</name>
779 <alias>python</alias>
781 <hostname>python</hostname>
784 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
785 <volume>${project.basedir}/src/test/resources/http-cache/sdc-example/:/usr/src/http-cache-app/data-cache</volume>
798 <port>${docker.http-cache.port.host}:8080</port>
800 <workingDir>/usr/src/http-cache-app</workingDir>
802 <shell>./start_http_cache.sh ${http.proxy}</shell>
807 <skip>${skipITs}</skip>
812 <id>docker-start-for-it</id>
813 <phase>pre-integration-test</phase>
818 <skip>${skipITs}</skip>
822 <id>docker-stop-for-it</id>
823 <phase>post-integration-test</phase>
828 <skip>${skipITs}</skip>
835 <groupId>org.jacoco</groupId>
836 <artifactId>jacoco-maven-plugin</artifactId>
837 <version>0.7.7.201606060606</version>
839 <dumpOnExit>true</dumpOnExit>
841 <include>org.onap.clamp.*</include>
846 <id>pre-unit-test</id>
848 <goal>prepare-agent</goal>
851 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
852 <!-- <append>true</append> -->
856 <id>pre-integration-test</id>
857 <phase>pre-integration-test</phase>
859 <goal>prepare-agent</goal>
862 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
863 <!-- <append>true</append> -->
870 <phase>post-integration-test</phase>
873 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
874 <directory>${project.build.directory}/coverage-reports</directory>
876 <include>*.exec</include>
880 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
886 <!-- This plugin will be useful when we will have multi-modules project -->
888 <groupId>org.codehaus.mojo</groupId>
889 <artifactId>versions-maven-plugin</artifactId>
890 <version>1.3.1</version>
898 <skip.staging.artifacts>true</skip.staging.artifacts>
899 <skip.docker.build>false</skip.docker.build>
900 <skip.docker.tag>false</skip.docker.tag>
901 <skip.docker.push>false</skip.docker.push>