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 ===================================================================
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26 <modelVersion>4.0.0</modelVersion>
27 <groupId>org.onap.clamp</groupId>
28 <artifactId>clds</artifactId>
29 <version>2.0.1-SNAPSHOT</version>
33 <groupId>org.onap.oparent</groupId>
34 <artifactId>oparent</artifactId>
35 <version>1.1.0</version>
39 This project build the ONAP CLAMP JAR that contains CLAMP back-end code and its UI part.
41 By Default "mvn clean install" command will execute also the unit tests
42 and the integration tests. The integration tests require a docker engine running.
44 If you want to skip the integration test you can by doing:
45 "mvn clean install -DskipITs=true"
47 For Spring it's possible to specify the application.properties location
48 "mvn clean install -Dspring.config.location=classpath:application-test.properties"
50 The application.properties contains the location of the CLAMP parameters files:
51 - org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
52 - org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
57 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
58 <clamp.project.version>${project.version}</clamp.project.version>
59 <clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
60 <maven.compiler.source>1.8</maven.compiler.source>
61 <maven.compiler.target>1.8</maven.compiler.target>
62 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
63 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
65 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
66 <docker.http-cache.port.host>8085</docker.http-cache.port.host>
67 <project.scm.id>git-server</project.scm.id>
68 <java.version>1.8</java.version>
70 <swagger.jaxrs2.version>2.0.0-rc4</swagger.jaxrs2.version>
71 <guava.version>20.0</guava.version>
72 <eelf.core.version>1.0.0</eelf.core.version>
73 <camel.version>2.20.1</camel.version>
74 <springboot.version>1.5.12.RELEASE</springboot.version>
76 <sonar.language>java</sonar.language>
77 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
78 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
79 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
80 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
81 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
82 <sonar.projectVersion>${project.version}</sonar.projectVersion>
84 <docker.push.registry>localhost:5000</docker.push.registry>
85 <skip.docker.build>true</skip.docker.build>
86 <skip.docker.push>true</skip.docker.push>
87 <skip.staging.artifacts>false</skip.staging.artifacts>
88 <python.http.proxy.param></python.http.proxy.param>
91 <distributionManagement>
93 <id>ecomp-releases</id>
94 <name>Clamp Release Repository</name>
95 <url>https://nexus.onap.org/content/repositories/releases/</url>
98 <id>ecomp-snapshots</id>
99 <name>Clamp Snapshot Repository</name>
100 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
101 </snapshotRepository>
104 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
106 </distributionManagement>
111 <name>Maven 2 repository 2</name>
112 <url>http://repo2.maven.org/maven2/</url>
115 <id>ecomp-releases</id>
116 <name>ONAP Release Repository</name>
117 <url>https://nexus.onap.org/content/repositories/releases/</url>
120 <id>ecomp-staging</id>
121 <name>ONAP Staging Repository</name>
122 <url>https://nexus.onap.org/content/repositories/staging/</url>
125 <id>ecomp-snapshots</id>
126 <name>ONAP Snapshot Repository</name>
127 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
129 <enabled>true</enabled>
132 <enabled>false</enabled>
137 <name>Spring repo</name>
138 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
141 <id>repository.jboss.org-public</id>
142 <name>JBoss.org Maven repository</name>
143 <url>https://repository.jboss.org/nexus/content/groups/public</url>
147 <dependencyManagement>
149 <!-- Spring Boot BOM -->
151 <groupId>org.springframework.boot</groupId>
152 <artifactId>spring-boot-dependencies</artifactId>
153 <version>${springboot.version}</version>
155 <scope>import</scope>
159 <groupId>org.apache.camel</groupId>
160 <artifactId>camel-spring-boot-dependencies</artifactId>
161 <version>${camel.version}</version>
163 <scope>import</scope>
166 </dependencyManagement>
169 <!-- Swagger requires at least v20 and policy is bringing version 14 -->
171 <groupId>com.google.guava</groupId>
172 <artifactId>guava</artifactId>
173 <version>${guava.version}</version>
176 <groupId>io.swagger.core.v3</groupId>
177 <artifactId>swagger-jaxrs2</artifactId>
178 <version>${swagger.jaxrs2.version}</version>
181 <groupId>com.att.eelf</groupId>
182 <artifactId>eelf-core</artifactId>
183 <version>${eelf.core.version}</version>
187 <groupId>org.apache.camel</groupId>
188 <artifactId>camel-spring-boot-starter</artifactId>
191 <groupId>org.apache.camel</groupId>
192 <artifactId>camel-jaxb-starter</artifactId>
195 <groupId>org.apache.camel</groupId>
196 <artifactId>camel-servlet-starter</artifactId>
199 <groupId>javax.xml.bind</groupId>
200 <artifactId>jaxb-api</artifactId>
201 <version>2.3.0</version>
203 <!-- Spring famework -->
205 <groupId>org.springframework.boot</groupId>
206 <artifactId>spring-boot-starter-web</artifactId>
209 <groupId>org.springframework.boot</groupId>
210 <artifactId>spring-boot-starter-tomcat</artifactId>
213 <groupId>com.paypal.springboot</groupId>
214 <artifactId>resteasy-spring-boot-starter</artifactId>
215 <version>2.3.4-RELEASE</version>
218 <groupId>org.springframework</groupId>
219 <artifactId>spring-jdbc</artifactId>
222 <groupId>org.springframework.boot</groupId>
223 <artifactId>spring-boot-starter-security</artifactId>
226 <groupId>org.springframework.boot</groupId>
227 <artifactId>spring-boot-starter-actuator</artifactId>
230 <groupId>org.springframework.boot</groupId>
231 <artifactId>spring-boot-starter-test</artifactId>
235 <groupId>com.vaadin.external.google</groupId>
236 <artifactId>android-json</artifactId>
240 <!-- Others dependencies -->
242 <groupId>ch.qos.logback</groupId>
243 <artifactId>logback-core</artifactId>
244 <version>1.2.3</version>
247 <groupId>ch.qos.logback</groupId>
248 <artifactId>logback-classic</artifactId>
249 <version>1.2.3</version>
252 <groupId>commons-dbcp</groupId>
253 <artifactId>commons-dbcp</artifactId>
254 <version>1.4</version>
257 <groupId>commons-io</groupId>
258 <artifactId>commons-io</artifactId>
259 <version>2.6</version>
262 <groupId>com.googlecode.json-simple</groupId>
263 <artifactId>json-simple</artifactId>
266 <groupId>org.apache.commons</groupId>
267 <artifactId>commons-vfs2</artifactId>
268 <version>2.2</version>
271 <groupId>joda-time</groupId>
272 <artifactId>joda-time</artifactId>
275 <groupId>org.slf4j</groupId>
276 <artifactId>slf4j-api</artifactId>
279 <groupId>javax.ws.rs</groupId>
280 <artifactId>javax.ws.rs-api</artifactId>
281 <version>2.0</version>
284 <groupId>junit</groupId>
285 <artifactId>junit</artifactId>
288 <groupId>javax.transaction</groupId>
289 <artifactId>jta</artifactId>
290 <version>1.1</version>
293 <groupId>javax.persistence</groupId>
294 <artifactId>persistence-api</artifactId>
295 <version>1.0.2</version>
298 <groupId>org.hibernate</groupId>
299 <artifactId>hibernate-annotations</artifactId>
300 <version>3.5.6-Final</version>
303 <groupId>dom4j</groupId>
304 <artifactId>dom4j</artifactId>
308 <groupId>org.onap.policy.engine</groupId>
309 <artifactId>PolicyEngineAPI</artifactId>
310 <version>1.2.0</version>
313 <groupId>com.google.guava</groupId>
314 <artifactId>guava</artifactId>
317 <artifactId>log4j</artifactId>
318 <groupId>log4j</groupId>
321 <groupId>org.slf4j</groupId>
322 <artifactId>slf4j-log4j12</artifactId>
325 <artifactId>apache-log4j-extras</artifactId>
326 <groupId>log4j</groupId>
329 <groupId>mysql</groupId>
330 <artifactId>mysql-connector-java</artifactId>
333 <groupId>commons-io</groupId>
334 <artifactId>commons-io</artifactId>
337 <artifactId>grizzly-http</artifactId>
338 <groupId>org.glassfish.grizzly</groupId>
343 <groupId>org.onap.policy.common</groupId>
344 <artifactId>ONAP-Logging</artifactId>
345 <version>1.1.3</version>
348 <artifactId>log4j</artifactId>
349 <groupId>log4j</groupId>
352 <groupId>org.slf4j</groupId>
353 <artifactId>slf4j-log4j12</artifactId>
356 <artifactId>apache-log4j-extras</artifactId>
357 <groupId>log4j</groupId>
362 <groupId>org.onap.policy.engine</groupId>
363 <artifactId>PolicyEngineUtils</artifactId>
364 <version>1.1.3</version>
367 <artifactId>log4j</artifactId>
368 <groupId>log4j</groupId>
371 <groupId>org.slf4j</groupId>
372 <artifactId>slf4j-log4j12</artifactId>
375 <artifactId>apache-log4j-extras</artifactId>
376 <groupId>log4j</groupId>
379 <groupId>mysql</groupId>
380 <artifactId>mysql-connector-java</artifactId>
383 <groupId>org.mariadb.jdbc</groupId>
384 <artifactId>mariadb-java-client</artifactId>
387 <groupId>com.att.nsa</groupId>
388 <artifactId>dmaapClient</artifactId>
393 <groupId>org.onap.policy.drools-applications</groupId>
394 <artifactId>policy-yaml</artifactId>
395 <version>1.1.3</version>
398 <artifactId>log4j</artifactId>
399 <groupId>log4j</groupId>
402 <groupId>org.slf4j</groupId>
403 <artifactId>slf4j-log4j12</artifactId>
406 <artifactId>apache-log4j-extras</artifactId>
407 <groupId>log4j</groupId>
412 <groupId>org.onap.policy.drools-applications</groupId>
413 <artifactId>sdc</artifactId>
414 <version>1.1.3</version>
417 <artifactId>log4j</artifactId>
418 <groupId>log4j</groupId>
421 <groupId>org.slf4j</groupId>
422 <artifactId>slf4j-log4j12</artifactId>
425 <artifactId>apache-log4j-extras</artifactId>
426 <groupId>log4j</groupId>
431 <groupId>org.onap.policy.drools-applications</groupId>
432 <artifactId>aai</artifactId>
433 <version>1.1.3</version>
436 <artifactId>log4j</artifactId>
437 <groupId>log4j</groupId>
440 <groupId>org.slf4j</groupId>
441 <artifactId>slf4j-log4j12</artifactId>
444 <artifactId>apache-log4j-extras</artifactId>
445 <groupId>log4j</groupId>
450 <groupId>org.apache.commons</groupId>
451 <artifactId>commons-csv</artifactId>
452 <version>1.3</version>
455 <groupId>com.sun.faces</groupId>
456 <artifactId>jsf-api</artifactId>
457 <version>2.1.7</version>
460 <groupId>com.sun.faces</groupId>
461 <artifactId>jsf-impl</artifactId>
462 <version>2.1.7</version>
464 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
466 <groupId>org.codehaus.plexus</groupId>
467 <artifactId>plexus-utils</artifactId>
468 <version>3.0.24</version>
471 <groupId>commons-fileupload</groupId>
472 <artifactId>commons-fileupload</artifactId>
473 <version>1.3.3</version>
476 <groupId>org.jboss.spec.javax.ws.rs</groupId>
477 <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
478 <version>1.0.1.Final</version>
480 <!-- Remove the MYSQL connector and replace it by Mariadb -->
482 <groupId>org.mariadb.jdbc</groupId>
483 <artifactId>mariadb-java-client</artifactId>
484 <version>2.2.1</version>
486 <!-- For SDC Controller -->
488 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
489 <artifactId>sdc-distribution-client</artifactId>
490 <version>1.3.0</version>
493 <groupId>org.onap.sdc.sdc-tosca</groupId>
494 <artifactId>sdc-tosca</artifactId>
495 <version>1.3.0</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/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 ${python.http.proxy.param} --python_proxyaddress=localhost:${docker.http-cache.port.host}</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>