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.2</version>
491 <groupId>org.openecomp.sdc.sdc-tosca</groupId>
492 <artifactId>sdc-tosca</artifactId>
493 <version>1.2.2</version>
500 <finalName>clamp</finalName>
504 <directory>src/test/resources</directory>
506 <exclude>**/*.jks</exclude>
507 <exclude>**/*.csar</exclude>
509 <filtering>true</filtering>
512 <directory>src/test/resources/https</directory>
514 <include>**.jks</include>
516 <filtering>false</filtering>
517 <targetPath>https</targetPath>
520 <directory>src/test/resources/example/sdc</directory>
522 <include>**.csar</include>
524 <filtering>false</filtering>
525 <targetPath>example/sdc</targetPath>
530 <directory>src/main/resources</directory>
531 <filtering>true</filtering>
534 <directory>src/main/docker</directory>
536 <include>**/*</include>
538 <filtering>true</filtering>
544 <groupId>org.codehaus.groovy.maven</groupId>
545 <artifactId>gmaven-plugin</artifactId>
546 <version>1.0</version>
549 <phase>validate</phase>
554 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
560 <groupId>org.apache.maven.plugins</groupId>
561 <artifactId>maven-jar-plugin</artifactId>
562 <version>3.0.2</version>
565 <id>jar-with-only-classes</id>
566 <phase>package</phase>
571 <classifier>classes</classifier>
573 <include>org/**</include>
580 <groupId>org.codehaus.mojo</groupId>
581 <artifactId>build-helper-maven-plugin</artifactId>
582 <version>3.0.0</version>
586 <goal>attach-artifact</goal>
588 <phase>package</phase>
592 <file>${project.build.directory}/clamp-classes.jar</file>
594 <classifier>classes</classifier>
603 <groupId>org.springframework.boot</groupId>
604 <artifactId>spring-boot-maven-plugin</artifactId>
605 <version>${springboot.version}</version>
609 <goal>repackage</goal>
611 <phase>package</phase>
616 <groupId>org.sonatype.plugins</groupId>
617 <artifactId>nexus-staging-maven-plugin</artifactId>
618 <version>1.6.7</version>
619 <extensions>true</extensions>
621 <nexusUrl>https://nexus.onap.org</nexusUrl>
622 <stagingProfileId>176c31dfe190a</stagingProfileId>
623 <serverId>ecomp-staging</serverId>
624 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
628 <groupId>com.spotify</groupId>
629 <artifactId>docker-maven-plugin</artifactId>
630 <version>1.0.0</version>
632 <imageName>onap/clamp</imageName>
633 <dockerDirectory>src/main/docker</dockerDirectory>
634 <serverId>docker-hub</serverId>
636 <imageTag>latest</imageTag>
637 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
638 <imageTag>${project.docker.latesttag.version}</imageTag>
640 <forceTags>true</forceTags>
643 <targetPath>/</targetPath>
644 <directory>${project.build.directory}</directory>
645 <include>${project.build.finalName}.jar</include>
648 <targetPath>/</targetPath>
649 <directory>${project.build.directory}</directory>
650 <include>etc/config/**</include>
653 <targetPath>/</targetPath>
654 <directory>${project.build.directory}</directory>
655 <include>etc/keystore/**</include>
662 <phase>package</phase>
667 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
669 <http_proxy>${env.HTTP_PROXY}</http_proxy>
670 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
676 <id>tag-image-latest-timestamp</id>
677 <phase>package</phase>
682 <image>onap/clamp</image>
683 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
684 <skipDockerTag>${skip.docker.push}</skipDockerTag>
688 <id>push-image-latest-timestamp</id>
689 <phase>deploy</phase>
694 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
695 <skipDockerPush>${skip.docker.push}</skipDockerPush>
699 <id>tag-image-latest</id>
700 <phase>package</phase>
705 <image>onap/clamp</image>
706 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
707 <skipDockerTag>${skip.docker.push}</skipDockerTag>
711 <id>push-image-latest</id>
712 <phase>deploy</phase>
717 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
718 <skipDockerPush>${skip.docker.push}</skipDockerPush>
723 <phase>package</phase>
728 <image>onap/clamp</image>
729 <newName>${docker.push.registry}/onap/clamp:latest</newName>
730 <skipDockerTag>${skip.docker.push}</skipDockerTag>
735 <phase>deploy</phase>
740 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
741 <skipDockerPush>${skip.docker.push}</skipDockerPush>
747 <groupId>org.apache.maven.plugins</groupId>
748 <artifactId>maven-surefire-plugin</artifactId>
749 <version>2.19.1</version>
751 <forkCount>1</forkCount>
752 <reuseForks>false</reuseForks>
757 <groupId>org.apache.maven.plugins</groupId>
758 <artifactId>maven-failsafe-plugin</artifactId>
759 <version>2.16</version>
763 <id>integration-tests</id>
765 <goal>integration-test</goal>
770 <include>**/*ItCase.java</include>
772 <forkCount>1</forkCount>
773 <reuseForks>false</reuseForks>
780 <groupId>io.fabric8</groupId>
781 <artifactId>docker-maven-plugin</artifactId>
782 <version>0.16.5</version>
784 <verbose>true</verbose>
785 <apiVersion>1.23</apiVersion>
788 <name>mariadb:10.1.11</name>
789 <alias>mariadb</alias>
792 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
794 <hostname>mariadb</hostname>
797 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
798 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
802 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
806 <port>${docker.mariadb.port.host}:3306</port>
811 <name>python:2-slim</name>
812 <alias>python</alias>
814 <hostname>python</hostname>
817 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
818 <volume>${project.basedir}/src/test/resources/http-cache/sdc-example/:/usr/src/http-cache-app/data-cache</volume>
831 <port>${docker.http-cache.port.host}:8080</port>
833 <workingDir>/usr/src/http-cache-app</workingDir>
835 <shell>./start_http_cache.sh ${http.proxy}</shell>
840 <skip>${skipITs}</skip>
845 <id>docker-start-for-it</id>
846 <phase>pre-integration-test</phase>
851 <skip>${skipITs}</skip>
855 <id>docker-stop-for-it</id>
856 <phase>post-integration-test</phase>
861 <skip>${skipITs}</skip>
868 <groupId>org.jacoco</groupId>
869 <artifactId>jacoco-maven-plugin</artifactId>
870 <version>0.7.7.201606060606</version>
872 <dumpOnExit>true</dumpOnExit>
874 <include>org.onap.clamp.*</include>
879 <id>pre-unit-test</id>
881 <goal>prepare-agent</goal>
884 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
885 <!-- <append>true</append> -->
889 <id>pre-integration-test</id>
890 <phase>pre-integration-test</phase>
892 <goal>prepare-agent</goal>
895 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
896 <!-- <append>true</append> -->
903 <phase>post-integration-test</phase>
906 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
907 <directory>${project.build.directory}/coverage-reports</directory>
909 <include>*.exec</include>
913 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
919 <!-- This plugin will be useful when we will have multi-modules project -->
921 <groupId>org.codehaus.mojo</groupId>
922 <artifactId>versions-maven-plugin</artifactId>
923 <version>1.3.1</version>
931 <skip.staging.artifacts>true</skip.staging.artifacts>
932 <skip.docker.build>false</skip.docker.build>
933 <skip.docker.tag>false</skip.docker.tag>
934 <skip.docker.push>false</skip.docker.push>