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>
86 <nexusproxy>https://nexus.onap.org</nexusproxy>
87 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
88 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
89 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
90 <sitePath>/content/sites/site/org/onap/clamp/${project.version}</sitePath>
93 <distributionManagement>
95 <id>ecomp-releases</id>
96 <name>Clamp Release Repository</name>
97 <url>${nexusproxy}/${releaseNexusPath}</url>
100 <id>ecomp-snapshots</id>
101 <name>Clamp Snapshot Repository</name>
102 <url>${nexusproxy}/${snapshotNexusPath}</url>
103 </snapshotRepository>
106 <url>dav:${nexusproxy}${sitePath}</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>${nexusproxy}/${releaseNexusPath}</url>
122 <id>ecomp-staging</id>
123 <name>ONAP Staging Repository</name>
124 <url>${nexusproxy}/${stagingNexusPath}</url>
127 <id>ecomp-snapshots</id>
128 <name>ONAP Snapshot Repository</name>
129 <url>${nexusproxy}/${snapshotNexusPath}</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>
152 <!-- Import dependency management from Spring Boot -->
153 <groupId>org.springframework.boot</groupId>
154 <artifactId>spring-boot-dependencies</artifactId>
155 <version>1.4.1.RELEASE</version>
157 <scope>import</scope>
160 </dependencyManagement>
165 <groupId>com.googlecode.json-simple</groupId>
166 <artifactId>json-simple</artifactId>
167 <version>1.1</version>
170 <groupId>org.apache.commons</groupId>
171 <artifactId>commons-vfs2</artifactId>
172 <version>2.0</version>
176 <groupId>org.springframework.security</groupId>
177 <artifactId>spring-security-test</artifactId>
183 <!-- Dependencies of parent pom start -->
185 <groupId>com.att.ajsc</groupId>
186 <artifactId>sdk-java-common-logging</artifactId>
187 <version>${sdk.java.common.logging}</version>
190 <groupId>org.springframework.boot</groupId>
191 <artifactId>spring-boot-starter-tomcat</artifactId>
192 <scope>compile</scope>
195 <groupId>org.springframework.boot</groupId>
196 <artifactId>spring-boot-starter-actuator</artifactId>
199 <groupId>org.springframework.boot</groupId>
200 <artifactId>spring-boot-starter-security</artifactId>
203 <groupId>org.springframework.boot</groupId>
204 <artifactId>spring-boot-starter-test</artifactId>
208 <groupId>joda-time</groupId>
209 <artifactId>joda-time</artifactId>
212 <groupId>org.springframework</groupId>
213 <artifactId>spring-context</artifactId>
216 <groupId>org.slf4j</groupId>
217 <artifactId>slf4j-api</artifactId>
220 <groupId>javax.ws.rs</groupId>
221 <artifactId>javax.ws.rs-api</artifactId>
222 <version>2.0</version>
225 <groupId>org.springframework</groupId>
226 <artifactId>spring-test</artifactId>
229 <groupId>junit</groupId>
230 <artifactId>junit</artifactId>
233 <groupId>org.mockito</groupId>
234 <artifactId>mockito-all</artifactId>
235 <version>1.9.5</version>
238 <groupId>commons-logging</groupId>
239 <artifactId>commons-logging</artifactId>
240 <version>1.1.1</version>
243 <groupId>org.springframework</groupId>
244 <artifactId>spring-aspects</artifactId>
247 <groupId>com.fasterxml.jackson.core</groupId>
248 <artifactId>jackson-core</artifactId>
251 <groupId>com.fasterxml.jackson.core</groupId>
252 <artifactId>jackson-databind</artifactId>
255 <groupId>org.springframework</groupId>
256 <artifactId>spring-webmvc</artifactId>
259 <groupId>org.springframework.boot</groupId>
260 <artifactId>spring-boot-starter-web</artifactId>
263 <groupId>log4j</groupId>
264 <artifactId>log4j</artifactId>
265 <version>1.2.17</version>
268 <groupId>org.springframework.boot</groupId>
269 <artifactId>spring-boot</artifactId>
272 <groupId>org.springframework.boot</groupId>
273 <artifactId>spring-boot-autoconfigure</artifactId>
276 <groupId>javax.transaction</groupId>
277 <artifactId>jta</artifactId>
278 <version>1.1</version>
281 <groupId>javax.persistence</groupId>
282 <artifactId>persistence-api</artifactId>
283 <version>1.0.2</version>
286 <groupId>org.hibernate</groupId>
287 <artifactId>hibernate-annotations</artifactId>
288 <version>3.5.6-Final</version>
291 <groupId>org.apache.geronimo.specs</groupId>
292 <artifactId>geronimo-jpa_2.0_spec</artifactId>
293 <version>1.1</version>
296 <groupId>dom4j</groupId>
297 <artifactId>dom4j</artifactId>
298 <version>1.6.1</version>
300 <!-- Dependencies of parent pom end -->
302 <groupId>com.att.ajsc</groupId>
303 <artifactId>sdk-java-camel-rest</artifactId>
304 <version>${sdk.camel.rest}</version>
307 <groupId>io.swagger</groupId>
308 <artifactId>swagger-core</artifactId>
309 <version>1.5.8</version>
312 <groupId>io.swagger</groupId>
313 <artifactId>swagger-annotations</artifactId>
314 <version>1.5.8</version>
317 <!-- Camunda Core -->
319 <groupId>com.att.ajsc</groupId>
320 <artifactId>sdk-java-camunda-core</artifactId>
321 <version>${sdk.camunda.core}</version>
325 <groupId>org.springframework</groupId>
326 <artifactId>spring-context-support</artifactId>
330 <groupId>com.att.ajsc</groupId>
331 <artifactId>sdk-java-common-interceptors</artifactId>
332 <version>${csi.logging}</version>
335 <groupId>org.eclipse.jetty.orbit</groupId>
336 <artifactId>javax.servlet</artifactId>
339 <groupId>com.att.ajsc</groupId>
340 <artifactId>ajsc-core</artifactId>
344 <!-- CSI Logging End -->
346 <groupId>org.onap.policy.engine</groupId>
347 <artifactId>PolicyEngineAPI</artifactId>
348 <version>1.1.0-SNAPSHOT</version>
351 <artifactId>log4j</artifactId>
352 <groupId>log4j</groupId>
355 <groupId>org.slf4j</groupId>
356 <artifactId>slf4j-log4j12</artifactId>
359 <artifactId>apache-log4j-extras</artifactId>
360 <groupId>log4j</groupId>
363 <artifactId>jackson-databind</artifactId>
364 <groupId>com.fasterxml.jackson.core</groupId>
369 <groupId>org.onap.policy.common</groupId>
370 <artifactId>ONAP-Logging</artifactId>
371 <version>1.1.0-SNAPSHOT</version>
374 <artifactId>log4j</artifactId>
375 <groupId>log4j</groupId>
378 <groupId>org.slf4j</groupId>
379 <artifactId>slf4j-log4j12</artifactId>
382 <artifactId>apache-log4j-extras</artifactId>
383 <groupId>log4j</groupId>
388 <groupId>org.onap.policy.engine</groupId>
389 <artifactId>ControlloopPolicy</artifactId>
390 <version>1.1.0-SNAPSHOT</version>
393 <artifactId>log4j</artifactId>
394 <groupId>log4j</groupId>
397 <groupId>org.slf4j</groupId>
398 <artifactId>slf4j-log4j12</artifactId>
401 <artifactId>apache-log4j-extras</artifactId>
402 <groupId>log4j</groupId>
407 <groupId>com.fasterxml.jackson.core</groupId>
408 <artifactId>jackson-databind</artifactId>
409 <version>2.6.3</version>
412 <groupId>com.fasterxml.jackson.dataformat</groupId>
413 <artifactId>jackson-dataformat-yaml</artifactId>
414 <version>2.6.3</version>
417 <groupId>org.apache.commons</groupId>
418 <artifactId>commons-csv</artifactId>
419 <version>1.3</version>
422 <groupId>org.jboss.resteasy</groupId>
423 <artifactId>resteasy-client</artifactId>
424 <version>3.0.8.Final</version>
427 <groupId>com.sun.faces</groupId>
428 <artifactId>jsf-api</artifactId>
429 <version>2.1.7</version>
432 <groupId>com.sun.faces</groupId>
433 <artifactId>jsf-impl</artifactId>
434 <version>2.1.7</version>
440 <finalName>clamp</finalName>
444 <directory>src/test/resources</directory>
446 <exclude>**/*.jks</exclude>
448 <filtering>true</filtering>
451 <directory>src/test/resources/https</directory>
453 <include>**.jks</include>
455 <filtering>false</filtering>
456 <targetPath>https</targetPath>
461 <directory>src/main/resources</directory>
462 <filtering>true</filtering>
465 <directory>src/main/docker</directory>
467 <include>**/*</include>
469 <filtering>true</filtering>
475 <groupId>org.apache.maven.plugins</groupId>
476 <artifactId>maven-jar-plugin</artifactId>
477 <version>3.0.2</version>
480 <id>jar-with-only-classes</id>
481 <phase>package</phase>
486 <classifier>classes</classifier>
488 <include>org/**</include>
495 <groupId>com.github.kongchen</groupId>
496 <artifactId>swagger-maven-plugin</artifactId>
497 <version>3.1.5</version>
500 <phase>compile</phase>
502 <goal>generate</goal>
508 <location>org.onap.clamp.clds.service</location>
510 <basePath>/</basePath>
512 <title>${project.artifactId} Service</title>
513 <version>${project.version}</version>
515 <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
523 <groupId>org.codehaus.mojo</groupId>
524 <artifactId>build-helper-maven-plugin</artifactId>
525 <version>3.0.0</version>
529 <goal>attach-artifact</goal>
531 <phase>package</phase>
535 <file>${project.build.directory}/clamp-classes.jar</file>
537 <classifier>classes</classifier>
546 <groupId>org.springframework.boot</groupId>
547 <artifactId>spring-boot-maven-plugin</artifactId>
548 <version>1.5.3.RELEASE</version>
552 <goal>repackage</goal>
554 <phase>package</phase>
559 <groupId>org.apache.maven.plugins</groupId>
560 <artifactId>maven-gpg-plugin</artifactId>
561 <version>1.5</version>
567 <id>sign-artifacts</id>
568 <phase>verify</phase>
576 <groupId>org.sonatype.plugins</groupId>
577 <artifactId>nexus-staging-maven-plugin</artifactId>
578 <version>1.6.7</version>
579 <extensions>true</extensions>
581 <nexusUrl>${nexusproxy}</nexusUrl>
582 <stagingProfileId>176c31dfe190a</stagingProfileId>
583 <serverId>ecomp-staging</serverId>
584 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
588 <groupId>com.spotify</groupId>
589 <artifactId>docker-maven-plugin</artifactId>
590 <version>1.0.0</version>
592 <imageName>onap/clamp</imageName>
593 <dockerDirectory>src/main/docker</dockerDirectory>
594 <serverId>docker-hub</serverId>
596 <imageTag>${project.version}</imageTag>
597 <imageTag>latest</imageTag>
599 <forceTags>true</forceTags>
602 <targetPath>/</targetPath>
603 <directory>${project.build.directory}</directory>
604 <include>${project.build.finalName}.jar</include>
607 <targetPath>/</targetPath>
608 <directory>${project.build.directory}</directory>
609 <include>etc/config/**</include>
612 <targetPath>/</targetPath>
613 <directory>${project.build.directory}</directory>
614 <include>etc/keystore/**</include>
621 <phase>package</phase>
626 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
628 <http_proxy>${env.HTTP_PROXY}</http_proxy>
629 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
635 <phase>package</phase>
640 <image>onap/clamp</image>
641 <newName>${docker.push.registry}/onap/clamp</newName>
642 <skipDockerTag>${skip.docker.push}</skipDockerTag>
647 <phase>deploy</phase>
652 <imageName>${docker.push.registry}/onap/clamp</imageName>
653 <skipDockerPush>${skip.docker.push}</skipDockerPush>
659 <groupId>org.apache.maven.plugins</groupId>
660 <artifactId>maven-surefire-plugin</artifactId>
661 <version>2.19.1</version>
663 <forkCount>1</forkCount>
664 <reuseForks>false</reuseForks>
669 <groupId>org.apache.maven.plugins</groupId>
670 <artifactId>maven-failsafe-plugin</artifactId>
671 <version>2.16</version>
675 <id>integration-tests</id>
677 <goal>integration-test</goal>
681 <forkCount>1</forkCount>
682 <reuseForks>false</reuseForks>
689 <groupId>io.fabric8</groupId>
690 <artifactId>docker-maven-plugin</artifactId>
691 <version>0.16.5</version>
693 <verbose>true</verbose>
694 <apiVersion>1.23</apiVersion>
697 <name>mariadb:10.1.11</name>
698 <alias>mariadb</alias>
701 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
703 <hostname>mariadb</hostname>
706 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
707 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
711 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
715 <port>${docker.mariadb.port.host}:3306</port>
724 <id>mariadb-start-for-it</id>
725 <phase>pre-integration-test</phase>
730 <skip>${skipITs}</skip>
734 <id>mariadb-stop-for-it</id>
735 <phase>post-integration-test</phase>
740 <skip>${skipITs}</skip>
747 <groupId>org.jacoco</groupId>
748 <artifactId>jacoco-maven-plugin</artifactId>
749 <version>0.7.7.201606060606</version>
751 <dumpOnExit>true</dumpOnExit>
753 <include>org.onap.clamp.*</include>
758 <id>pre-unit-test</id>
760 <goal>prepare-agent</goal>
763 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
764 <!-- <append>true</append> -->
768 <id>pre-integration-test</id>
769 <phase>pre-integration-test</phase>
771 <goal>prepare-agent</goal>
774 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
775 <!-- <append>true</append> -->
782 <phase>post-integration-test</phase>
785 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
786 <directory>${project.build.directory}/coverage-reports</directory>
788 <include>*.exec</include>
792 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
798 <!-- This plugin will be useful when we will have multi-modules project -->
800 <groupId>org.codehaus.mojo</groupId>
801 <artifactId>versions-maven-plugin</artifactId>
802 <version>1.3.1</version>
810 <skip.staging.artifacts>true</skip.staging.artifacts>
811 <skip.docker.build>false</skip.docker.build>
812 <skip.docker.tag>false</skip.docker.tag>
813 <skip.docker.push>false</skip.docker.push>