1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
5 ================================================================================
6 Copyright (C) 2017 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>1.1.0</version>
31 <name>ONAP CLAMP</name>
34 <groupId>org.onap.oparent</groupId>
35 <artifactId>oparent</artifactId>
36 <version>1.0.0-SNAPSHOT</version>
40 This project build the ONAP CLAMP JAR that contains AJSC + CLAMP code.
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 <sdk.java.common.logging>0.0.3-oss</sdk.java.common.logging>
70 <project.scm.id>git-server</project.scm.id>
71 <java.version>1.8</java.version>
72 <csi.logging>6.1.0.6-oss</csi.logging>
73 <sdk.camel.rest>6.2.0.6-oss</sdk.camel.rest>
74 <sdk.camunda.core>6.1.0.3-oss</sdk.camunda.core>
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>
90 <distributionManagement>
92 <id>ecomp-releases</id>
93 <name>Clamp Release Repository</name>
94 <url>https://nexus.onap.org/content/repositories/releases/</url>
97 <id>ecomp-snapshots</id>
98 <name>Clamp Snapshot Repository</name>
99 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
100 </snapshotRepository>
103 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
105 </distributionManagement>
110 <name>Maven 2 repository 2</name>
111 <url>http://repo2.maven.org/maven2/</url>
114 <id>ecomp-releases</id>
115 <name>ONAP Release Repository</name>
116 <url>https://nexus.onap.org/content/repositories/releases/</url>
119 <id>ecomp-staging</id>
120 <name>ONAP Staging Repository</name>
121 <url>https://nexus.onap.org/content/repositories/staging/</url>
124 <id>ecomp-snapshots</id>
125 <name>ONAP Snapshot Repository</name>
126 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
128 <enabled>true</enabled>
131 <enabled>false</enabled>
136 <name>Spring repo</name>
137 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
140 <id>repository.jboss.org-public</id>
141 <name>JBoss.org Maven repository</name>
142 <url>https://repository.jboss.org/nexus/content/groups/public</url>
146 <dependencyManagement>
149 <!-- Import dependency management from Spring Boot -->
150 <groupId>org.springframework.boot</groupId>
151 <artifactId>spring-boot-dependencies</artifactId>
152 <version>1.4.1.RELEASE</version>
154 <scope>import</scope>
157 </dependencyManagement>
162 <groupId>com.googlecode.json-simple</groupId>
163 <artifactId>json-simple</artifactId>
164 <version>1.1</version>
167 <groupId>org.apache.commons</groupId>
168 <artifactId>commons-vfs2</artifactId>
169 <version>2.0</version>
173 <groupId>org.springframework.security</groupId>
174 <artifactId>spring-security-test</artifactId>
180 <!-- Dependencies of parent pom start -->
182 <groupId>com.att.ajsc</groupId>
183 <artifactId>sdk-java-common-logging</artifactId>
184 <version>${sdk.java.common.logging}</version>
187 <groupId>org.springframework.boot</groupId>
188 <artifactId>spring-boot-starter-tomcat</artifactId>
189 <scope>compile</scope>
192 <groupId>org.springframework.boot</groupId>
193 <artifactId>spring-boot-starter-actuator</artifactId>
196 <groupId>org.springframework.boot</groupId>
197 <artifactId>spring-boot-starter-security</artifactId>
200 <groupId>org.springframework.boot</groupId>
201 <artifactId>spring-boot-starter-test</artifactId>
205 <groupId>joda-time</groupId>
206 <artifactId>joda-time</artifactId>
209 <groupId>org.springframework</groupId>
210 <artifactId>spring-context</artifactId>
213 <groupId>org.slf4j</groupId>
214 <artifactId>slf4j-api</artifactId>
217 <groupId>javax.ws.rs</groupId>
218 <artifactId>javax.ws.rs-api</artifactId>
219 <version>2.0</version>
222 <groupId>org.springframework</groupId>
223 <artifactId>spring-test</artifactId>
226 <groupId>junit</groupId>
227 <artifactId>junit</artifactId>
230 <groupId>org.mockito</groupId>
231 <artifactId>mockito-all</artifactId>
232 <version>1.9.5</version>
235 <groupId>commons-logging</groupId>
236 <artifactId>commons-logging</artifactId>
237 <version>1.1.1</version>
240 <groupId>org.springframework</groupId>
241 <artifactId>spring-aspects</artifactId>
244 <groupId>com.fasterxml.jackson.core</groupId>
245 <artifactId>jackson-core</artifactId>
248 <groupId>com.fasterxml.jackson.core</groupId>
249 <artifactId>jackson-databind</artifactId>
252 <groupId>org.springframework</groupId>
253 <artifactId>spring-webmvc</artifactId>
256 <groupId>org.springframework.boot</groupId>
257 <artifactId>spring-boot-starter-web</artifactId>
260 <groupId>log4j</groupId>
261 <artifactId>log4j</artifactId>
262 <version>1.2.17</version>
265 <groupId>org.springframework.boot</groupId>
266 <artifactId>spring-boot</artifactId>
269 <groupId>org.springframework.boot</groupId>
270 <artifactId>spring-boot-autoconfigure</artifactId>
273 <groupId>javax.transaction</groupId>
274 <artifactId>jta</artifactId>
275 <version>1.1</version>
278 <groupId>javax.persistence</groupId>
279 <artifactId>persistence-api</artifactId>
280 <version>1.0.2</version>
283 <groupId>org.hibernate</groupId>
284 <artifactId>hibernate-annotations</artifactId>
285 <version>3.5.6-Final</version>
288 <groupId>org.apache.geronimo.specs</groupId>
289 <artifactId>geronimo-jpa_2.0_spec</artifactId>
290 <version>1.1</version>
293 <groupId>dom4j</groupId>
294 <artifactId>dom4j</artifactId>
295 <version>1.6.1</version>
297 <!-- Dependencies of parent pom end -->
299 <groupId>com.att.ajsc</groupId>
300 <artifactId>sdk-java-camel-rest</artifactId>
301 <version>${sdk.camel.rest}</version>
304 <groupId>io.swagger</groupId>
305 <artifactId>swagger-core</artifactId>
306 <version>1.5.8</version>
309 <groupId>io.swagger</groupId>
310 <artifactId>swagger-annotations</artifactId>
311 <version>1.5.8</version>
314 <!-- Camunda Core -->
316 <groupId>com.att.ajsc</groupId>
317 <artifactId>sdk-java-camunda-core</artifactId>
318 <version>${sdk.camunda.core}</version>
321 <groupId>mysql</groupId>
322 <artifactId>mysql-connector-java</artifactId>
328 <groupId>org.springframework</groupId>
329 <artifactId>spring-context-support</artifactId>
333 <groupId>com.att.ajsc</groupId>
334 <artifactId>sdk-java-common-interceptors</artifactId>
335 <version>${csi.logging}</version>
338 <groupId>org.eclipse.jetty.orbit</groupId>
339 <artifactId>javax.servlet</artifactId>
342 <groupId>com.att.ajsc</groupId>
343 <artifactId>ajsc-core</artifactId>
347 <!-- CSI Logging End -->
349 <groupId>org.onap.policy.engine</groupId>
350 <artifactId>PolicyEngineAPI</artifactId>
351 <version>1.1.0</version>
354 <artifactId>log4j</artifactId>
355 <groupId>log4j</groupId>
358 <groupId>org.slf4j</groupId>
359 <artifactId>slf4j-log4j12</artifactId>
362 <artifactId>apache-log4j-extras</artifactId>
363 <groupId>log4j</groupId>
366 <artifactId>jackson-databind</artifactId>
367 <groupId>com.fasterxml.jackson.core</groupId>
370 <groupId>mysql</groupId>
371 <artifactId>mysql-connector-java</artifactId>
376 <groupId>org.onap.policy.common</groupId>
377 <artifactId>ONAP-Logging</artifactId>
378 <version>1.1.0</version>
381 <artifactId>log4j</artifactId>
382 <groupId>log4j</groupId>
385 <groupId>org.slf4j</groupId>
386 <artifactId>slf4j-log4j12</artifactId>
389 <artifactId>apache-log4j-extras</artifactId>
390 <groupId>log4j</groupId>
395 <groupId>org.onap.policy.engine</groupId>
396 <artifactId>ControlloopPolicy</artifactId>
397 <version>1.1.0-SNAPSHOT</version>
400 <artifactId>log4j</artifactId>
401 <groupId>log4j</groupId>
404 <groupId>org.slf4j</groupId>
405 <artifactId>slf4j-log4j12</artifactId>
408 <artifactId>apache-log4j-extras</artifactId>
409 <groupId>log4j</groupId>
414 <groupId>com.fasterxml.jackson.core</groupId>
415 <artifactId>jackson-databind</artifactId>
416 <version>2.6.3</version>
419 <groupId>com.fasterxml.jackson.dataformat</groupId>
420 <artifactId>jackson-dataformat-yaml</artifactId>
421 <version>2.6.3</version>
424 <groupId>org.apache.commons</groupId>
425 <artifactId>commons-csv</artifactId>
426 <version>1.3</version>
429 <groupId>org.jboss.resteasy</groupId>
430 <artifactId>resteasy-client</artifactId>
431 <version>3.0.8.Final</version>
434 <groupId>com.sun.faces</groupId>
435 <artifactId>jsf-api</artifactId>
436 <version>2.1.7</version>
439 <groupId>com.sun.faces</groupId>
440 <artifactId>jsf-impl</artifactId>
441 <version>2.1.7</version>
444 <!-- Remove the MYSQL connector and replace it by Mariadb -->
446 <groupId>org.mariadb.jdbc</groupId>
447 <artifactId>mariadb-java-client</artifactId>
448 <version>2.1.1</version>
453 <finalName>clamp</finalName>
457 <directory>src/test/resources</directory>
459 <exclude>**/*.jks</exclude>
461 <filtering>true</filtering>
464 <directory>src/test/resources/https</directory>
466 <include>**.jks</include>
468 <filtering>false</filtering>
469 <targetPath>https</targetPath>
474 <directory>src/main/resources</directory>
475 <filtering>true</filtering>
478 <directory>src/main/docker</directory>
480 <include>**/*</include>
482 <filtering>true</filtering>
488 <groupId>org.codehaus.groovy.maven</groupId>
489 <artifactId>gmaven-plugin</artifactId>
490 <version>1.0</version>
493 <phase>validate</phase>
498 <source>${project.basedir}/src/main/script/TagVersion.groovy</source>
504 <groupId>org.apache.maven.plugins</groupId>
505 <artifactId>maven-jar-plugin</artifactId>
506 <version>3.0.2</version>
509 <id>jar-with-only-classes</id>
510 <phase>package</phase>
515 <classifier>classes</classifier>
517 <include>org/**</include>
524 <groupId>com.github.kongchen</groupId>
525 <artifactId>swagger-maven-plugin</artifactId>
526 <version>3.1.5</version>
529 <phase>compile</phase>
531 <goal>generate</goal>
537 <location>org.onap.clamp.clds.service</location>
539 <basePath>/</basePath>
541 <title>${project.artifactId} Service</title>
542 <version>${project.version}</version>
544 <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
552 <groupId>org.codehaus.mojo</groupId>
553 <artifactId>build-helper-maven-plugin</artifactId>
554 <version>3.0.0</version>
558 <goal>attach-artifact</goal>
560 <phase>package</phase>
564 <file>${project.build.directory}/clamp-classes.jar</file>
566 <classifier>classes</classifier>
575 <groupId>org.springframework.boot</groupId>
576 <artifactId>spring-boot-maven-plugin</artifactId>
577 <version>1.5.3.RELEASE</version>
581 <goal>repackage</goal>
583 <phase>package</phase>
588 <groupId>org.apache.maven.plugins</groupId>
589 <artifactId>maven-gpg-plugin</artifactId>
590 <version>1.5</version>
596 <id>sign-artifacts</id>
597 <phase>verify</phase>
605 <groupId>org.sonatype.plugins</groupId>
606 <artifactId>nexus-staging-maven-plugin</artifactId>
607 <version>1.6.7</version>
608 <extensions>true</extensions>
610 <nexusUrl>https://nexus.onap.org</nexusUrl>
611 <stagingProfileId>176c31dfe190a</stagingProfileId>
612 <serverId>ecomp-staging</serverId>
613 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
617 <groupId>com.spotify</groupId>
618 <artifactId>docker-maven-plugin</artifactId>
619 <version>1.0.0</version>
621 <imageName>onap/clamp</imageName>
622 <dockerDirectory>src/main/docker</dockerDirectory>
623 <serverId>docker-hub</serverId>
625 <imageTag>latest</imageTag>
626 <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
627 <imageTag>${project.docker.latesttag.version}</imageTag>
629 <forceTags>true</forceTags>
632 <targetPath>/</targetPath>
633 <directory>${project.build.directory}</directory>
634 <include>${project.build.finalName}.jar</include>
637 <targetPath>/</targetPath>
638 <directory>${project.build.directory}</directory>
639 <include>etc/config/**</include>
642 <targetPath>/</targetPath>
643 <directory>${project.build.directory}</directory>
644 <include>etc/keystore/**</include>
651 <phase>package</phase>
656 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
658 <http_proxy>${env.HTTP_PROXY}</http_proxy>
659 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
665 <id>tag-image-latest-timestamp</id>
666 <phase>package</phase>
671 <image>onap/clamp</image>
672 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</newName>
673 <skipDockerTag>${skip.docker.push}</skipDockerTag>
677 <id>push-image-latest-timestamp</id>
678 <phase>deploy</phase>
683 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttagtimestamp.version}</imageName>
684 <skipDockerPush>${skip.docker.push}</skipDockerPush>
688 <id>tag-image-latest</id>
689 <phase>package</phase>
694 <image>onap/clamp</image>
695 <newName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</newName>
696 <skipDockerTag>${skip.docker.push}</skipDockerTag>
700 <id>push-image-latest</id>
701 <phase>deploy</phase>
706 <imageName>${docker.push.registry}/onap/clamp:${project.docker.latesttag.version}</imageName>
707 <skipDockerPush>${skip.docker.push}</skipDockerPush>
712 <phase>package</phase>
717 <image>onap/clamp</image>
718 <newName>${docker.push.registry}/onap/clamp:latest</newName>
719 <skipDockerTag>${skip.docker.push}</skipDockerTag>
724 <phase>deploy</phase>
729 <imageName>${docker.push.registry}/onap/clamp:latest</imageName>
730 <skipDockerPush>${skip.docker.push}</skipDockerPush>
736 <groupId>org.apache.maven.plugins</groupId>
737 <artifactId>maven-surefire-plugin</artifactId>
738 <version>2.19.1</version>
740 <forkCount>1</forkCount>
741 <reuseForks>false</reuseForks>
746 <groupId>org.apache.maven.plugins</groupId>
747 <artifactId>maven-failsafe-plugin</artifactId>
748 <version>2.16</version>
752 <id>integration-tests</id>
754 <goal>integration-test</goal>
758 <forkCount>1</forkCount>
759 <reuseForks>false</reuseForks>
766 <groupId>io.fabric8</groupId>
767 <artifactId>docker-maven-plugin</artifactId>
768 <version>0.16.5</version>
770 <verbose>true</verbose>
771 <apiVersion>1.23</apiVersion>
774 <name>mariadb:10.1.11</name>
775 <alias>mariadb</alias>
778 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
780 <hostname>mariadb</hostname>
783 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
784 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
788 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
792 <port>${docker.mariadb.port.host}:3306</port>
801 <id>mariadb-start-for-it</id>
802 <phase>pre-integration-test</phase>
807 <skip>${skipITs}</skip>
811 <id>mariadb-stop-for-it</id>
812 <phase>post-integration-test</phase>
817 <skip>${skipITs}</skip>
824 <groupId>org.jacoco</groupId>
825 <artifactId>jacoco-maven-plugin</artifactId>
826 <version>0.7.7.201606060606</version>
828 <dumpOnExit>true</dumpOnExit>
830 <include>org.onap.clamp.*</include>
835 <id>pre-unit-test</id>
837 <goal>prepare-agent</goal>
840 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
841 <!-- <append>true</append> -->
845 <id>pre-integration-test</id>
846 <phase>pre-integration-test</phase>
848 <goal>prepare-agent</goal>
851 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
852 <!-- <append>true</append> -->
859 <phase>post-integration-test</phase>
862 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
863 <directory>${project.build.directory}/coverage-reports</directory>
865 <include>*.exec</include>
869 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
875 <!-- This plugin will be useful when we will have multi-modules project -->
877 <groupId>org.codehaus.mojo</groupId>
878 <artifactId>versions-maven-plugin</artifactId>
879 <version>1.3.1</version>
887 <skip.staging.artifacts>true</skip.staging.artifacts>
888 <skip.docker.build>false</skip.docker.build>
889 <skip.docker.tag>false</skip.docker.tag>
890 <skip.docker.push>false</skip.docker.push>