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</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 integration 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>8085</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>javax.transaction</groupId>
288 <artifactId>jta</artifactId>
289 <version>1.1</version>
292 <groupId>javax.persistence</groupId>
293 <artifactId>persistence-api</artifactId>
294 <version>1.0.2</version>
297 <groupId>org.hibernate</groupId>
298 <artifactId>hibernate-annotations</artifactId>
299 <version>3.5.6-Final</version>
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 <groupId>com.google.guava</groupId>
313 <artifactId>guava</artifactId>
316 <artifactId>log4j</artifactId>
317 <groupId>log4j</groupId>
320 <groupId>org.slf4j</groupId>
321 <artifactId>slf4j-log4j12</artifactId>
324 <artifactId>apache-log4j-extras</artifactId>
325 <groupId>log4j</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>org.apache.commons</groupId>
446 <artifactId>commons-csv</artifactId>
447 <version>1.3</version>
450 <groupId>com.sun.faces</groupId>
451 <artifactId>jsf-api</artifactId>
452 <version>2.1.7</version>
455 <groupId>com.sun.faces</groupId>
456 <artifactId>jsf-impl</artifactId>
457 <version>2.1.7</version>
459 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
461 <groupId>org.codehaus.plexus</groupId>
462 <artifactId>plexus-utils</artifactId>
463 <version>3.0.24</version>
466 <groupId>commons-fileupload</groupId>
467 <artifactId>commons-fileupload</artifactId>
468 <version>1.3.3</version>
471 <groupId>org.jboss.spec.javax.ws.rs</groupId>
472 <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
473 <version>1.0.1.Final</version>
475 <!-- Remove the MYSQL connector and replace it by Mariadb -->
477 <groupId>org.mariadb.jdbc</groupId>
478 <artifactId>mariadb-java-client</artifactId>
479 <version>2.2.1</version>
481 <!-- For SDC Controller -->
483 <groupId>org.openecomp.sdc.sdc-distribution-client</groupId>
484 <artifactId>sdc-distribution-client</artifactId>
485 <version>1.2.2</version>
488 <groupId>org.openecomp.sdc.sdc-tosca</groupId>
489 <artifactId>sdc-tosca</artifactId>
490 <version>1.2.2</version>
495 <finalName>clamp</finalName>
499 <directory>src/test/resources</directory>
501 <exclude>**/*.jks</exclude>
502 <exclude>**/*.csar</exclude>
504 <filtering>true</filtering>
507 <directory>src/test/resources/https</directory>
509 <include>**.jks</include>
511 <filtering>false</filtering>
512 <targetPath>https</targetPath>
515 <directory>src/test/resources/example/sdc</directory>
517 <include>**.csar</include>
519 <filtering>false</filtering>
520 <targetPath>example/sdc</targetPath>
525 <directory>src/main/resources</directory>
526 <filtering>true</filtering>
529 <directory>src/main/docker</directory>
531 <include>**/*</include>
533 <filtering>true</filtering>
539 <groupId>org.codehaus.groovy.maven</groupId>
540 <artifactId>gmaven-plugin</artifactId>
541 <version>1.0</version>
544 <phase>validate</phase>
549 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
555 <groupId>org.apache.maven.plugins</groupId>
556 <artifactId>maven-jar-plugin</artifactId>
557 <version>3.0.2</version>
560 <id>jar-with-only-classes</id>
561 <phase>package</phase>
566 <classifier>classes</classifier>
568 <include>org/**</include>
575 <groupId>org.codehaus.mojo</groupId>
576 <artifactId>build-helper-maven-plugin</artifactId>
577 <version>3.0.0</version>
581 <goal>attach-artifact</goal>
583 <phase>package</phase>
587 <file>${project.build.directory}/clamp-classes.jar</file>
589 <classifier>classes</classifier>
598 <groupId>org.springframework.boot</groupId>
599 <artifactId>spring-boot-maven-plugin</artifactId>
600 <version>${springboot.version}</version>
604 <goal>repackage</goal>
606 <phase>package</phase>
611 <groupId>org.sonatype.plugins</groupId>
612 <artifactId>nexus-staging-maven-plugin</artifactId>
613 <version>1.6.7</version>
614 <extensions>true</extensions>
616 <nexusUrl>https://nexus.onap.org</nexusUrl>
617 <stagingProfileId>176c31dfe190a</stagingProfileId>
618 <serverId>ecomp-staging</serverId>
619 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
623 <groupId>com.spotify</groupId>
624 <artifactId>docker-maven-plugin</artifactId>
625 <version>1.0.0</version>
627 <imageName>onap/clamp</imageName>
628 <dockerDirectory>src/main/docker</dockerDirectory>
629 <serverId>docker-hub</serverId>
631 <imageTag>latest</imageTag>
632 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
633 <imageTag>${project.docker.latesttag.version}</imageTag>
635 <forceTags>true</forceTags>
638 <targetPath>/</targetPath>
639 <directory>${project.build.directory}</directory>
640 <include>${project.build.finalName}.jar</include>
643 <targetPath>/</targetPath>
644 <directory>${project.build.directory}</directory>
645 <include>etc/config/**</include>
648 <targetPath>/</targetPath>
649 <directory>${project.build.directory}</directory>
650 <include>etc/keystore/**</include>
657 <phase>package</phase>
662 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
664 <http_proxy>${env.HTTP_PROXY}</http_proxy>
665 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
671 <id>tag-image-latest-timestamp</id>
672 <phase>package</phase>
677 <image>onap/clamp</image>
678 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
679 <skipDockerTag>${skip.docker.push}</skipDockerTag>
683 <id>push-image-latest-timestamp</id>
684 <phase>deploy</phase>
689 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
690 <skipDockerPush>${skip.docker.push}</skipDockerPush>
694 <id>tag-image-latest</id>
695 <phase>package</phase>
700 <image>onap/clamp</image>
701 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
702 <skipDockerTag>${skip.docker.push}</skipDockerTag>
706 <id>push-image-latest</id>
707 <phase>deploy</phase>
712 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
713 <skipDockerPush>${skip.docker.push}</skipDockerPush>
718 <phase>package</phase>
723 <image>onap/clamp</image>
724 <newName>${docker.push.registry}/onap/clamp:latest</newName>
725 <skipDockerTag>${skip.docker.push}</skipDockerTag>
730 <phase>deploy</phase>
735 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
736 <skipDockerPush>${skip.docker.push}</skipDockerPush>
742 <groupId>org.apache.maven.plugins</groupId>
743 <artifactId>maven-surefire-plugin</artifactId>
744 <version>2.19.1</version>
746 <forkCount>1</forkCount>
747 <reuseForks>false</reuseForks>
752 <groupId>org.apache.maven.plugins</groupId>
753 <artifactId>maven-failsafe-plugin</artifactId>
754 <version>2.16</version>
758 <id>integration-tests</id>
760 <goal>integration-test</goal>
765 <include>**/*ItCase.java</include>
767 <forkCount>1</forkCount>
768 <reuseForks>false</reuseForks>
775 <groupId>io.fabric8</groupId>
776 <artifactId>docker-maven-plugin</artifactId>
777 <version>0.16.5</version>
779 <verbose>true</verbose>
780 <apiVersion>1.23</apiVersion>
783 <name>mariadb:10.1.11</name>
784 <alias>mariadb</alias>
787 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
789 <hostname>mariadb</hostname>
792 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
793 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
797 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
801 <port>${docker.mariadb.port.host}:3306</port>
806 <name>python:2-slim</name>
807 <alias>python</alias>
809 <hostname>python</hostname>
812 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
813 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
826 <port>${docker.http-cache.port.host}:8080</port>
828 <workingDir>/usr/src/http-cache-app</workingDir>
830 <shell>./start_http_cache.sh ${http.proxy}</shell>
835 <skip>${skipITs}</skip>
840 <id>docker-start-for-it</id>
841 <phase>pre-integration-test</phase>
846 <skip>${skipITs}</skip>
850 <id>docker-stop-for-it</id>
851 <phase>post-integration-test</phase>
856 <skip>${skipITs}</skip>
863 <groupId>org.jacoco</groupId>
864 <artifactId>jacoco-maven-plugin</artifactId>
865 <version>0.7.7.201606060606</version>
867 <dumpOnExit>true</dumpOnExit>
869 <include>org.onap.clamp.*</include>
874 <id>pre-unit-test</id>
876 <goal>prepare-agent</goal>
879 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
880 <!-- <append>true</append> -->
884 <id>pre-integration-test</id>
885 <phase>pre-integration-test</phase>
887 <goal>prepare-agent</goal>
890 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
891 <!-- <append>true</append> -->
898 <phase>post-integration-test</phase>
901 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
902 <directory>${project.build.directory}/coverage-reports</directory>
904 <include>*.exec</include>
908 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
914 <!-- This plugin will be useful when we will have multi-modules project -->
916 <groupId>org.codehaus.mojo</groupId>
917 <artifactId>versions-maven-plugin</artifactId>
918 <version>1.3.1</version>
926 <skip.staging.artifacts>true</skip.staging.artifacts>
927 <skip.docker.build>false</skip.docker.build>
928 <skip.docker.tag>false</skip.docker.tag>
929 <skip.docker.push>false</skip.docker.push>