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 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>javax.transaction</groupId>
292 <artifactId>jta</artifactId>
293 <version>1.1</version>
296 <groupId>javax.persistence</groupId>
297 <artifactId>persistence-api</artifactId>
298 <version>1.0.2</version>
301 <groupId>org.hibernate</groupId>
302 <artifactId>hibernate-annotations</artifactId>
303 <version>3.5.6-Final</version>
306 <groupId>dom4j</groupId>
307 <artifactId>dom4j</artifactId>
311 <groupId>org.onap.policy.engine</groupId>
312 <artifactId>PolicyEngineAPI</artifactId>
313 <version>1.1.0</version>
316 <groupId>com.google.guava</groupId>
317 <artifactId>guava</artifactId>
320 <artifactId>log4j</artifactId>
321 <groupId>log4j</groupId>
324 <groupId>org.slf4j</groupId>
325 <artifactId>slf4j-log4j12</artifactId>
328 <artifactId>apache-log4j-extras</artifactId>
329 <groupId>log4j</groupId>
332 <artifactId>jackson-databind</artifactId>
333 <groupId>com.fasterxml.jackson.core</groupId>
336 <groupId>mysql</groupId>
337 <artifactId>mysql-connector-java</artifactId>
340 <groupId>commons-io</groupId>
341 <artifactId>commons-io</artifactId>
346 <groupId>org.onap.policy.common</groupId>
347 <artifactId>ONAP-Logging</artifactId>
348 <version>1.1.0</version>
351 <artifactId>log4j</artifactId>
352 <groupId>log4j</groupId>
355 <groupId>org.slf4j</groupId>
356 <artifactId>slf4j-log4j12</artifactId>
359 <artifactId>apache-log4j-extras</artifactId>
360 <groupId>log4j</groupId>
365 <groupId>org.onap.policy.engine</groupId>
366 <artifactId>PolicyEngineUtils</artifactId>
367 <version>1.1.0</version>
370 <artifactId>log4j</artifactId>
371 <groupId>log4j</groupId>
374 <groupId>org.slf4j</groupId>
375 <artifactId>slf4j-log4j12</artifactId>
378 <artifactId>apache-log4j-extras</artifactId>
379 <groupId>log4j</groupId>
382 <groupId>mysql</groupId>
383 <artifactId>mysql-connector-java</artifactId>
386 <groupId>org.mariadb.jdbc</groupId>
387 <artifactId>mariadb-java-client</artifactId>
390 <groupId>com.att.nsa</groupId>
391 <artifactId>dmaapClient</artifactId>
396 <groupId>org.onap.policy.drools-applications</groupId>
397 <artifactId>policy-yaml</artifactId>
398 <version>1.1.0</version>
401 <artifactId>log4j</artifactId>
402 <groupId>log4j</groupId>
405 <groupId>org.slf4j</groupId>
406 <artifactId>slf4j-log4j12</artifactId>
409 <artifactId>apache-log4j-extras</artifactId>
410 <groupId>log4j</groupId>
415 <groupId>org.onap.policy.drools-applications</groupId>
416 <artifactId>sdc</artifactId>
417 <version>1.1.0</version>
420 <artifactId>log4j</artifactId>
421 <groupId>log4j</groupId>
424 <groupId>org.slf4j</groupId>
425 <artifactId>slf4j-log4j12</artifactId>
428 <artifactId>apache-log4j-extras</artifactId>
429 <groupId>log4j</groupId>
434 <groupId>org.onap.policy.drools-applications</groupId>
435 <artifactId>aai</artifactId>
436 <version>1.1.0</version>
439 <artifactId>log4j</artifactId>
440 <groupId>log4j</groupId>
443 <groupId>org.slf4j</groupId>
444 <artifactId>slf4j-log4j12</artifactId>
447 <artifactId>apache-log4j-extras</artifactId>
448 <groupId>log4j</groupId>
453 <groupId>com.fasterxml.jackson.dataformat</groupId>
454 <artifactId>jackson-dataformat-yaml</artifactId>
457 <groupId>org.apache.commons</groupId>
458 <artifactId>commons-csv</artifactId>
459 <version>1.3</version>
462 <groupId>com.sun.faces</groupId>
463 <artifactId>jsf-api</artifactId>
464 <version>2.1.7</version>
467 <groupId>com.sun.faces</groupId>
468 <artifactId>jsf-impl</artifactId>
469 <version>2.1.7</version>
471 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
473 <groupId>org.codehaus.plexus</groupId>
474 <artifactId>plexus-utils</artifactId>
475 <version>3.0.24</version>
478 <groupId>commons-fileupload</groupId>
479 <artifactId>commons-fileupload</artifactId>
480 <version>1.3.3</version>
483 <groupId>org.jboss.spec.javax.ws.rs</groupId>
484 <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
485 <version>1.0.1.Final</version>
488 <groupId>com.fasterxml.jackson.core</groupId>
489 <artifactId>jackson-databind</artifactId>
490 <version>2.8.11.1</version>
492 <!-- Remove the MYSQL connector and replace it by Mariadb -->
494 <groupId>org.mariadb.jdbc</groupId>
495 <artifactId>mariadb-java-client</artifactId>
496 <version>2.2.1</version>
498 <!-- For SDC Controller -->
500 <groupId>org.openecomp.sdc.sdc-distribution-client</groupId>
501 <artifactId>sdc-distribution-client</artifactId>
502 <version>1.2.2</version>
505 <groupId>org.openecomp.sdc.sdc-tosca</groupId>
506 <artifactId>sdc-tosca</artifactId>
507 <version>1.2.2</version>
514 <finalName>clamp</finalName>
518 <directory>src/test/resources</directory>
520 <exclude>**/*.jks</exclude>
521 <exclude>**/*.csar</exclude>
523 <filtering>true</filtering>
526 <directory>src/test/resources/https</directory>
528 <include>**.jks</include>
530 <filtering>false</filtering>
531 <targetPath>https</targetPath>
534 <directory>src/test/resources/example/sdc</directory>
536 <include>**.csar</include>
538 <filtering>false</filtering>
539 <targetPath>example/sdc</targetPath>
544 <directory>src/main/resources</directory>
545 <filtering>true</filtering>
548 <directory>src/main/docker</directory>
550 <include>**/*</include>
552 <filtering>true</filtering>
558 <groupId>org.codehaus.groovy.maven</groupId>
559 <artifactId>gmaven-plugin</artifactId>
560 <version>1.0</version>
563 <phase>validate</phase>
568 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
574 <groupId>org.apache.maven.plugins</groupId>
575 <artifactId>maven-jar-plugin</artifactId>
576 <version>3.0.2</version>
579 <id>jar-with-only-classes</id>
580 <phase>package</phase>
585 <classifier>classes</classifier>
587 <include>org/**</include>
594 <groupId>org.codehaus.mojo</groupId>
595 <artifactId>build-helper-maven-plugin</artifactId>
596 <version>3.0.0</version>
600 <goal>attach-artifact</goal>
602 <phase>package</phase>
606 <file>${project.build.directory}/clamp-classes.jar</file>
608 <classifier>classes</classifier>
617 <groupId>org.springframework.boot</groupId>
618 <artifactId>spring-boot-maven-plugin</artifactId>
619 <version>${springboot.version}</version>
623 <goal>repackage</goal>
625 <phase>package</phase>
630 <groupId>org.sonatype.plugins</groupId>
631 <artifactId>nexus-staging-maven-plugin</artifactId>
632 <version>1.6.7</version>
633 <extensions>true</extensions>
635 <nexusUrl>https://nexus.onap.org</nexusUrl>
636 <stagingProfileId>176c31dfe190a</stagingProfileId>
637 <serverId>ecomp-staging</serverId>
638 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
642 <groupId>com.spotify</groupId>
643 <artifactId>docker-maven-plugin</artifactId>
644 <version>1.0.0</version>
646 <imageName>onap/clamp</imageName>
647 <dockerDirectory>src/main/docker</dockerDirectory>
648 <serverId>docker-hub</serverId>
650 <imageTag>latest</imageTag>
651 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
652 <imageTag>${project.docker.latesttag.version}</imageTag>
654 <forceTags>true</forceTags>
657 <targetPath>/</targetPath>
658 <directory>${project.build.directory}</directory>
659 <include>${project.build.finalName}.jar</include>
662 <targetPath>/</targetPath>
663 <directory>${project.build.directory}</directory>
664 <include>etc/config/**</include>
667 <targetPath>/</targetPath>
668 <directory>${project.build.directory}</directory>
669 <include>etc/keystore/**</include>
676 <phase>package</phase>
681 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
683 <http_proxy>${env.HTTP_PROXY}</http_proxy>
684 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
690 <id>tag-image-latest-timestamp</id>
691 <phase>package</phase>
696 <image>onap/clamp</image>
697 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
698 <skipDockerTag>${skip.docker.push}</skipDockerTag>
702 <id>push-image-latest-timestamp</id>
703 <phase>deploy</phase>
708 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
709 <skipDockerPush>${skip.docker.push}</skipDockerPush>
713 <id>tag-image-latest</id>
714 <phase>package</phase>
719 <image>onap/clamp</image>
720 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
721 <skipDockerTag>${skip.docker.push}</skipDockerTag>
725 <id>push-image-latest</id>
726 <phase>deploy</phase>
731 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
732 <skipDockerPush>${skip.docker.push}</skipDockerPush>
737 <phase>package</phase>
742 <image>onap/clamp</image>
743 <newName>${docker.push.registry}/onap/clamp:latest</newName>
744 <skipDockerTag>${skip.docker.push}</skipDockerTag>
749 <phase>deploy</phase>
754 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
755 <skipDockerPush>${skip.docker.push}</skipDockerPush>
761 <groupId>org.apache.maven.plugins</groupId>
762 <artifactId>maven-surefire-plugin</artifactId>
763 <version>2.19.1</version>
765 <forkCount>1</forkCount>
766 <reuseForks>false</reuseForks>
771 <groupId>org.apache.maven.plugins</groupId>
772 <artifactId>maven-failsafe-plugin</artifactId>
773 <version>2.16</version>
777 <id>integration-tests</id>
779 <goal>integration-test</goal>
784 <include>**/*ItCase.java</include>
786 <forkCount>1</forkCount>
787 <reuseForks>false</reuseForks>
794 <groupId>io.fabric8</groupId>
795 <artifactId>docker-maven-plugin</artifactId>
796 <version>0.16.5</version>
798 <verbose>true</verbose>
799 <apiVersion>1.23</apiVersion>
802 <name>mariadb:10.1.11</name>
803 <alias>mariadb</alias>
806 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
808 <hostname>mariadb</hostname>
811 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
812 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
816 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
820 <port>${docker.mariadb.port.host}:3306</port>
825 <name>python:2-slim</name>
826 <alias>python</alias>
828 <hostname>python</hostname>
831 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
832 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
845 <port>${docker.http-cache.port.host}:8080</port>
847 <workingDir>/usr/src/http-cache-app</workingDir>
849 <shell>./start_http_cache.sh ${http.proxy}</shell>
854 <skip>${skipITs}</skip>
859 <id>docker-start-for-it</id>
860 <phase>pre-integration-test</phase>
865 <skip>${skipITs}</skip>
869 <id>docker-stop-for-it</id>
870 <phase>post-integration-test</phase>
875 <skip>${skipITs}</skip>
882 <groupId>org.jacoco</groupId>
883 <artifactId>jacoco-maven-plugin</artifactId>
884 <version>0.7.7.201606060606</version>
886 <dumpOnExit>true</dumpOnExit>
888 <include>org.onap.clamp.*</include>
893 <id>pre-unit-test</id>
895 <goal>prepare-agent</goal>
898 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
899 <!-- <append>true</append> -->
903 <id>pre-integration-test</id>
904 <phase>pre-integration-test</phase>
906 <goal>prepare-agent</goal>
909 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
910 <!-- <append>true</append> -->
917 <phase>post-integration-test</phase>
920 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
921 <directory>${project.build.directory}/coverage-reports</directory>
923 <include>*.exec</include>
927 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
933 <!-- This plugin will be useful when we will have multi-modules project -->
935 <groupId>org.codehaus.mojo</groupId>
936 <artifactId>versions-maven-plugin</artifactId>
937 <version>1.3.1</version>
945 <skip.staging.artifacts>true</skip.staging.artifacts>
946 <skip.docker.build>false</skip.docker.build>
947 <skip.docker.tag>false</skip.docker.tag>
948 <skip.docker.push>false</skip.docker.push>