1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.onap.clamp</groupId>
6 <artifactId>clds</artifactId>
7 <version>1.0.1-SNAPSHOT</version>
8 <name>ONAP CLAMP</name>
11 <groupId>org.onap.oparent</groupId>
12 <artifactId>oparent</artifactId>
13 <version>1.0.0-SNAPSHOT</version>
17 This project build the ONAP CLAMP JAR that contains AJSC + CLAMP code.
19 By Default "mvn clean install" command will execute also the unit tests
20 and the integration tests. The integration tests require a docker engine running.
22 If you want to skip the intergation test you can by doing:
23 "mvn clean install -DskipITs=true"
25 For Spring it's possible to specify the application.properties location
26 "mvn clean install -Dspring.config.location=classpath:application-test.properties"
28 The application.properties contains the location of the CLAMP parameters files:
29 - org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.properties
30 - org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
31 - org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
32 - org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
37 <maven.compiler.source>1.8</maven.compiler.source>
38 <maven.compiler.target>1.8</maven.compiler.target>
39 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
40 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
42 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
43 <sdk.java.common.logging>0.0.3-oss</sdk.java.common.logging>
44 <project.scm.id>git-server</project.scm.id>
45 <java.version>1.8</java.version>
46 <csi.logging>6.1.0.6-oss</csi.logging>
47 <sdk.camel.rest>6.2.0.6-oss</sdk.camel.rest>
48 <sdk.camunda.core>6.1.0.3-oss</sdk.camunda.core>
50 <sonar.language>java</sonar.language>
51 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
52 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
53 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
54 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
55 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
56 <sonar.projectVersion>${project.version}</sonar.projectVersion>
58 <docker.push.registry>localhost:5000</docker.push.registry>
59 <skip.docker.build>true</skip.docker.build>
60 <skip.docker.tag>true</skip.docker.tag>
61 <skip.docker.push>true</skip.docker.push>
62 <skip.staging.artifacts>false</skip.staging.artifacts>
64 <nexusproxy>https://nexus.onap.org</nexusproxy>
65 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
66 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
67 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
68 <sitePath>/content/sites/site/org/onap/clamp/${project.version}</sitePath>
71 <distributionManagement>
73 <id>ecomp-releases</id>
74 <name>Clamp Release Repository</name>
75 <url>${nexusproxy}/${releaseNexusPath}</url>
78 <id>ecomp-snapshots</id>
79 <name>Clamp Snapshot Repository</name>
80 <url>${nexusproxy}/${snapshotNexusPath}</url>
84 <url>dav:${nexusproxy}${sitePath}</url>
86 </distributionManagement>
91 <name>Maven 2 repository 2</name>
92 <url>http://repo2.maven.org/maven2/</url>
95 <id>ecomp-releases</id>
96 <name>ONAP Release Repository</name>
97 <url>${nexusproxy}/${releaseNexusPath}</url>
100 <id>ecomp-staging</id>
101 <name>ONAP Staging Repository</name>
102 <url>${nexusproxy}/${stagingNexusPath}</url>
105 <id>ecomp-snapshots</id>
106 <name>ONAP Snapshot Repository</name>
107 <url>${nexusproxy}/${snapshotNexusPath}</url>
109 <enabled>true</enabled>
112 <enabled>false</enabled>
117 <name>Spring repo</name>
118 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
121 <id>repository.jboss.org-public</id>
122 <name>JBoss.org Maven repository</name>
123 <url>https://repository.jboss.org/nexus/content/groups/public</url>
127 <dependencyManagement>
130 <!-- Import dependency management from Spring Boot -->
131 <groupId>org.springframework.boot</groupId>
132 <artifactId>spring-boot-dependencies</artifactId>
133 <version>1.4.1.RELEASE</version>
135 <scope>import</scope>
138 </dependencyManagement>
143 <groupId>com.googlecode.json-simple</groupId>
144 <artifactId>json-simple</artifactId>
145 <version>1.1</version>
148 <groupId>org.apache.commons</groupId>
149 <artifactId>commons-vfs2</artifactId>
150 <version>2.0</version>
154 <groupId>org.springframework.security</groupId>
155 <artifactId>spring-security-test</artifactId>
161 <!-- Dependencies of parent pom start -->
163 <groupId>com.att.ajsc</groupId>
164 <artifactId>sdk-java-common-logging</artifactId>
165 <version>${sdk.java.common.logging}</version>
168 <groupId>org.springframework.boot</groupId>
169 <artifactId>spring-boot-starter-tomcat</artifactId>
170 <scope>compile</scope>
173 <groupId>org.springframework.boot</groupId>
174 <artifactId>spring-boot-starter-actuator</artifactId>
177 <groupId>org.springframework.boot</groupId>
178 <artifactId>spring-boot-starter-security</artifactId>
181 <groupId>org.springframework.boot</groupId>
182 <artifactId>spring-boot-starter-test</artifactId>
186 <groupId>joda-time</groupId>
187 <artifactId>joda-time</artifactId>
190 <groupId>org.springframework</groupId>
191 <artifactId>spring-context</artifactId>
194 <groupId>org.slf4j</groupId>
195 <artifactId>slf4j-api</artifactId>
198 <groupId>javax.ws.rs</groupId>
199 <artifactId>javax.ws.rs-api</artifactId>
200 <version>2.0</version>
203 <groupId>org.springframework</groupId>
204 <artifactId>spring-test</artifactId>
207 <groupId>junit</groupId>
208 <artifactId>junit</artifactId>
211 <groupId>org.mockito</groupId>
212 <artifactId>mockito-all</artifactId>
213 <version>1.9.5</version>
216 <groupId>commons-logging</groupId>
217 <artifactId>commons-logging</artifactId>
218 <version>1.1.1</version>
221 <groupId>org.springframework</groupId>
222 <artifactId>spring-aspects</artifactId>
225 <groupId>com.fasterxml.jackson.core</groupId>
226 <artifactId>jackson-core</artifactId>
229 <groupId>com.fasterxml.jackson.core</groupId>
230 <artifactId>jackson-databind</artifactId>
233 <groupId>org.springframework</groupId>
234 <artifactId>spring-webmvc</artifactId>
237 <groupId>org.springframework.boot</groupId>
238 <artifactId>spring-boot-starter-web</artifactId>
241 <groupId>log4j</groupId>
242 <artifactId>log4j</artifactId>
243 <version>1.2.17</version>
246 <groupId>org.springframework.boot</groupId>
247 <artifactId>spring-boot</artifactId>
250 <groupId>org.springframework.boot</groupId>
251 <artifactId>spring-boot-autoconfigure</artifactId>
254 <groupId>javax.transaction</groupId>
255 <artifactId>jta</artifactId>
256 <version>1.1</version>
259 <groupId>javax.persistence</groupId>
260 <artifactId>persistence-api</artifactId>
261 <version>1.0.2</version>
264 <groupId>org.hibernate</groupId>
265 <artifactId>hibernate-annotations</artifactId>
266 <version>3.5.6-Final</version>
269 <groupId>org.apache.geronimo.specs</groupId>
270 <artifactId>geronimo-jpa_2.0_spec</artifactId>
271 <version>1.1</version>
274 <groupId>dom4j</groupId>
275 <artifactId>dom4j</artifactId>
276 <version>1.6.1</version>
278 <!-- Dependencies of parent pom end -->
280 <groupId>com.att.ajsc</groupId>
281 <artifactId>sdk-java-camel-rest</artifactId>
282 <version>${sdk.camel.rest}</version>
285 <groupId>io.swagger</groupId>
286 <artifactId>swagger-core</artifactId>
287 <version>1.5.8</version>
290 <groupId>io.swagger</groupId>
291 <artifactId>swagger-annotations</artifactId>
292 <version>1.5.8</version>
294 <!-- Camunda Core -->
296 <groupId>com.att.ajsc</groupId>
297 <artifactId>sdk-java-camunda-core</artifactId>
298 <version>${sdk.camunda.core}</version>
302 <groupId>org.springframework</groupId>
303 <artifactId>spring-context-support</artifactId>
307 <groupId>com.att.ajsc</groupId>
308 <artifactId>sdk-java-common-interceptors</artifactId>
309 <version>${csi.logging}</version>
312 <groupId>org.eclipse.jetty.orbit</groupId>
313 <artifactId>javax.servlet</artifactId>
316 <groupId>com.att.ajsc</groupId>
317 <artifactId>ajsc-core</artifactId>
321 <!-- CSI Logging End -->
323 <groupId>org.onap.policy.engine</groupId>
324 <artifactId>PolicyEngineAPI</artifactId>
325 <version>1.1.0-SNAPSHOT</version>
328 <artifactId>log4j</artifactId>
329 <groupId>log4j</groupId>
332 <groupId>org.slf4j</groupId>
333 <artifactId>slf4j-log4j12</artifactId>
336 <artifactId>apache-log4j-extras</artifactId>
337 <groupId>log4j</groupId>
340 <artifactId>jackson-databind</artifactId>
341 <groupId>com.fasterxml.jackson.core</groupId>
346 <groupId>org.onap.policy.common</groupId>
347 <artifactId>ONAP-Logging</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>
365 <groupId>org.onap.policy.engine</groupId>
366 <artifactId>ControlloopPolicy</artifactId>
367 <version>1.1.0-SNAPSHOT</version>
370 <artifactId>log4j</artifactId>
371 <groupId>log4j</groupId>
374 <groupId>org.slf4j</groupId>
375 <artifactId>slf4j-log4j12</artifactId>
378 <artifactId>apache-log4j-extras</artifactId>
379 <groupId>log4j</groupId>
385 <groupId>com.fasterxml.jackson.core</groupId>
386 <artifactId>jackson-databind</artifactId>
387 <version>2.6.3</version>
390 <groupId>com.fasterxml.jackson.dataformat</groupId>
391 <artifactId>jackson-dataformat-yaml</artifactId>
392 <version>2.6.3</version>
395 <groupId>org.apache.commons</groupId>
396 <artifactId>commons-csv</artifactId>
397 <version>1.3</version>
400 <groupId>org.jboss.resteasy</groupId>
401 <artifactId>resteasy-client</artifactId>
402 <version>3.0.8.Final</version>
405 <groupId>com.sun.faces</groupId>
406 <artifactId>jsf-api</artifactId>
407 <version>2.1.7</version>
410 <groupId>com.sun.faces</groupId>
411 <artifactId>jsf-impl</artifactId>
412 <version>2.1.7</version>
418 <finalName>clamp</finalName>
422 <directory>src/test/resources</directory>
424 <include>**/*</include>
426 <filtering>true</filtering>
431 <directory>src/main/resources</directory>
432 <filtering>true</filtering>
435 <directory>src/main/docker</directory>
437 <include>**/*</include>
439 <filtering>true</filtering>
442 <directory>src/main/doxygen</directory>
444 <include>**/*</include>
446 <filtering>true</filtering>
454 <groupId>org.apache.maven.plugins</groupId>
455 <artifactId>maven-jar-plugin</artifactId>
456 <version>3.0.2</version>
459 <id>jar-with-only-classes</id>
460 <phase>package</phase>
465 <classifier>classes</classifier>
467 <include>org/**</include>
474 <groupId>com.github.kongchen</groupId>
475 <artifactId>swagger-maven-plugin</artifactId>
476 <version>3.1.5</version>
479 <phase>compile</phase>
481 <goal>generate</goal>
487 <location>org.onap.clamp.clds.service</location>
489 <basePath>/</basePath>
491 <title>${project.artifactId} Service</title>
492 <version>${project.version}</version>
494 <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
502 <groupId>org.codehaus.mojo</groupId>
503 <artifactId>build-helper-maven-plugin</artifactId>
504 <version>3.0.0</version>
508 <goal>attach-artifact</goal>
510 <phase>package</phase>
514 <file>${project.build.directory}/clamp-classes.jar</file>
516 <classifier>classes</classifier>
525 <groupId>org.springframework.boot</groupId>
526 <artifactId>spring-boot-maven-plugin</artifactId>
527 <version>1.5.3.RELEASE</version>
531 <goal>repackage</goal>
533 <phase>package</phase>
538 <groupId>org.apache.maven.plugins</groupId>
539 <artifactId>maven-gpg-plugin</artifactId>
540 <version>1.5</version>
546 <id>sign-artifacts</id>
547 <phase>verify</phase>
555 <groupId>org.sonatype.plugins</groupId>
556 <artifactId>nexus-staging-maven-plugin</artifactId>
557 <version>1.6.7</version>
558 <extensions>true</extensions>
560 <nexusUrl>${nexusproxy}</nexusUrl>
561 <stagingProfileId>176c31dfe190a</stagingProfileId>
562 <serverId>ecomp-staging</serverId>
563 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
567 <groupId>com.spotify</groupId>
568 <artifactId>docker-maven-plugin</artifactId>
569 <version>0.4.11</version>
571 <imageName>onap/clamp</imageName>
572 <dockerDirectory>src/main/docker</dockerDirectory>
573 <serverId>docker-hub</serverId>
575 <imageTag>${project.version}</imageTag>
576 <imageTag>latest</imageTag>
578 <forceTags>true</forceTags>
581 <targetPath>/</targetPath>
582 <directory>${project.build.directory}</directory>
583 <include>${project.build.finalName}.jar</include>
586 <targetPath>/</targetPath>
587 <directory>${project.build.directory}</directory>
588 <include>etc/config/**</include>
591 <targetPath>/</targetPath>
592 <directory>${project.build.directory}</directory>
593 <include>etc/keystore/**</include>
600 <phase>package</phase>
605 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
607 <http_proxy>${env.HTTP_PROXY}</http_proxy>
608 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
614 <phase>package</phase>
619 <image>onap/clamp</image>
620 <newName>${docker.push.registry}/onap/clamp</newName>
621 <skipDockerTag>${skip.docker.tag}</skipDockerTag>
626 <phase>deploy</phase>
631 <imageName>${docker.push.registry}/onap/clamp</imageName>
632 <skipDockerPush>${skip.docker.push}</skipDockerPush>
638 <groupId>org.apache.maven.plugins</groupId>
639 <artifactId>maven-surefire-plugin</artifactId>
640 <version>2.19.1</version>
642 <forkCount>1</forkCount>
643 <reuseForks>false</reuseForks>
648 <groupId>org.apache.maven.plugins</groupId>
649 <artifactId>maven-failsafe-plugin</artifactId>
650 <version>2.16</version>
655 <goal>integration-test</goal>
659 <forkCount>1</forkCount>
660 <reuseForks>false</reuseForks>
667 <groupId>io.fabric8</groupId>
668 <artifactId>docker-maven-plugin</artifactId>
669 <version>0.16.5</version>
671 <verbose>true</verbose>
672 <apiVersion>1.23</apiVersion>
675 <name>mariadb:10.1.11</name>
676 <alias>mariadb</alias>
679 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
681 <hostname>mariadb</hostname>
684 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
685 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
689 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
693 <port>${docker.mariadb.port.host}:3306</port>
702 <id>mariadb-start-for-it</id>
703 <phase>pre-integration-test</phase>
708 <skip>${skipITs}</skip>
712 <id>mariadb-stop-for-it</id>
713 <phase>post-integration-test</phase>
718 <skip>${skipITs}</skip>
725 <groupId>org.jacoco</groupId>
726 <artifactId>jacoco-maven-plugin</artifactId>
727 <version>0.7.7.201606060606</version>
729 <dumpOnExit>true</dumpOnExit>
731 <include>org.onap.clamp.*</include>
736 <id>jacoco-unit-tests</id>
738 <goal>prepare-agent</goal>
741 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
742 <!-- <append>true</append> -->
746 <id>jacoco-integration-tests</id>
747 <phase>pre-integration-test</phase>
749 <goal>prepare-agent</goal>
752 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
753 <!-- <append>true</append> -->
760 <phase>post-integration-test</phase>
763 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
764 <directory>${project.build.directory}/coverage-reports</directory>
766 <include>*.exec</include>
770 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
776 <!-- This plugin will be useful when we will have multi-modules project -->
778 <groupId>org.codehaus.mojo</groupId>
779 <artifactId>versions-maven-plugin</artifactId>
780 <version>1.3.1</version>
788 <skip.staging.artifacts>true</skip.staging.artifacts>
789 <skip.docker.build>false</skip.docker.build>