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>yyyyMMdd'T'HHmmss'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>
94 <distributionManagement>
96 <id>ecomp-releases</id>
97 <name>Clamp Release Repository</name>
98 <url>https://nexus.onap.org/content/repositories/releases/</url>
101 <id>ecomp-snapshots</id>
102 <name>Clamp Snapshot Repository</name>
103 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
104 </snapshotRepository>
107 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
109 </distributionManagement>
114 <name>Maven 2 repository 2</name>
115 <url>http://repo2.maven.org/maven2/</url>
118 <id>ecomp-releases</id>
119 <name>ONAP Release Repository</name>
120 <url>https://nexus.onap.org/content/repositories/releases/</url>
123 <id>ecomp-staging</id>
124 <name>ONAP Staging Repository</name>
125 <url>https://nexus.onap.org/content/repositories/staging/</url>
128 <id>ecomp-snapshots</id>
129 <name>ONAP Snapshot Repository</name>
130 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
132 <enabled>true</enabled>
135 <enabled>false</enabled>
140 <name>Spring repo</name>
141 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
144 <id>repository.jboss.org-public</id>
145 <name>JBoss.org Maven repository</name>
146 <url>https://repository.jboss.org/nexus/content/groups/public</url>
150 <dependencyManagement>
152 <!-- Spring Boot BOM -->
154 <groupId>org.springframework.boot</groupId>
155 <artifactId>spring-boot-dependencies</artifactId>
156 <version>${springboot.version}</version>
158 <scope>import</scope>
162 <groupId>org.apache.camel</groupId>
163 <artifactId>camel-spring-boot-dependencies</artifactId>
164 <version>${camel.version}</version>
166 <scope>import</scope>
169 </dependencyManagement>
172 <!-- Swagger requires at least v20 and policy is bringing version 14 -->
174 <groupId>com.google.guava</groupId>
175 <artifactId>guava</artifactId>
176 <version>${guava.version}</version>
179 <groupId>io.swagger.core.v3</groupId>
180 <artifactId>swagger-jaxrs2</artifactId>
181 <version>${swagger.jaxrs2.version}</version>
184 <groupId>com.att.eelf</groupId>
185 <artifactId>eelf-core</artifactId>
186 <version>${eelf.core.version}</version>
190 <groupId>org.apache.camel</groupId>
191 <artifactId>camel-spring-boot-starter</artifactId>
194 <groupId>org.apache.camel</groupId>
195 <artifactId>camel-jaxb-starter</artifactId>
198 <groupId>org.apache.camel</groupId>
199 <artifactId>camel-servlet-starter</artifactId>
201 <!-- Spring famework -->
203 <groupId>org.springframework.boot</groupId>
204 <artifactId>spring-boot-starter-web</artifactId>
207 <groupId>org.springframework.boot</groupId>
208 <artifactId>spring-boot-starter-tomcat</artifactId>
211 <groupId>com.paypal.springboot</groupId>
212 <artifactId>resteasy-spring-boot-starter</artifactId>
213 <version>2.3.4-RELEASE</version>
216 <groupId>org.springframework</groupId>
217 <artifactId>spring-jdbc</artifactId>
220 <groupId>org.springframework.boot</groupId>
221 <artifactId>spring-boot-starter-security</artifactId>
224 <groupId>org.springframework.boot</groupId>
225 <artifactId>spring-boot-starter-actuator</artifactId>
228 <groupId>org.springframework.boot</groupId>
229 <artifactId>spring-boot-starter-test</artifactId>
233 <groupId>com.vaadin.external.google</groupId>
234 <artifactId>android-json</artifactId>
238 <!-- Others dependencies -->
240 <groupId>ch.qos.logback</groupId>
241 <artifactId>logback-core</artifactId>
242 <version>1.2.3</version>
245 <groupId>ch.qos.logback</groupId>
246 <artifactId>logback-classic</artifactId>
247 <version>1.2.3</version>
250 <groupId>commons-dbcp</groupId>
251 <artifactId>commons-dbcp</artifactId>
252 <version>1.4</version>
255 <groupId>commons-io</groupId>
256 <artifactId>commons-io</artifactId>
257 <version>2.6</version>
260 <groupId>com.googlecode.json-simple</groupId>
261 <artifactId>json-simple</artifactId>
264 <groupId>org.apache.commons</groupId>
265 <artifactId>commons-vfs2</artifactId>
266 <version>2.2</version>
269 <groupId>joda-time</groupId>
270 <artifactId>joda-time</artifactId>
273 <groupId>org.slf4j</groupId>
274 <artifactId>slf4j-api</artifactId>
277 <groupId>javax.ws.rs</groupId>
278 <artifactId>javax.ws.rs-api</artifactId>
279 <version>2.0</version>
282 <groupId>junit</groupId>
283 <artifactId>junit</artifactId>
286 <groupId>javax.transaction</groupId>
287 <artifactId>jta</artifactId>
288 <version>1.1</version>
291 <groupId>javax.persistence</groupId>
292 <artifactId>persistence-api</artifactId>
293 <version>1.0.2</version>
296 <groupId>org.hibernate</groupId>
297 <artifactId>hibernate-annotations</artifactId>
298 <version>3.5.6-Final</version>
301 <groupId>dom4j</groupId>
302 <artifactId>dom4j</artifactId>
306 <groupId>org.onap.policy.engine</groupId>
307 <artifactId>PolicyEngineAPI</artifactId>
308 <version>1.1.0</version>
311 <groupId>com.google.guava</groupId>
312 <artifactId>guava</artifactId>
315 <artifactId>log4j</artifactId>
316 <groupId>log4j</groupId>
319 <groupId>org.slf4j</groupId>
320 <artifactId>slf4j-log4j12</artifactId>
323 <artifactId>apache-log4j-extras</artifactId>
324 <groupId>log4j</groupId>
327 <groupId>mysql</groupId>
328 <artifactId>mysql-connector-java</artifactId>
331 <groupId>commons-io</groupId>
332 <artifactId>commons-io</artifactId>
335 <artifactId>grizzly-http</artifactId>
336 <groupId>org.glassfish.grizzly</groupId>
341 <groupId>org.onap.policy.common</groupId>
342 <artifactId>ONAP-Logging</artifactId>
343 <version>1.1.0</version>
346 <artifactId>log4j</artifactId>
347 <groupId>log4j</groupId>
350 <groupId>org.slf4j</groupId>
351 <artifactId>slf4j-log4j12</artifactId>
354 <artifactId>apache-log4j-extras</artifactId>
355 <groupId>log4j</groupId>
360 <groupId>org.onap.policy.engine</groupId>
361 <artifactId>PolicyEngineUtils</artifactId>
362 <version>1.1.0</version>
365 <artifactId>log4j</artifactId>
366 <groupId>log4j</groupId>
369 <groupId>org.slf4j</groupId>
370 <artifactId>slf4j-log4j12</artifactId>
373 <artifactId>apache-log4j-extras</artifactId>
374 <groupId>log4j</groupId>
377 <groupId>mysql</groupId>
378 <artifactId>mysql-connector-java</artifactId>
381 <groupId>org.mariadb.jdbc</groupId>
382 <artifactId>mariadb-java-client</artifactId>
385 <groupId>com.att.nsa</groupId>
386 <artifactId>dmaapClient</artifactId>
391 <groupId>org.onap.policy.drools-applications</groupId>
392 <artifactId>policy-yaml</artifactId>
393 <version>1.1.0</version>
396 <artifactId>log4j</artifactId>
397 <groupId>log4j</groupId>
400 <groupId>org.slf4j</groupId>
401 <artifactId>slf4j-log4j12</artifactId>
404 <artifactId>apache-log4j-extras</artifactId>
405 <groupId>log4j</groupId>
410 <groupId>org.onap.policy.drools-applications</groupId>
411 <artifactId>sdc</artifactId>
412 <version>1.1.0</version>
415 <artifactId>log4j</artifactId>
416 <groupId>log4j</groupId>
419 <groupId>org.slf4j</groupId>
420 <artifactId>slf4j-log4j12</artifactId>
423 <artifactId>apache-log4j-extras</artifactId>
424 <groupId>log4j</groupId>
429 <groupId>org.onap.policy.drools-applications</groupId>
430 <artifactId>aai</artifactId>
431 <version>1.1.0</version>
434 <artifactId>log4j</artifactId>
435 <groupId>log4j</groupId>
438 <groupId>org.slf4j</groupId>
439 <artifactId>slf4j-log4j12</artifactId>
442 <artifactId>apache-log4j-extras</artifactId>
443 <groupId>log4j</groupId>
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.onap.sdc.sdc-distribution-client</groupId>
487 <artifactId>sdc-distribution-client</artifactId>
488 <version>1.3.0</version>
491 <groupId>org.onap.sdc.sdc-tosca</groupId>
492 <artifactId>sdc-tosca</artifactId>
493 <version>1.3.3</version>
498 <finalName>clamp</finalName>
502 <directory>src/test/resources</directory>
504 <exclude>**/*.jks</exclude>
505 <exclude>**/*.csar</exclude>
507 <filtering>true</filtering>
510 <directory>src/test/resources/https</directory>
512 <include>**.jks</include>
514 <filtering>false</filtering>
515 <targetPath>https</targetPath>
518 <directory>src/test/resources/example/sdc</directory>
520 <include>**.csar</include>
522 <filtering>false</filtering>
523 <targetPath>example/sdc</targetPath>
528 <directory>src/main/resources</directory>
529 <filtering>true</filtering>
532 <directory>src/main/docker</directory>
534 <include>**/*</include>
536 <filtering>true</filtering>
542 <groupId>org.codehaus.groovy.maven</groupId>
543 <artifactId>gmaven-plugin</artifactId>
544 <version>1.0</version>
547 <phase>validate</phase>
552 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
558 <groupId>org.apache.maven.plugins</groupId>
559 <artifactId>maven-jar-plugin</artifactId>
560 <version>3.0.2</version>
563 <id>jar-with-only-classes</id>
564 <phase>package</phase>
569 <classifier>classes</classifier>
571 <include>org/**</include>
578 <groupId>org.codehaus.mojo</groupId>
579 <artifactId>build-helper-maven-plugin</artifactId>
580 <version>3.0.0</version>
584 <goal>attach-artifact</goal>
586 <phase>package</phase>
590 <file>${project.build.directory}/clamp-classes.jar</file>
592 <classifier>classes</classifier>
601 <groupId>org.springframework.boot</groupId>
602 <artifactId>spring-boot-maven-plugin</artifactId>
603 <version>${springboot.version}</version>
607 <goal>repackage</goal>
609 <phase>package</phase>
614 <groupId>org.sonatype.plugins</groupId>
615 <artifactId>nexus-staging-maven-plugin</artifactId>
616 <version>1.6.7</version>
617 <extensions>true</extensions>
619 <nexusUrl>https://nexus.onap.org</nexusUrl>
620 <stagingProfileId>176c31dfe190a</stagingProfileId>
621 <serverId>ecomp-staging</serverId>
622 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
626 <groupId>com.spotify</groupId>
627 <artifactId>docker-maven-plugin</artifactId>
628 <version>1.0.0</version>
630 <imageName>onap/clamp</imageName>
631 <dockerDirectory>src/main/docker</dockerDirectory>
632 <serverId>docker-hub</serverId>
634 <imageTag>latest</imageTag>
635 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
636 <imageTag>${project.docker.latesttag.version}</imageTag>
638 <forceTags>true</forceTags>
641 <targetPath>/</targetPath>
642 <directory>${project.build.directory}</directory>
643 <include>${project.build.finalName}.jar</include>
646 <targetPath>/</targetPath>
647 <directory>${project.build.directory}</directory>
648 <include>etc/config/**</include>
651 <targetPath>/</targetPath>
652 <directory>${project.build.directory}</directory>
653 <include>etc/keystore/**</include>
660 <phase>package</phase>
665 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
667 <http_proxy>${env.HTTP_PROXY}</http_proxy>
668 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
674 <id>tag-image-latest-timestamp</id>
675 <phase>package</phase>
680 <image>onap/clamp</image>
681 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
682 <skipDockerTag>${skip.docker.push}</skipDockerTag>
686 <id>push-image-latest-timestamp</id>
687 <phase>deploy</phase>
692 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
693 <skipDockerPush>${skip.docker.push}</skipDockerPush>
697 <id>tag-image-latest</id>
698 <phase>package</phase>
703 <image>onap/clamp</image>
704 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
705 <skipDockerTag>${skip.docker.push}</skipDockerTag>
709 <id>push-image-latest</id>
710 <phase>deploy</phase>
715 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
716 <skipDockerPush>${skip.docker.push}</skipDockerPush>
721 <phase>package</phase>
726 <image>onap/clamp</image>
727 <newName>${docker.push.registry}/onap/clamp:latest</newName>
728 <skipDockerTag>${skip.docker.push}</skipDockerTag>
733 <phase>deploy</phase>
738 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
739 <skipDockerPush>${skip.docker.push}</skipDockerPush>
745 <groupId>org.apache.maven.plugins</groupId>
746 <artifactId>maven-surefire-plugin</artifactId>
747 <version>2.19.1</version>
749 <forkCount>1</forkCount>
750 <reuseForks>false</reuseForks>
755 <groupId>org.apache.maven.plugins</groupId>
756 <artifactId>maven-failsafe-plugin</artifactId>
757 <version>2.16</version>
761 <id>integration-tests</id>
763 <goal>integration-test</goal>
768 <include>**/*ItCase.java</include>
770 <forkCount>1</forkCount>
771 <reuseForks>false</reuseForks>
778 <groupId>io.fabric8</groupId>
779 <artifactId>docker-maven-plugin</artifactId>
780 <version>0.16.5</version>
782 <verbose>true</verbose>
783 <apiVersion>1.23</apiVersion>
786 <name>mariadb:10.1.11</name>
787 <alias>mariadb</alias>
790 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
792 <hostname>mariadb</hostname>
795 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
796 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
800 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
804 <port>${docker.mariadb.port.host}:3306</port>
809 <name>python:2-slim</name>
810 <alias>python</alias>
812 <hostname>python</hostname>
815 <volume>${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app</volume>
816 <volume>${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache</volume>
829 <port>${docker.http-cache.port.host}:8080</port>
831 <workingDir>/usr/src/http-cache-app</workingDir>
833 <shell>./start_http_cache.sh ${http.proxy} --python_proxyaddress localhost:${docker.http-cache.port.host}</shell>
838 <skip>${skipITs}</skip>
843 <id>docker-start-for-it</id>
844 <phase>pre-integration-test</phase>
849 <skip>${skipITs}</skip>
853 <id>docker-stop-for-it</id>
854 <phase>post-integration-test</phase>
859 <skip>${skipITs}</skip>
866 <groupId>org.jacoco</groupId>
867 <artifactId>jacoco-maven-plugin</artifactId>
868 <version>0.7.7.201606060606</version>
870 <dumpOnExit>true</dumpOnExit>
872 <include>org.onap.clamp.*</include>
877 <id>pre-unit-test</id>
879 <goal>prepare-agent</goal>
882 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
883 <!-- <append>true</append> -->
887 <id>pre-integration-test</id>
888 <phase>pre-integration-test</phase>
890 <goal>prepare-agent</goal>
893 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
894 <!-- <append>true</append> -->
901 <phase>post-integration-test</phase>
904 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
905 <directory>${project.build.directory}/coverage-reports</directory>
907 <include>*.exec</include>
911 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
917 <!-- This plugin will be useful when we will have multi-modules project -->
919 <groupId>org.codehaus.mojo</groupId>
920 <artifactId>versions-maven-plugin</artifactId>
921 <version>1.3.1</version>
929 <skip.staging.artifacts>true</skip.staging.artifacts>
930 <skip.docker.build>false</skip.docker.build>
931 <skip.docker.tag>false</skip.docker.tag>
932 <skip.docker.push>false</skip.docker.push>