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>
384 <groupId>org.onap.policy.drools-applications</groupId>
385 <artifactId>policy-yaml</artifactId>
386 <version>1.1.0</version>
389 <artifactId>log4j</artifactId>
390 <groupId>log4j</groupId>
393 <groupId>org.slf4j</groupId>
394 <artifactId>slf4j-log4j12</artifactId>
397 <artifactId>apache-log4j-extras</artifactId>
398 <groupId>log4j</groupId>
403 <groupId>org.onap.policy.drools-applications</groupId>
404 <artifactId>sdc</artifactId>
405 <version>1.1.0</version>
408 <artifactId>log4j</artifactId>
409 <groupId>log4j</groupId>
412 <groupId>org.slf4j</groupId>
413 <artifactId>slf4j-log4j12</artifactId>
416 <artifactId>apache-log4j-extras</artifactId>
417 <groupId>log4j</groupId>
422 <groupId>org.onap.policy.drools-applications</groupId>
423 <artifactId>aai</artifactId>
424 <version>1.1.0</version>
427 <artifactId>log4j</artifactId>
428 <groupId>log4j</groupId>
431 <groupId>org.slf4j</groupId>
432 <artifactId>slf4j-log4j12</artifactId>
435 <artifactId>apache-log4j-extras</artifactId>
436 <groupId>log4j</groupId>
441 <groupId>com.fasterxml.jackson.core</groupId>
442 <artifactId>jackson-databind</artifactId>
445 <groupId>com.fasterxml.jackson.dataformat</groupId>
446 <artifactId>jackson-dataformat-yaml</artifactId>
449 <groupId>org.apache.commons</groupId>
450 <artifactId>commons-csv</artifactId>
451 <version>1.3</version>
454 <groupId>com.sun.faces</groupId>
455 <artifactId>jsf-api</artifactId>
456 <version>2.1.7</version>
459 <groupId>com.sun.faces</groupId>
460 <artifactId>jsf-impl</artifactId>
461 <version>2.1.7</version>
463 <!-- Remove the MYSQL connector and replace it by Mariadb -->
465 <groupId>org.mariadb.jdbc</groupId>
466 <artifactId>mariadb-java-client</artifactId>
467 <version>2.1.1</version>
472 <finalName>clamp</finalName>
476 <directory>src/test/resources</directory>
478 <exclude>**/*.jks</exclude>
480 <filtering>true</filtering>
483 <directory>src/test/resources/https</directory>
485 <include>**.jks</include>
487 <filtering>false</filtering>
488 <targetPath>https</targetPath>
493 <directory>src/main/resources</directory>
494 <filtering>true</filtering>
497 <directory>src/main/docker</directory>
499 <include>**/*</include>
501 <filtering>true</filtering>
507 <groupId>org.codehaus.groovy.maven</groupId>
508 <artifactId>gmaven-plugin</artifactId>
509 <version>1.0</version>
512 <phase>validate</phase>
517 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
523 <groupId>org.apache.maven.plugins</groupId>
524 <artifactId>maven-jar-plugin</artifactId>
525 <version>3.0.2</version>
528 <id>jar-with-only-classes</id>
529 <phase>package</phase>
534 <classifier>classes</classifier>
536 <include>org/**</include>
543 <groupId>org.codehaus.mojo</groupId>
544 <artifactId>build-helper-maven-plugin</artifactId>
545 <version>3.0.0</version>
549 <goal>attach-artifact</goal>
551 <phase>package</phase>
555 <file>${project.build.directory}/clamp-classes.jar</file>
557 <classifier>classes</classifier>
566 <groupId>org.springframework.boot</groupId>
567 <artifactId>spring-boot-maven-plugin</artifactId>
568 <version>${springboot.version}</version>
572 <goal>repackage</goal>
574 <phase>package</phase>
579 <groupId>org.sonatype.plugins</groupId>
580 <artifactId>nexus-staging-maven-plugin</artifactId>
581 <version>1.6.7</version>
582 <extensions>true</extensions>
584 <nexusUrl>https://nexus.onap.org</nexusUrl>
585 <stagingProfileId>176c31dfe190a</stagingProfileId>
586 <serverId>ecomp-staging</serverId>
587 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
591 <groupId>com.spotify</groupId>
592 <artifactId>docker-maven-plugin</artifactId>
593 <version>1.0.0</version>
595 <imageName>onap/clamp</imageName>
596 <dockerDirectory>src/main/docker</dockerDirectory>
597 <serverId>docker-hub</serverId>
599 <imageTag>latest</imageTag>
600 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
601 <imageTag>${project.docker.latesttag.version}</imageTag>
603 <forceTags>true</forceTags>
606 <targetPath>/</targetPath>
607 <directory>${project.build.directory}</directory>
608 <include>${project.build.finalName}.jar</include>
611 <targetPath>/</targetPath>
612 <directory>${project.build.directory}</directory>
613 <include>etc/config/**</include>
616 <targetPath>/</targetPath>
617 <directory>${project.build.directory}</directory>
618 <include>etc/keystore/**</include>
625 <phase>package</phase>
630 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
632 <http_proxy>${env.HTTP_PROXY}</http_proxy>
633 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
639 <id>tag-image-latest-timestamp</id>
640 <phase>package</phase>
645 <image>onap/clamp</image>
646 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
647 <skipDockerTag>${skip.docker.push}</skipDockerTag>
651 <id>push-image-latest-timestamp</id>
652 <phase>deploy</phase>
657 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
658 <skipDockerPush>${skip.docker.push}</skipDockerPush>
662 <id>tag-image-latest</id>
663 <phase>package</phase>
668 <image>onap/clamp</image>
669 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
670 <skipDockerTag>${skip.docker.push}</skipDockerTag>
674 <id>push-image-latest</id>
675 <phase>deploy</phase>
680 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
681 <skipDockerPush>${skip.docker.push}</skipDockerPush>
686 <phase>package</phase>
691 <image>onap/clamp</image>
692 <newName>${docker.push.registry}/onap/clamp:latest</newName>
693 <skipDockerTag>${skip.docker.push}</skipDockerTag>
698 <phase>deploy</phase>
703 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
704 <skipDockerPush>${skip.docker.push}</skipDockerPush>
710 <groupId>org.apache.maven.plugins</groupId>
711 <artifactId>maven-surefire-plugin</artifactId>
712 <version>2.19.1</version>
714 <forkCount>1</forkCount>
715 <reuseForks>false</reuseForks>
720 <groupId>org.apache.maven.plugins</groupId>
721 <artifactId>maven-failsafe-plugin</artifactId>
722 <version>2.16</version>
726 <id>integration-tests</id>
728 <goal>integration-test</goal>
733 <include>**/*ItCase.java</include>
735 <forkCount>1</forkCount>
736 <reuseForks>false</reuseForks>
743 <groupId>io.fabric8</groupId>
744 <artifactId>docker-maven-plugin</artifactId>
745 <version>0.16.5</version>
747 <verbose>true</verbose>
748 <apiVersion>1.23</apiVersion>
751 <name>mariadb:10.1.11</name>
752 <alias>mariadb</alias>
755 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
757 <hostname>mariadb</hostname>
760 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
761 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
765 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
769 <port>${docker.mariadb.port.host}:3306</port>
774 <name>python:2</name>
775 <alias>python</alias>
777 <hostname>python</hostname>
780 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
781 <volume>${project.basedir}/src/test/resources/http-cache/sdc-example/:/usr/src/http-cache-app/data-cache</volume>
794 <port>${docker.http-cache.port.host}:8080</port>
796 <workingDir>/usr/src/http-cache-app</workingDir>
798 <shell>./start_http_cache.sh ${http.proxy}</shell>
803 <skip>${skipITs}</skip>
808 <id>docker-start-for-it</id>
809 <phase>pre-integration-test</phase>
814 <skip>${skipITs}</skip>
818 <id>docker-stop-for-it</id>
819 <phase>post-integration-test</phase>
824 <skip>${skipITs}</skip>
831 <groupId>org.jacoco</groupId>
832 <artifactId>jacoco-maven-plugin</artifactId>
833 <version>0.7.7.201606060606</version>
835 <dumpOnExit>true</dumpOnExit>
837 <include>org.onap.clamp.*</include>
842 <id>pre-unit-test</id>
844 <goal>prepare-agent</goal>
847 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
848 <!-- <append>true</append> -->
852 <id>pre-integration-test</id>
853 <phase>pre-integration-test</phase>
855 <goal>prepare-agent</goal>
858 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
859 <!-- <append>true</append> -->
866 <phase>post-integration-test</phase>
869 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
870 <directory>${project.build.directory}/coverage-reports</directory>
872 <include>*.exec</include>
876 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
882 <!-- This plugin will be useful when we will have multi-modules project -->
884 <groupId>org.codehaus.mojo</groupId>
885 <artifactId>versions-maven-plugin</artifactId>
886 <version>1.3.1</version>
894 <skip.staging.artifacts>true</skip.staging.artifacts>
895 <skip.docker.build>false</skip.docker.build>
896 <skip.docker.tag>false</skip.docker.tag>
897 <skip.docker.push>false</skip.docker.push>