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.0-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.cldsReference=classpath:/clds/clds-reference.properties
52 - org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
53 - org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
54 - org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
59 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
60 <clamp.project.version>${project.version}</clamp.project.version>
61 <clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
62 <maven.compiler.source>1.8</maven.compiler.source>
63 <maven.compiler.target>1.8</maven.compiler.target>
64 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
65 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
67 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
68 <docker.http-cache.port.host>8085</docker.http-cache.port.host>
69 <project.scm.id>git-server</project.scm.id>
70 <java.version>1.8</java.version>
72 <swagger.jaxrs2.version>2.0.0-rc4</swagger.jaxrs2.version>
73 <guava.version>20.0</guava.version>
74 <eelf.core.version>1.0.0</eelf.core.version>
75 <camel.version>2.20.1</camel.version>
76 <springboot.version>1.5.12.RELEASE</springboot.version>
78 <sonar.language>java</sonar.language>
79 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
80 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
81 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
82 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
83 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
84 <sonar.projectVersion>${project.version}</sonar.projectVersion>
86 <docker.push.registry>localhost:5000</docker.push.registry>
87 <skip.docker.build>true</skip.docker.build>
88 <skip.docker.push>true</skip.docker.push>
89 <skip.staging.artifacts>false</skip.staging.artifacts>
90 <python.http.proxy.param></python.http.proxy.param>
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>
171 <!-- Swagger requires at least v20 and policy is bringing version 14 -->
173 <groupId>com.google.guava</groupId>
174 <artifactId>guava</artifactId>
175 <version>${guava.version}</version>
178 <groupId>io.swagger.core.v3</groupId>
179 <artifactId>swagger-jaxrs2</artifactId>
180 <version>${swagger.jaxrs2.version}</version>
183 <groupId>com.att.eelf</groupId>
184 <artifactId>eelf-core</artifactId>
185 <version>${eelf.core.version}</version>
189 <groupId>org.apache.camel</groupId>
190 <artifactId>camel-spring-boot-starter</artifactId>
193 <groupId>org.apache.camel</groupId>
194 <artifactId>camel-jaxb-starter</artifactId>
197 <groupId>org.apache.camel</groupId>
198 <artifactId>camel-servlet-starter</artifactId>
200 <!-- Spring famework -->
202 <groupId>org.springframework.boot</groupId>
203 <artifactId>spring-boot-starter-web</artifactId>
206 <groupId>org.springframework.boot</groupId>
207 <artifactId>spring-boot-starter-tomcat</artifactId>
210 <groupId>com.paypal.springboot</groupId>
211 <artifactId>resteasy-spring-boot-starter</artifactId>
212 <version>2.3.4-RELEASE</version>
215 <groupId>org.springframework</groupId>
216 <artifactId>spring-jdbc</artifactId>
219 <groupId>org.springframework.boot</groupId>
220 <artifactId>spring-boot-starter-security</artifactId>
223 <groupId>org.springframework.boot</groupId>
224 <artifactId>spring-boot-starter-actuator</artifactId>
227 <groupId>org.springframework.boot</groupId>
228 <artifactId>spring-boot-starter-test</artifactId>
232 <groupId>com.vaadin.external.google</groupId>
233 <artifactId>android-json</artifactId>
237 <!-- Others dependencies -->
239 <groupId>ch.qos.logback</groupId>
240 <artifactId>logback-core</artifactId>
241 <version>1.2.3</version>
244 <groupId>ch.qos.logback</groupId>
245 <artifactId>logback-classic</artifactId>
246 <version>1.2.3</version>
249 <groupId>commons-dbcp</groupId>
250 <artifactId>commons-dbcp</artifactId>
251 <version>1.4</version>
254 <groupId>commons-io</groupId>
255 <artifactId>commons-io</artifactId>
256 <version>2.6</version>
259 <groupId>com.googlecode.json-simple</groupId>
260 <artifactId>json-simple</artifactId>
263 <groupId>org.apache.commons</groupId>
264 <artifactId>commons-vfs2</artifactId>
265 <version>2.2</version>
268 <groupId>joda-time</groupId>
269 <artifactId>joda-time</artifactId>
272 <groupId>org.slf4j</groupId>
273 <artifactId>slf4j-api</artifactId>
276 <groupId>javax.ws.rs</groupId>
277 <artifactId>javax.ws.rs-api</artifactId>
278 <version>2.0</version>
281 <groupId>junit</groupId>
282 <artifactId>junit</artifactId>
285 <groupId>javax.transaction</groupId>
286 <artifactId>jta</artifactId>
287 <version>1.1</version>
290 <groupId>javax.persistence</groupId>
291 <artifactId>persistence-api</artifactId>
292 <version>1.0.2</version>
295 <groupId>org.hibernate</groupId>
296 <artifactId>hibernate-annotations</artifactId>
297 <version>3.5.6-Final</version>
300 <groupId>dom4j</groupId>
301 <artifactId>dom4j</artifactId>
305 <groupId>org.onap.policy.engine</groupId>
306 <artifactId>PolicyEngineAPI</artifactId>
307 <version>1.2.0</version>
310 <groupId>com.google.guava</groupId>
311 <artifactId>guava</artifactId>
314 <artifactId>log4j</artifactId>
315 <groupId>log4j</groupId>
318 <groupId>org.slf4j</groupId>
319 <artifactId>slf4j-log4j12</artifactId>
322 <artifactId>apache-log4j-extras</artifactId>
323 <groupId>log4j</groupId>
326 <groupId>mysql</groupId>
327 <artifactId>mysql-connector-java</artifactId>
330 <groupId>commons-io</groupId>
331 <artifactId>commons-io</artifactId>
334 <artifactId>grizzly-http</artifactId>
335 <groupId>org.glassfish.grizzly</groupId>
340 <groupId>org.onap.policy.common</groupId>
341 <artifactId>ONAP-Logging</artifactId>
342 <version>1.1.3</version>
345 <artifactId>log4j</artifactId>
346 <groupId>log4j</groupId>
349 <groupId>org.slf4j</groupId>
350 <artifactId>slf4j-log4j12</artifactId>
353 <artifactId>apache-log4j-extras</artifactId>
354 <groupId>log4j</groupId>
359 <groupId>org.onap.policy.engine</groupId>
360 <artifactId>PolicyEngineUtils</artifactId>
361 <version>1.1.3</version>
364 <artifactId>log4j</artifactId>
365 <groupId>log4j</groupId>
368 <groupId>org.slf4j</groupId>
369 <artifactId>slf4j-log4j12</artifactId>
372 <artifactId>apache-log4j-extras</artifactId>
373 <groupId>log4j</groupId>
376 <groupId>mysql</groupId>
377 <artifactId>mysql-connector-java</artifactId>
380 <groupId>org.mariadb.jdbc</groupId>
381 <artifactId>mariadb-java-client</artifactId>
384 <groupId>com.att.nsa</groupId>
385 <artifactId>dmaapClient</artifactId>
390 <groupId>org.onap.policy.drools-applications</groupId>
391 <artifactId>policy-yaml</artifactId>
392 <version>1.1.3</version>
395 <artifactId>log4j</artifactId>
396 <groupId>log4j</groupId>
399 <groupId>org.slf4j</groupId>
400 <artifactId>slf4j-log4j12</artifactId>
403 <artifactId>apache-log4j-extras</artifactId>
404 <groupId>log4j</groupId>
409 <groupId>org.onap.policy.drools-applications</groupId>
410 <artifactId>sdc</artifactId>
411 <version>1.1.3</version>
414 <artifactId>log4j</artifactId>
415 <groupId>log4j</groupId>
418 <groupId>org.slf4j</groupId>
419 <artifactId>slf4j-log4j12</artifactId>
422 <artifactId>apache-log4j-extras</artifactId>
423 <groupId>log4j</groupId>
428 <groupId>org.onap.policy.drools-applications</groupId>
429 <artifactId>aai</artifactId>
430 <version>1.1.3</version>
433 <artifactId>log4j</artifactId>
434 <groupId>log4j</groupId>
437 <groupId>org.slf4j</groupId>
438 <artifactId>slf4j-log4j12</artifactId>
441 <artifactId>apache-log4j-extras</artifactId>
442 <groupId>log4j</groupId>
447 <groupId>org.apache.commons</groupId>
448 <artifactId>commons-csv</artifactId>
449 <version>1.3</version>
452 <groupId>com.sun.faces</groupId>
453 <artifactId>jsf-api</artifactId>
454 <version>2.1.7</version>
457 <groupId>com.sun.faces</groupId>
458 <artifactId>jsf-impl</artifactId>
459 <version>2.1.7</version>
461 <!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
463 <groupId>org.codehaus.plexus</groupId>
464 <artifactId>plexus-utils</artifactId>
465 <version>3.0.24</version>
468 <groupId>commons-fileupload</groupId>
469 <artifactId>commons-fileupload</artifactId>
470 <version>1.3.3</version>
473 <groupId>org.jboss.spec.javax.ws.rs</groupId>
474 <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
475 <version>1.0.1.Final</version>
477 <!-- Remove the MYSQL connector and replace it by Mariadb -->
479 <groupId>org.mariadb.jdbc</groupId>
480 <artifactId>mariadb-java-client</artifactId>
481 <version>2.2.1</version>
483 <!-- For SDC Controller -->
485 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
486 <artifactId>sdc-distribution-client</artifactId>
487 <version>1.3.0</version>
490 <groupId>org.onap.sdc.sdc-tosca</groupId>
491 <artifactId>sdc-tosca</artifactId>
492 <version>1.3.0</version>
497 <finalName>clamp</finalName>
501 <directory>src/test/resources</directory>
503 <exclude>**/*.jks</exclude>
504 <exclude>**/*.csar</exclude>
506 <filtering>true</filtering>
509 <directory>src/test/resources/https</directory>
511 <include>**.jks</include>
513 <filtering>false</filtering>
514 <targetPath>https</targetPath>
517 <directory>src/test/resources/example/sdc</directory>
519 <include>**.csar</include>
521 <filtering>false</filtering>
522 <targetPath>example/sdc</targetPath>
527 <directory>src/main/resources</directory>
528 <filtering>true</filtering>
531 <directory>src/main/docker</directory>
533 <include>**/*</include>
535 <filtering>true</filtering>
541 <groupId>org.codehaus.groovy.maven</groupId>
542 <artifactId>gmaven-plugin</artifactId>
543 <version>1.0</version>
546 <phase>validate</phase>
551 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
557 <groupId>org.apache.maven.plugins</groupId>
558 <artifactId>maven-jar-plugin</artifactId>
559 <version>3.0.2</version>
562 <id>jar-with-only-classes</id>
563 <phase>package</phase>
568 <classifier>classes</classifier>
570 <include>org/**</include>
577 <groupId>org.codehaus.mojo</groupId>
578 <artifactId>build-helper-maven-plugin</artifactId>
579 <version>3.0.0</version>
583 <goal>attach-artifact</goal>
585 <phase>package</phase>
589 <file>${project.build.directory}/clamp-classes.jar</file>
591 <classifier>classes</classifier>
600 <groupId>org.springframework.boot</groupId>
601 <artifactId>spring-boot-maven-plugin</artifactId>
602 <version>${springboot.version}</version>
606 <goal>repackage</goal>
608 <phase>package</phase>
613 <groupId>org.sonatype.plugins</groupId>
614 <artifactId>nexus-staging-maven-plugin</artifactId>
615 <version>1.6.7</version>
616 <extensions>true</extensions>
618 <nexusUrl>https://nexus.onap.org</nexusUrl>
619 <stagingProfileId>176c31dfe190a</stagingProfileId>
620 <serverId>ecomp-staging</serverId>
621 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
625 <groupId>com.spotify</groupId>
626 <artifactId>docker-maven-plugin</artifactId>
627 <version>1.0.0</version>
629 <imageName>onap/clamp</imageName>
630 <dockerDirectory>src/main/docker</dockerDirectory>
631 <serverId>docker-hub</serverId>
633 <imageTag>latest</imageTag>
634 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
635 <imageTag>${project.docker.latesttag.version}</imageTag>
637 <forceTags>true</forceTags>
640 <targetPath>/</targetPath>
641 <directory>${project.build.directory}</directory>
642 <include>${project.build.finalName}.jar</include>
645 <targetPath>/</targetPath>
646 <directory>${project.build.directory}</directory>
647 <include>etc/config/**</include>
650 <targetPath>/</targetPath>
651 <directory>${project.build.directory}</directory>
652 <include>etc/keystore/**</include>
659 <phase>package</phase>
664 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
666 <http_proxy>${env.HTTP_PROXY}</http_proxy>
667 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
673 <id>tag-image-latest-timestamp</id>
674 <phase>package</phase>
679 <image>onap/clamp</image>
680 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
681 <skipDockerTag>${skip.docker.push}</skipDockerTag>
685 <id>push-image-latest-timestamp</id>
686 <phase>deploy</phase>
691 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
692 <skipDockerPush>${skip.docker.push}</skipDockerPush>
696 <id>tag-image-latest</id>
697 <phase>package</phase>
702 <image>onap/clamp</image>
703 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
704 <skipDockerTag>${skip.docker.push}</skipDockerTag>
708 <id>push-image-latest</id>
709 <phase>deploy</phase>
714 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
715 <skipDockerPush>${skip.docker.push}</skipDockerPush>
720 <phase>package</phase>
725 <image>onap/clamp</image>
726 <newName>${docker.push.registry}/onap/clamp:latest</newName>
727 <skipDockerTag>${skip.docker.push}</skipDockerTag>
732 <phase>deploy</phase>
737 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
738 <skipDockerPush>${skip.docker.push}</skipDockerPush>
744 <groupId>org.apache.maven.plugins</groupId>
745 <artifactId>maven-surefire-plugin</artifactId>
746 <version>2.19.1</version>
748 <forkCount>1</forkCount>
749 <reuseForks>false</reuseForks>
754 <groupId>org.apache.maven.plugins</groupId>
755 <artifactId>maven-failsafe-plugin</artifactId>
756 <version>2.16</version>
760 <id>integration-tests</id>
762 <goal>integration-test</goal>
767 <include>**/*ItCase.java</include>
769 <forkCount>1</forkCount>
770 <reuseForks>false</reuseForks>
777 <groupId>io.fabric8</groupId>
778 <artifactId>docker-maven-plugin</artifactId>
779 <version>0.16.5</version>
781 <verbose>true</verbose>
782 <apiVersion>1.23</apiVersion>
785 <name>mariadb:10.1.11</name>
786 <alias>mariadb</alias>
789 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
791 <hostname>mariadb</hostname>
794 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
795 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
799 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
803 <port>${docker.mariadb.port.host}:3306</port>
808 <name>python:2-slim</name>
809 <alias>python</alias>
811 <hostname>python</hostname>
814 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
815 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
828 <port>${docker.http-cache.port.host}:8080</port>
830 <workingDir>/usr/src/http-cache-app</workingDir>
832 <shell>./start_http_cache.sh ${python.http.proxy.param} --python_proxyaddress=localhost:${docker.http-cache.port.host}</shell>
837 <skip>${skipITs}</skip>
842 <id>docker-start-for-it</id>
843 <phase>pre-integration-test</phase>
848 <skip>${skipITs}</skip>
852 <id>docker-stop-for-it</id>
853 <phase>post-integration-test</phase>
858 <skip>${skipITs}</skip>
865 <groupId>org.jacoco</groupId>
866 <artifactId>jacoco-maven-plugin</artifactId>
867 <version>0.7.7.201606060606</version>
869 <dumpOnExit>true</dumpOnExit>
871 <include>org.onap.clamp.*</include>
876 <id>pre-unit-test</id>
878 <goal>prepare-agent</goal>
881 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
882 <!-- <append>true</append> -->
886 <id>pre-integration-test</id>
887 <phase>pre-integration-test</phase>
889 <goal>prepare-agent</goal>
892 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
893 <!-- <append>true</append> -->
900 <phase>post-integration-test</phase>
903 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
904 <directory>${project.build.directory}/coverage-reports</directory>
906 <include>*.exec</include>
910 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
916 <!-- This plugin will be useful when we will have multi-modules project -->
918 <groupId>org.codehaus.mojo</groupId>
919 <artifactId>versions-maven-plugin</artifactId>
920 <version>1.3.1</version>
928 <skip.staging.artifacts>true</skip.staging.artifacts>
929 <skip.docker.build>false</skip.docker.build>
930 <skip.docker.tag>false</skip.docker.tag>
931 <skip.docker.push>false</skip.docker.push>