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.0.1-SNAPSHOT</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.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 <sdk.java.common.logging>0.0.3-oss</sdk.java.common.logging>
67 <project.scm.id>git-server</project.scm.id>
68 <java.version>1.8</java.version>
69 <csi.logging>6.1.0.6-oss</csi.logging>
70 <sdk.camel.rest>6.2.0.6-oss</sdk.camel.rest>
71 <sdk.camunda.core>6.1.0.3-oss</sdk.camunda.core>
73 <sonar.language>java</sonar.language>
74 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
75 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
76 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
77 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
78 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
79 <sonar.projectVersion>${project.version}</sonar.projectVersion>
81 <docker.push.registry>localhost:5000</docker.push.registry>
82 <skip.docker.build>true</skip.docker.build>
83 <skip.docker.push>true</skip.docker.push>
84 <skip.staging.artifacts>false</skip.staging.artifacts>
87 <distributionManagement>
89 <id>ecomp-releases</id>
90 <name>Clamp Release Repository</name>
91 <url>https://nexus.onap.org/content/repositories/releases/</url>
94 <id>ecomp-snapshots</id>
95 <name>Clamp Snapshot Repository</name>
96 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
100 <url>dav:https://nexus.onap.org/content/sites/site/org/onap/clamp/${project.version}</url>
102 </distributionManagement>
107 <name>Maven 2 repository 2</name>
108 <url>http://repo2.maven.org/maven2/</url>
111 <id>ecomp-releases</id>
112 <name>ONAP Release Repository</name>
113 <url>https://nexus.onap.org/content/repositories/releases/</url>
116 <id>ecomp-staging</id>
117 <name>ONAP Staging Repository</name>
118 <url>https://nexus.onap.org/content/repositories/staging/</url>
121 <id>ecomp-snapshots</id>
122 <name>ONAP Snapshot Repository</name>
123 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
125 <enabled>true</enabled>
128 <enabled>false</enabled>
133 <name>Spring repo</name>
134 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
137 <id>repository.jboss.org-public</id>
138 <name>JBoss.org Maven repository</name>
139 <url>https://repository.jboss.org/nexus/content/groups/public</url>
143 <dependencyManagement>
146 <!-- Import dependency management from Spring Boot -->
147 <groupId>org.springframework.boot</groupId>
148 <artifactId>spring-boot-dependencies</artifactId>
149 <version>1.4.1.RELEASE</version>
151 <scope>import</scope>
154 </dependencyManagement>
159 <groupId>com.googlecode.json-simple</groupId>
160 <artifactId>json-simple</artifactId>
161 <version>1.1</version>
164 <groupId>org.apache.commons</groupId>
165 <artifactId>commons-vfs2</artifactId>
166 <version>2.0</version>
170 <groupId>org.springframework.security</groupId>
171 <artifactId>spring-security-test</artifactId>
177 <!-- Dependencies of parent pom start -->
179 <groupId>com.att.ajsc</groupId>
180 <artifactId>sdk-java-common-logging</artifactId>
181 <version>${sdk.java.common.logging}</version>
184 <groupId>org.springframework.boot</groupId>
185 <artifactId>spring-boot-starter-tomcat</artifactId>
186 <scope>compile</scope>
189 <groupId>org.springframework.boot</groupId>
190 <artifactId>spring-boot-starter-actuator</artifactId>
193 <groupId>org.springframework.boot</groupId>
194 <artifactId>spring-boot-starter-security</artifactId>
197 <groupId>org.springframework.boot</groupId>
198 <artifactId>spring-boot-starter-test</artifactId>
202 <groupId>joda-time</groupId>
203 <artifactId>joda-time</artifactId>
206 <groupId>org.springframework</groupId>
207 <artifactId>spring-context</artifactId>
210 <groupId>org.slf4j</groupId>
211 <artifactId>slf4j-api</artifactId>
214 <groupId>javax.ws.rs</groupId>
215 <artifactId>javax.ws.rs-api</artifactId>
216 <version>2.0</version>
219 <groupId>org.springframework</groupId>
220 <artifactId>spring-test</artifactId>
223 <groupId>junit</groupId>
224 <artifactId>junit</artifactId>
227 <groupId>org.mockito</groupId>
228 <artifactId>mockito-all</artifactId>
229 <version>1.9.5</version>
232 <groupId>commons-logging</groupId>
233 <artifactId>commons-logging</artifactId>
234 <version>1.1.1</version>
237 <groupId>org.springframework</groupId>
238 <artifactId>spring-aspects</artifactId>
241 <groupId>com.fasterxml.jackson.core</groupId>
242 <artifactId>jackson-core</artifactId>
245 <groupId>com.fasterxml.jackson.core</groupId>
246 <artifactId>jackson-databind</artifactId>
249 <groupId>org.springframework</groupId>
250 <artifactId>spring-webmvc</artifactId>
253 <groupId>org.springframework.boot</groupId>
254 <artifactId>spring-boot-starter-web</artifactId>
257 <groupId>log4j</groupId>
258 <artifactId>log4j</artifactId>
259 <version>1.2.17</version>
262 <groupId>org.springframework.boot</groupId>
263 <artifactId>spring-boot</artifactId>
266 <groupId>org.springframework.boot</groupId>
267 <artifactId>spring-boot-autoconfigure</artifactId>
270 <groupId>javax.transaction</groupId>
271 <artifactId>jta</artifactId>
272 <version>1.1</version>
275 <groupId>javax.persistence</groupId>
276 <artifactId>persistence-api</artifactId>
277 <version>1.0.2</version>
280 <groupId>org.hibernate</groupId>
281 <artifactId>hibernate-annotations</artifactId>
282 <version>3.5.6-Final</version>
285 <groupId>org.apache.geronimo.specs</groupId>
286 <artifactId>geronimo-jpa_2.0_spec</artifactId>
287 <version>1.1</version>
290 <groupId>dom4j</groupId>
291 <artifactId>dom4j</artifactId>
292 <version>1.6.1</version>
294 <!-- Dependencies of parent pom end -->
296 <groupId>com.att.ajsc</groupId>
297 <artifactId>sdk-java-camel-rest</artifactId>
298 <version>${sdk.camel.rest}</version>
301 <groupId>io.swagger</groupId>
302 <artifactId>swagger-core</artifactId>
303 <version>1.5.8</version>
306 <groupId>io.swagger</groupId>
307 <artifactId>swagger-annotations</artifactId>
308 <version>1.5.8</version>
311 <!-- Camunda Core -->
313 <groupId>com.att.ajsc</groupId>
314 <artifactId>sdk-java-camunda-core</artifactId>
315 <version>${sdk.camunda.core}</version>
319 <groupId>org.springframework</groupId>
320 <artifactId>spring-context-support</artifactId>
324 <groupId>com.att.ajsc</groupId>
325 <artifactId>sdk-java-common-interceptors</artifactId>
326 <version>${csi.logging}</version>
329 <groupId>org.eclipse.jetty.orbit</groupId>
330 <artifactId>javax.servlet</artifactId>
333 <groupId>com.att.ajsc</groupId>
334 <artifactId>ajsc-core</artifactId>
338 <!-- CSI Logging End -->
340 <groupId>org.onap.policy.engine</groupId>
341 <artifactId>PolicyEngineAPI</artifactId>
342 <version>1.1.0-SNAPSHOT</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>
357 <artifactId>jackson-databind</artifactId>
358 <groupId>com.fasterxml.jackson.core</groupId>
363 <groupId>org.onap.policy.common</groupId>
364 <artifactId>ONAP-Logging</artifactId>
365 <version>1.1.0-SNAPSHOT</version>
368 <artifactId>log4j</artifactId>
369 <groupId>log4j</groupId>
372 <groupId>org.slf4j</groupId>
373 <artifactId>slf4j-log4j12</artifactId>
376 <artifactId>apache-log4j-extras</artifactId>
377 <groupId>log4j</groupId>
382 <groupId>org.onap.policy.engine</groupId>
383 <artifactId>ControlloopPolicy</artifactId>
384 <version>1.1.0-SNAPSHOT</version>
387 <artifactId>log4j</artifactId>
388 <groupId>log4j</groupId>
391 <groupId>org.slf4j</groupId>
392 <artifactId>slf4j-log4j12</artifactId>
395 <artifactId>apache-log4j-extras</artifactId>
396 <groupId>log4j</groupId>
401 <groupId>com.fasterxml.jackson.core</groupId>
402 <artifactId>jackson-databind</artifactId>
403 <version>2.6.3</version>
406 <groupId>com.fasterxml.jackson.dataformat</groupId>
407 <artifactId>jackson-dataformat-yaml</artifactId>
408 <version>2.6.3</version>
411 <groupId>org.apache.commons</groupId>
412 <artifactId>commons-csv</artifactId>
413 <version>1.3</version>
416 <groupId>org.jboss.resteasy</groupId>
417 <artifactId>resteasy-client</artifactId>
418 <version>3.0.8.Final</version>
421 <groupId>com.sun.faces</groupId>
422 <artifactId>jsf-api</artifactId>
423 <version>2.1.7</version>
426 <groupId>com.sun.faces</groupId>
427 <artifactId>jsf-impl</artifactId>
428 <version>2.1.7</version>
434 <finalName>clamp</finalName>
438 <directory>src/test/resources</directory>
440 <exclude>**/*.jks</exclude>
442 <filtering>true</filtering>
445 <directory>src/test/resources/https</directory>
447 <include>**.jks</include>
449 <filtering>false</filtering>
450 <targetPath>https</targetPath>
455 <directory>src/main/resources</directory>
456 <filtering>true</filtering>
459 <directory>src/main/docker</directory>
461 <include>**/*</include>
463 <filtering>true</filtering>
469 <groupId>org.apache.maven.plugins</groupId>
470 <artifactId>maven-jar-plugin</artifactId>
471 <version>3.0.2</version>
474 <id>jar-with-only-classes</id>
475 <phase>package</phase>
480 <classifier>classes</classifier>
482 <include>org/**</include>
489 <groupId>com.github.kongchen</groupId>
490 <artifactId>swagger-maven-plugin</artifactId>
491 <version>3.1.5</version>
494 <phase>compile</phase>
496 <goal>generate</goal>
502 <location>org.onap.clamp.clds.service</location>
504 <basePath>/</basePath>
506 <title>${project.artifactId} Service</title>
507 <version>${project.version}</version>
509 <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
517 <groupId>org.codehaus.mojo</groupId>
518 <artifactId>build-helper-maven-plugin</artifactId>
519 <version>3.0.0</version>
523 <goal>attach-artifact</goal>
525 <phase>package</phase>
529 <file>${project.build.directory}/clamp-classes.jar</file>
531 <classifier>classes</classifier>
540 <groupId>org.springframework.boot</groupId>
541 <artifactId>spring-boot-maven-plugin</artifactId>
542 <version>1.5.3.RELEASE</version>
546 <goal>repackage</goal>
548 <phase>package</phase>
553 <groupId>org.apache.maven.plugins</groupId>
554 <artifactId>maven-gpg-plugin</artifactId>
555 <version>1.5</version>
561 <id>sign-artifacts</id>
562 <phase>verify</phase>
570 <groupId>org.sonatype.plugins</groupId>
571 <artifactId>nexus-staging-maven-plugin</artifactId>
572 <version>1.6.7</version>
573 <extensions>true</extensions>
575 <nexusUrl>https://nexus.onap.org</nexusUrl>
576 <stagingProfileId>176c31dfe190a</stagingProfileId>
577 <serverId>ecomp-staging</serverId>
578 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
582 <groupId>com.spotify</groupId>
583 <artifactId>docker-maven-plugin</artifactId>
584 <version>1.0.0</version>
586 <imageName>onap/clamp</imageName>
587 <dockerDirectory>src/main/docker</dockerDirectory>
588 <serverId>docker-hub</serverId>
590 <imageTag>${project.version}</imageTag>
591 <imageTag>latest</imageTag>
593 <forceTags>true</forceTags>
596 <targetPath>/</targetPath>
597 <directory>${project.build.directory}</directory>
598 <include>${project.build.finalName}.jar</include>
601 <targetPath>/</targetPath>
602 <directory>${project.build.directory}</directory>
603 <include>etc/config/**</include>
606 <targetPath>/</targetPath>
607 <directory>${project.build.directory}</directory>
608 <include>etc/keystore/**</include>
615 <phase>package</phase>
620 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
622 <http_proxy>${env.HTTP_PROXY}</http_proxy>
623 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
629 <phase>package</phase>
634 <image>onap/clamp</image>
635 <newName>${docker.push.registry}/onap/clamp</newName>
636 <skipDockerTag>${skip.docker.push}</skipDockerTag>
641 <phase>deploy</phase>
646 <imageName>${docker.push.registry}/onap/clamp</imageName>
647 <skipDockerPush>${skip.docker.push}</skipDockerPush>
653 <groupId>org.apache.maven.plugins</groupId>
654 <artifactId>maven-surefire-plugin</artifactId>
655 <version>2.19.1</version>
657 <forkCount>1</forkCount>
658 <reuseForks>false</reuseForks>
663 <groupId>org.apache.maven.plugins</groupId>
664 <artifactId>maven-failsafe-plugin</artifactId>
665 <version>2.16</version>
669 <id>integration-tests</id>
671 <goal>integration-test</goal>
675 <forkCount>1</forkCount>
676 <reuseForks>false</reuseForks>
683 <groupId>io.fabric8</groupId>
684 <artifactId>docker-maven-plugin</artifactId>
685 <version>0.16.5</version>
687 <verbose>true</verbose>
688 <apiVersion>1.23</apiVersion>
691 <name>mariadb:10.1.11</name>
692 <alias>mariadb</alias>
695 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
697 <hostname>mariadb</hostname>
700 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
701 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
705 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
709 <port>${docker.mariadb.port.host}:3306</port>
718 <id>mariadb-start-for-it</id>
719 <phase>pre-integration-test</phase>
724 <skip>${skipITs}</skip>
728 <id>mariadb-stop-for-it</id>
729 <phase>post-integration-test</phase>
734 <skip>${skipITs}</skip>
741 <groupId>org.jacoco</groupId>
742 <artifactId>jacoco-maven-plugin</artifactId>
743 <version>0.7.7.201606060606</version>
745 <dumpOnExit>true</dumpOnExit>
747 <include>org.onap.clamp.*</include>
752 <id>pre-unit-test</id>
754 <goal>prepare-agent</goal>
757 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
758 <!-- <append>true</append> -->
762 <id>pre-integration-test</id>
763 <phase>pre-integration-test</phase>
765 <goal>prepare-agent</goal>
768 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
769 <!-- <append>true</append> -->
776 <phase>post-integration-test</phase>
779 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
780 <directory>${project.build.directory}/coverage-reports</directory>
782 <include>*.exec</include>
786 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
792 <!-- This plugin will be useful when we will have multi-modules project -->
794 <groupId>org.codehaus.mojo</groupId>
795 <artifactId>versions-maven-plugin</artifactId>
796 <version>1.3.1</version>
804 <skip.staging.artifacts>true</skip.staging.artifacts>
805 <skip.docker.build>false</skip.docker.build>
806 <skip.docker.tag>false</skip.docker.tag>
807 <skip.docker.push>false</skip.docker.push>