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 <swagger.jaxrs2.version>2.0.0-rc4</swagger.jaxrs2.version>
74 <guava.version>20.0</guava.version>
75 <eelf.core.version>1.0.0</eelf.core.version>
76 <camel.version>2.20.1</camel.version>
77 <springboot.version>1.5.10.RELEASE</springboot.version>
79 <sonar.language>java</sonar.language>
80 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
81 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
82 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
83 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
84 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
85 <sonar.projectVersion>${project.version}</sonar.projectVersion>
87 <docker.push.registry>localhost:5000</docker.push.registry>
88 <skip.docker.build>true</skip.docker.build>
89 <skip.docker.push>true</skip.docker.push>
90 <skip.staging.artifacts>false</skip.staging.artifacts>
91 <http.proxy></http.proxy>
95 <distributionManagement>
97 <id>ecomp-releases</id>
98 <name>Clamp Release Repository</name>
99 <url>https://nexus.onap.org/content/repositories/releases/</url>
102 <id>ecomp-snapshots</id>
103 <name>Clamp Snapshot Repository</name>
104 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
105 </snapshotRepository>
108 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
110 </distributionManagement>
115 <name>Maven 2 repository 2</name>
116 <url>http://repo2.maven.org/maven2/</url>
119 <id>ecomp-releases</id>
120 <name>ONAP Release Repository</name>
121 <url>https://nexus.onap.org/content/repositories/releases/</url>
124 <id>ecomp-staging</id>
125 <name>ONAP Staging Repository</name>
126 <url>https://nexus.onap.org/content/repositories/staging/</url>
129 <id>ecomp-snapshots</id>
130 <name>ONAP Snapshot Repository</name>
131 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
133 <enabled>true</enabled>
136 <enabled>false</enabled>
141 <name>Spring repo</name>
142 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
145 <id>repository.jboss.org-public</id>
146 <name>JBoss.org Maven repository</name>
147 <url>https://repository.jboss.org/nexus/content/groups/public</url>
151 <dependencyManagement>
153 <!-- Spring Boot BOM -->
155 <groupId>org.springframework.boot</groupId>
156 <artifactId>spring-boot-dependencies</artifactId>
157 <version>${springboot.version}</version>
159 <scope>import</scope>
163 <groupId>org.apache.camel</groupId>
164 <artifactId>camel-spring-boot-dependencies</artifactId>
165 <version>${camel.version}</version>
167 <scope>import</scope>
170 </dependencyManagement>
173 <!-- Swagger requires at least v20 and policy is bringing version 14 -->
175 <groupId>com.google.guava</groupId>
176 <artifactId>guava</artifactId>
177 <version>${guava.version}</version>
180 <groupId>io.swagger.core.v3</groupId>
181 <artifactId>swagger-jaxrs2</artifactId>
182 <version>${swagger.jaxrs2.version}</version>
185 <groupId>com.att.eelf</groupId>
186 <artifactId>eelf-core</artifactId>
187 <version>${eelf.core.version}</version>
191 <groupId>org.apache.camel</groupId>
192 <artifactId>camel-spring-boot-starter</artifactId>
195 <groupId>org.apache.camel</groupId>
196 <artifactId>camel-jaxb-starter</artifactId>
199 <groupId>org.apache.camel</groupId>
200 <artifactId>camel-servlet-starter</artifactId>
202 <!-- Spring famework -->
204 <groupId>org.springframework.boot</groupId>
205 <artifactId>spring-boot-starter-web</artifactId>
208 <groupId>org.springframework.boot</groupId>
209 <artifactId>spring-boot-starter-tomcat</artifactId>
212 <groupId>com.paypal.springboot</groupId>
213 <artifactId>resteasy-spring-boot-starter</artifactId>
214 <version>2.3.4-RELEASE</version>
217 <groupId>org.springframework</groupId>
218 <artifactId>spring-jdbc</artifactId>
221 <groupId>org.springframework.boot</groupId>
222 <artifactId>spring-boot-starter-security</artifactId>
225 <groupId>org.springframework.boot</groupId>
226 <artifactId>spring-boot-starter-actuator</artifactId>
229 <groupId>org.springframework.boot</groupId>
230 <artifactId>spring-boot-starter-test</artifactId>
234 <groupId>com.vaadin.external.google</groupId>
235 <artifactId>android-json</artifactId>
239 <!-- Others dependencies -->
241 <groupId>ch.qos.logback</groupId>
242 <artifactId>logback-core</artifactId>
243 <version>1.2.3</version>
246 <groupId>ch.qos.logback</groupId>
247 <artifactId>logback-classic</artifactId>
248 <version>1.2.3</version>
251 <groupId>commons-dbcp</groupId>
252 <artifactId>commons-dbcp</artifactId>
253 <version>1.4</version>
256 <groupId>commons-io</groupId>
257 <artifactId>commons-io</artifactId>
258 <version>2.6</version>
261 <groupId>com.googlecode.json-simple</groupId>
262 <artifactId>json-simple</artifactId>
265 <groupId>org.apache.commons</groupId>
266 <artifactId>commons-vfs2</artifactId>
267 <version>2.2</version>
270 <groupId>joda-time</groupId>
271 <artifactId>joda-time</artifactId>
274 <groupId>org.slf4j</groupId>
275 <artifactId>slf4j-api</artifactId>
278 <groupId>javax.ws.rs</groupId>
279 <artifactId>javax.ws.rs-api</artifactId>
280 <version>2.0</version>
283 <groupId>junit</groupId>
284 <artifactId>junit</artifactId>
287 <groupId>com.fasterxml.jackson.core</groupId>
288 <artifactId>jackson-core</artifactId>
291 <groupId>com.fasterxml.jackson.core</groupId>
292 <artifactId>jackson-databind</artifactId>
295 <groupId>javax.transaction</groupId>
296 <artifactId>jta</artifactId>
297 <version>1.1</version>
300 <groupId>javax.persistence</groupId>
301 <artifactId>persistence-api</artifactId>
302 <version>1.0.2</version>
305 <groupId>org.hibernate</groupId>
306 <artifactId>hibernate-annotations</artifactId>
307 <version>3.5.6-Final</version>
310 <groupId>dom4j</groupId>
311 <artifactId>dom4j</artifactId>
315 <groupId>org.onap.policy.engine</groupId>
316 <artifactId>PolicyEngineAPI</artifactId>
317 <version>1.1.0</version>
320 <groupId>com.google.guava</groupId>
321 <artifactId>guava</artifactId>
324 <artifactId>log4j</artifactId>
325 <groupId>log4j</groupId>
328 <groupId>org.slf4j</groupId>
329 <artifactId>slf4j-log4j12</artifactId>
332 <artifactId>apache-log4j-extras</artifactId>
333 <groupId>log4j</groupId>
336 <artifactId>jackson-databind</artifactId>
337 <groupId>com.fasterxml.jackson.core</groupId>
340 <groupId>mysql</groupId>
341 <artifactId>mysql-connector-java</artifactId>
344 <groupId>commons-io</groupId>
345 <artifactId>commons-io</artifactId>
350 <groupId>org.onap.policy.common</groupId>
351 <artifactId>ONAP-Logging</artifactId>
352 <version>1.1.0</version>
355 <artifactId>log4j</artifactId>
356 <groupId>log4j</groupId>
359 <groupId>org.slf4j</groupId>
360 <artifactId>slf4j-log4j12</artifactId>
363 <artifactId>apache-log4j-extras</artifactId>
364 <groupId>log4j</groupId>
369 <groupId>org.onap.policy.engine</groupId>
370 <artifactId>PolicyEngineUtils</artifactId>
371 <version>1.1.0</version>
374 <artifactId>log4j</artifactId>
375 <groupId>log4j</groupId>
378 <groupId>org.slf4j</groupId>
379 <artifactId>slf4j-log4j12</artifactId>
382 <artifactId>apache-log4j-extras</artifactId>
383 <groupId>log4j</groupId>
386 <groupId>mysql</groupId>
387 <artifactId>mysql-connector-java</artifactId>
390 <groupId>org.mariadb.jdbc</groupId>
391 <artifactId>mariadb-java-client</artifactId>
394 <groupId>com.att.nsa</groupId>
395 <artifactId>dmaapClient</artifactId>
400 <groupId>org.onap.policy.drools-applications</groupId>
401 <artifactId>policy-yaml</artifactId>
402 <version>1.1.0</version>
405 <artifactId>log4j</artifactId>
406 <groupId>log4j</groupId>
409 <groupId>org.slf4j</groupId>
410 <artifactId>slf4j-log4j12</artifactId>
413 <artifactId>apache-log4j-extras</artifactId>
414 <groupId>log4j</groupId>
419 <groupId>org.onap.policy.drools-applications</groupId>
420 <artifactId>sdc</artifactId>
421 <version>1.1.0</version>
424 <artifactId>log4j</artifactId>
425 <groupId>log4j</groupId>
428 <groupId>org.slf4j</groupId>
429 <artifactId>slf4j-log4j12</artifactId>
432 <artifactId>apache-log4j-extras</artifactId>
433 <groupId>log4j</groupId>
438 <groupId>org.onap.policy.drools-applications</groupId>
439 <artifactId>aai</artifactId>
440 <version>1.1.0</version>
443 <artifactId>log4j</artifactId>
444 <groupId>log4j</groupId>
447 <groupId>org.slf4j</groupId>
448 <artifactId>slf4j-log4j12</artifactId>
451 <artifactId>apache-log4j-extras</artifactId>
452 <groupId>log4j</groupId>
457 <groupId>com.fasterxml.jackson.core</groupId>
458 <artifactId>jackson-databind</artifactId>
461 <groupId>com.fasterxml.jackson.dataformat</groupId>
462 <artifactId>jackson-dataformat-yaml</artifactId>
465 <groupId>org.apache.commons</groupId>
466 <artifactId>commons-csv</artifactId>
467 <version>1.3</version>
470 <groupId>com.sun.faces</groupId>
471 <artifactId>jsf-api</artifactId>
472 <version>2.1.7</version>
475 <groupId>com.sun.faces</groupId>
476 <artifactId>jsf-impl</artifactId>
477 <version>2.1.7</version>
479 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
481 <groupId>org.codehaus.plexus</groupId>
482 <artifactId>plexus-utils</artifactId>
483 <version>3.0.24</version>
486 <groupId>commons-fileupload</groupId>
487 <artifactId>commons-fileupload</artifactId>
488 <version>1.3.3</version>
491 <groupId>org.jboss.spec.javax.ws.rs</groupId>
492 <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
493 <version>1.0.1.Final</version>
495 <!-- Remove the MYSQL connector and replace it by Mariadb -->
497 <groupId>org.mariadb.jdbc</groupId>
498 <artifactId>mariadb-java-client</artifactId>
499 <version>2.2.1</version>
501 <!-- For SDC Controller -->
503 <groupId>org.openecomp.sdc.sdc-distribution-client</groupId>
504 <artifactId>sdc-distribution-client</artifactId>
505 <version>1.2.2</version>
508 <groupId>org.openecomp.sdc.sdc-tosca</groupId>
509 <artifactId>sdc-tosca</artifactId>
510 <version>1.2.2</version>
517 <finalName>clamp</finalName>
521 <directory>src/test/resources</directory>
523 <exclude>**/*.jks</exclude>
524 <exclude>**/*.csar</exclude>
526 <filtering>true</filtering>
529 <directory>src/test/resources/https</directory>
531 <include>**.jks</include>
533 <filtering>false</filtering>
534 <targetPath>https</targetPath>
537 <directory>src/test/resources/example/sdc</directory>
539 <include>**.csar</include>
541 <filtering>false</filtering>
542 <targetPath>example/sdc</targetPath>
547 <directory>src/main/resources</directory>
548 <filtering>true</filtering>
551 <directory>src/main/docker</directory>
553 <include>**/*</include>
555 <filtering>true</filtering>
561 <groupId>org.codehaus.groovy.maven</groupId>
562 <artifactId>gmaven-plugin</artifactId>
563 <version>1.0</version>
566 <phase>validate</phase>
571 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
577 <groupId>org.apache.maven.plugins</groupId>
578 <artifactId>maven-jar-plugin</artifactId>
579 <version>3.0.2</version>
582 <id>jar-with-only-classes</id>
583 <phase>package</phase>
588 <classifier>classes</classifier>
590 <include>org/**</include>
597 <groupId>org.codehaus.mojo</groupId>
598 <artifactId>build-helper-maven-plugin</artifactId>
599 <version>3.0.0</version>
603 <goal>attach-artifact</goal>
605 <phase>package</phase>
609 <file>${project.build.directory}/clamp-classes.jar</file>
611 <classifier>classes</classifier>
620 <groupId>org.springframework.boot</groupId>
621 <artifactId>spring-boot-maven-plugin</artifactId>
622 <version>${springboot.version}</version>
626 <goal>repackage</goal>
628 <phase>package</phase>
633 <groupId>org.sonatype.plugins</groupId>
634 <artifactId>nexus-staging-maven-plugin</artifactId>
635 <version>1.6.7</version>
636 <extensions>true</extensions>
638 <nexusUrl>https://nexus.onap.org</nexusUrl>
639 <stagingProfileId>176c31dfe190a</stagingProfileId>
640 <serverId>ecomp-staging</serverId>
641 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
645 <groupId>com.spotify</groupId>
646 <artifactId>docker-maven-plugin</artifactId>
647 <version>1.0.0</version>
649 <imageName>onap/clamp</imageName>
650 <dockerDirectory>src/main/docker</dockerDirectory>
651 <serverId>docker-hub</serverId>
653 <imageTag>latest</imageTag>
654 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
655 <imageTag>${project.docker.latesttag.version}</imageTag>
657 <forceTags>true</forceTags>
660 <targetPath>/</targetPath>
661 <directory>${project.build.directory}</directory>
662 <include>${project.build.finalName}.jar</include>
665 <targetPath>/</targetPath>
666 <directory>${project.build.directory}</directory>
667 <include>etc/config/**</include>
670 <targetPath>/</targetPath>
671 <directory>${project.build.directory}</directory>
672 <include>etc/keystore/**</include>
679 <phase>package</phase>
684 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
686 <http_proxy>${env.HTTP_PROXY}</http_proxy>
687 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
693 <id>tag-image-latest-timestamp</id>
694 <phase>package</phase>
699 <image>onap/clamp</image>
700 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
701 <skipDockerTag>${skip.docker.push}</skipDockerTag>
705 <id>push-image-latest-timestamp</id>
706 <phase>deploy</phase>
711 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
712 <skipDockerPush>${skip.docker.push}</skipDockerPush>
716 <id>tag-image-latest</id>
717 <phase>package</phase>
722 <image>onap/clamp</image>
723 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
724 <skipDockerTag>${skip.docker.push}</skipDockerTag>
728 <id>push-image-latest</id>
729 <phase>deploy</phase>
734 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
735 <skipDockerPush>${skip.docker.push}</skipDockerPush>
740 <phase>package</phase>
745 <image>onap/clamp</image>
746 <newName>${docker.push.registry}/onap/clamp:latest</newName>
747 <skipDockerTag>${skip.docker.push}</skipDockerTag>
752 <phase>deploy</phase>
757 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
758 <skipDockerPush>${skip.docker.push}</skipDockerPush>
764 <groupId>org.apache.maven.plugins</groupId>
765 <artifactId>maven-surefire-plugin</artifactId>
766 <version>2.19.1</version>
768 <forkCount>1</forkCount>
769 <reuseForks>false</reuseForks>
774 <groupId>org.apache.maven.plugins</groupId>
775 <artifactId>maven-failsafe-plugin</artifactId>
776 <version>2.16</version>
780 <id>integration-tests</id>
782 <goal>integration-test</goal>
787 <include>**/*ItCase.java</include>
789 <forkCount>1</forkCount>
790 <reuseForks>false</reuseForks>
797 <groupId>io.fabric8</groupId>
798 <artifactId>docker-maven-plugin</artifactId>
799 <version>0.16.5</version>
801 <verbose>true</verbose>
802 <apiVersion>1.23</apiVersion>
805 <name>mariadb:10.1.11</name>
806 <alias>mariadb</alias>
809 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
811 <hostname>mariadb</hostname>
814 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
815 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
819 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
823 <port>${docker.mariadb.port.host}:3306</port>
828 <name>python:2-slim</name>
829 <alias>python</alias>
831 <hostname>python</hostname>
834 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
835 <volume>${project.basedir}/src/test/resources/http-cache/sdc-example/:/usr/src/http-cache-app/data-cache</volume>
848 <port>${docker.http-cache.port.host}:8080</port>
850 <workingDir>/usr/src/http-cache-app</workingDir>
852 <shell>./start_http_cache.sh ${http.proxy}</shell>
857 <skip>${skipITs}</skip>
862 <id>docker-start-for-it</id>
863 <phase>pre-integration-test</phase>
868 <skip>${skipITs}</skip>
872 <id>docker-stop-for-it</id>
873 <phase>post-integration-test</phase>
878 <skip>${skipITs}</skip>
885 <groupId>org.jacoco</groupId>
886 <artifactId>jacoco-maven-plugin</artifactId>
887 <version>0.7.7.201606060606</version>
889 <dumpOnExit>true</dumpOnExit>
891 <include>org.onap.clamp.*</include>
896 <id>pre-unit-test</id>
898 <goal>prepare-agent</goal>
901 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
902 <!-- <append>true</append> -->
906 <id>pre-integration-test</id>
907 <phase>pre-integration-test</phase>
909 <goal>prepare-agent</goal>
912 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
913 <!-- <append>true</append> -->
920 <phase>post-integration-test</phase>
923 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
924 <directory>${project.build.directory}/coverage-reports</directory>
926 <include>*.exec</include>
930 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
936 <!-- This plugin will be useful when we will have multi-modules project -->
938 <groupId>org.codehaus.mojo</groupId>
939 <artifactId>versions-maven-plugin</artifactId>
940 <version>1.3.1</version>
948 <skip.staging.artifacts>true</skip.staging.artifacts>
949 <skip.docker.build>false</skip.docker.build>
950 <skip.docker.tag>false</skip.docker.tag>
951 <skip.docker.push>false</skip.docker.push>