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 This project build the ONAP CLAMP JAR that contains AJSC + CLAMP code.
13 By Default "mvn clean install" command will execute also the unit tests
14 and the integration tests. The integration tests require a docker engine running.
16 If you want to skip the intergation test you can by doing:
17 "mvn clean install -DskipITs=true"
19 For Spring it's possible to specify the application.properties location
20 "mvn clean install -Dspring.config.location=classpath:application-test.properties"
22 The application.properties contains the location of the CLAMP parameters files:
23 clds-policy-config.properties and clds-reference.properties
27 <maven.compiler.source>1.8</maven.compiler.source>
28 <maven.compiler.target>1.8</maven.compiler.target>
29 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
30 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
32 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
33 <sdk.java.common.logging>0.0.3-oss</sdk.java.common.logging>
34 <project.scm.id>git-server</project.scm.id>
35 <java.version>1.8</java.version>
36 <csi.logging>6.1.0.6-oss</csi.logging>
37 <sdk.camel.rest>6.2.0.6-oss</sdk.camel.rest>
38 <sdk.camunda.core>6.1.0.3-oss</sdk.camunda.core>
40 <sonar.language>java</sonar.language>
41 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
42 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
43 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
44 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
45 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
46 <sonar.projectVersion>${project.version}</sonar.projectVersion>
48 <docker.push.registry>localhost:5000</docker.push.registry>
49 <skip.docker.build>true</skip.docker.build>
50 <skip.docker.tag>true</skip.docker.tag>
51 <skip.docker.push>true</skip.docker.push>
52 <skip.staging.artifacts>false</skip.staging.artifacts>
54 <nexusproxy>https://nexus.onap.org</nexusproxy>
55 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
56 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
57 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
58 <sitePath>/content/sites/site/org/onap/clamp/${project.version}</sitePath>
61 <distributionManagement>
63 <id>ecomp-releases</id>
64 <name>Clamp Release Repository</name>
65 <url>${nexusproxy}/${releaseNexusPath}</url>
68 <id>ecomp-snapshots</id>
69 <name>Clamp Snapshot Repository</name>
70 <url>${nexusproxy}/${snapshotNexusPath}</url>
74 <url>dav:${nexusproxy}${sitePath}</url>
76 </distributionManagement>
81 <name>Maven 2 repository 2</name>
82 <url>http://repo2.maven.org/maven2/</url>
85 <id>ecomp-releases</id>
86 <name>ONAP Release Repository</name>
87 <url>${nexusproxy}/${releaseNexusPath}</url>
90 <id>ecomp-staging</id>
91 <name>ONAP Staging Repository</name>
92 <url>${nexusproxy}/${stagingNexusPath}</url>
95 <id>ecomp-snapshots</id>
96 <name>ONAP Snapshot Repository</name>
97 <url>${nexusproxy}/${snapshotNexusPath}</url>
99 <enabled>true</enabled>
102 <enabled>false</enabled>
107 <name>Spring repo</name>
108 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
111 <id>repository.jboss.org-public</id>
112 <name>JBoss.org Maven repository</name>
113 <url>https://repository.jboss.org/nexus/content/groups/public</url>
117 <dependencyManagement>
120 <!-- Import dependency management from Spring Boot -->
121 <groupId>org.springframework.boot</groupId>
122 <artifactId>spring-boot-dependencies</artifactId>
123 <version>1.4.1.RELEASE</version>
125 <scope>import</scope>
128 </dependencyManagement>
133 <groupId>com.googlecode.json-simple</groupId>
134 <artifactId>json-simple</artifactId>
135 <version>1.1</version>
138 <groupId>org.apache.commons</groupId>
139 <artifactId>commons-vfs2</artifactId>
140 <version>2.0</version>
144 <groupId>org.springframework.security</groupId>
145 <artifactId>spring-security-test</artifactId>
151 <!-- Dependencies of parent pom start -->
153 <groupId>com.att.ajsc</groupId>
154 <artifactId>sdk-java-common-logging</artifactId>
155 <version>${sdk.java.common.logging}</version>
158 <groupId>org.springframework.boot</groupId>
159 <artifactId>spring-boot-starter-tomcat</artifactId>
160 <scope>compile</scope>
163 <groupId>org.springframework.boot</groupId>
164 <artifactId>spring-boot-starter-actuator</artifactId>
167 <groupId>org.springframework.boot</groupId>
168 <artifactId>spring-boot-starter-security</artifactId>
171 <groupId>org.springframework.boot</groupId>
172 <artifactId>spring-boot-starter-test</artifactId>
176 <groupId>joda-time</groupId>
177 <artifactId>joda-time</artifactId>
180 <groupId>org.springframework</groupId>
181 <artifactId>spring-context</artifactId>
184 <groupId>org.slf4j</groupId>
185 <artifactId>slf4j-api</artifactId>
188 <groupId>javax.ws.rs</groupId>
189 <artifactId>javax.ws.rs-api</artifactId>
190 <version>2.0</version>
193 <groupId>org.springframework</groupId>
194 <artifactId>spring-test</artifactId>
197 <groupId>junit</groupId>
198 <artifactId>junit</artifactId>
201 <groupId>org.mockito</groupId>
202 <artifactId>mockito-all</artifactId>
203 <version>1.9.5</version>
206 <groupId>commons-logging</groupId>
207 <artifactId>commons-logging</artifactId>
208 <version>1.1.1</version>
211 <groupId>org.springframework</groupId>
212 <artifactId>spring-aspects</artifactId>
215 <groupId>com.fasterxml.jackson.core</groupId>
216 <artifactId>jackson-core</artifactId>
219 <groupId>com.fasterxml.jackson.core</groupId>
220 <artifactId>jackson-databind</artifactId>
223 <groupId>org.springframework</groupId>
224 <artifactId>spring-webmvc</artifactId>
227 <groupId>org.springframework.boot</groupId>
228 <artifactId>spring-boot-starter-web</artifactId>
231 <groupId>log4j</groupId>
232 <artifactId>log4j</artifactId>
233 <version>1.2.17</version>
236 <groupId>org.springframework.boot</groupId>
237 <artifactId>spring-boot</artifactId>
240 <groupId>org.springframework.boot</groupId>
241 <artifactId>spring-boot-autoconfigure</artifactId>
244 <groupId>javax.transaction</groupId>
245 <artifactId>jta</artifactId>
246 <version>1.1</version>
249 <groupId>javax.persistence</groupId>
250 <artifactId>persistence-api</artifactId>
251 <version>1.0.2</version>
254 <groupId>org.hibernate</groupId>
255 <artifactId>hibernate-annotations</artifactId>
256 <version>3.5.6-Final</version>
259 <groupId>org.apache.geronimo.specs</groupId>
260 <artifactId>geronimo-jpa_2.0_spec</artifactId>
261 <version>1.1</version>
264 <groupId>dom4j</groupId>
265 <artifactId>dom4j</artifactId>
266 <version>1.6.1</version>
268 <!-- Dependencies of parent pom end -->
270 <groupId>com.att.ajsc</groupId>
271 <artifactId>sdk-java-camel-rest</artifactId>
272 <version>${sdk.camel.rest}</version>
275 <groupId>io.swagger</groupId>
276 <artifactId>swagger-core</artifactId>
277 <version>1.5.8</version>
280 <groupId>io.swagger</groupId>
281 <artifactId>swagger-annotations</artifactId>
282 <version>1.5.8</version>
284 <!-- Camunda Core -->
286 <groupId>com.att.ajsc</groupId>
287 <artifactId>sdk-java-camunda-core</artifactId>
288 <version>${sdk.camunda.core}</version>
292 <groupId>org.springframework</groupId>
293 <artifactId>spring-context-support</artifactId>
297 <groupId>com.att.ajsc</groupId>
298 <artifactId>sdk-java-common-interceptors</artifactId>
299 <version>${csi.logging}</version>
302 <groupId>org.eclipse.jetty.orbit</groupId>
303 <artifactId>javax.servlet</artifactId>
306 <groupId>com.att.ajsc</groupId>
307 <artifactId>ajsc-core</artifactId>
311 <!-- CSI Logging End -->
313 <groupId>org.onap.policy.engine</groupId>
314 <artifactId>PolicyEngineAPI</artifactId>
315 <version>1.1.0-SNAPSHOT</version>
318 <artifactId>log4j</artifactId>
319 <groupId>log4j</groupId>
322 <groupId>org.slf4j</groupId>
323 <artifactId>slf4j-log4j12</artifactId>
326 <artifactId>apache-log4j-extras</artifactId>
327 <groupId>log4j</groupId>
330 <artifactId>jackson-databind</artifactId>
331 <groupId>com.fasterxml.jackson.core</groupId>
336 <groupId>org.onap.policy.common</groupId>
337 <artifactId>ONAP-Logging</artifactId>
338 <version>1.1.0-SNAPSHOT</version>
341 <artifactId>log4j</artifactId>
342 <groupId>log4j</groupId>
345 <groupId>org.slf4j</groupId>
346 <artifactId>slf4j-log4j12</artifactId>
349 <artifactId>apache-log4j-extras</artifactId>
350 <groupId>log4j</groupId>
355 <groupId>org.onap.policy.engine</groupId>
356 <artifactId>ControlloopPolicy</artifactId>
357 <version>1.1.0-SNAPSHOT</version>
360 <artifactId>log4j</artifactId>
361 <groupId>log4j</groupId>
364 <groupId>org.slf4j</groupId>
365 <artifactId>slf4j-log4j12</artifactId>
368 <artifactId>apache-log4j-extras</artifactId>
369 <groupId>log4j</groupId>
375 <groupId>com.fasterxml.jackson.core</groupId>
376 <artifactId>jackson-databind</artifactId>
377 <version>2.6.3</version>
380 <groupId>com.fasterxml.jackson.dataformat</groupId>
381 <artifactId>jackson-dataformat-yaml</artifactId>
382 <version>2.6.3</version>
385 <groupId>org.apache.commons</groupId>
386 <artifactId>commons-csv</artifactId>
387 <version>1.3</version>
390 <groupId>org.jboss.resteasy</groupId>
391 <artifactId>resteasy-client</artifactId>
392 <version>3.0.8.Final</version>
395 <groupId>com.sun.faces</groupId>
396 <artifactId>jsf-api</artifactId>
397 <version>2.1.7</version>
400 <groupId>com.sun.faces</groupId>
401 <artifactId>jsf-impl</artifactId>
402 <version>2.1.7</version>
408 <finalName>clamp</finalName>
412 <directory>src/test/resources</directory>
414 <include>**/*</include>
416 <filtering>true</filtering>
421 <directory>src/main/resources</directory>
422 <filtering>true</filtering>
425 <directory>src/main/docker</directory>
427 <include>**/*</include>
429 <filtering>true</filtering>
432 <directory>src/main/doxygen</directory>
434 <include>**/*</include>
436 <filtering>true</filtering>
444 <groupId>org.apache.maven.plugins</groupId>
445 <artifactId>maven-jar-plugin</artifactId>
446 <version>3.0.2</version>
449 <id>jar-with-only-classes</id>
450 <phase>package</phase>
455 <classifier>classes</classifier>
457 <include>org/**</include>
464 <groupId>com.github.kongchen</groupId>
465 <artifactId>swagger-maven-plugin</artifactId>
466 <version>3.1.5</version>
469 <phase>compile</phase>
471 <goal>generate</goal>
477 <location>org.onap.clamp.clds.service</location>
479 <basePath>/</basePath>
481 <title>${project.artifactId} Service</title>
482 <version>${project.version}</version>
484 <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
492 <groupId>org.codehaus.mojo</groupId>
493 <artifactId>build-helper-maven-plugin</artifactId>
494 <version>3.0.0</version>
498 <goal>attach-artifact</goal>
500 <phase>package</phase>
504 <file>${project.build.directory}/clamp-classes.jar</file>
506 <classifier>classes</classifier>
515 <groupId>org.springframework.boot</groupId>
516 <artifactId>spring-boot-maven-plugin</artifactId>
517 <version>1.5.3.RELEASE</version>
521 <goal>repackage</goal>
523 <phase>package</phase>
528 <groupId>org.apache.maven.plugins</groupId>
529 <artifactId>maven-gpg-plugin</artifactId>
530 <version>1.5</version>
536 <id>sign-artifacts</id>
537 <phase>verify</phase>
545 <groupId>org.sonatype.plugins</groupId>
546 <artifactId>nexus-staging-maven-plugin</artifactId>
547 <version>1.6.7</version>
548 <extensions>true</extensions>
550 <serverId>ossrhajsc</serverId>
551 <nexusUrl>https://oss.sonatype.org/</nexusUrl>
552 <autoReleaseAfterClose>true</autoReleaseAfterClose>
553 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
557 <groupId>com.spotify</groupId>
558 <artifactId>docker-maven-plugin</artifactId>
559 <version>0.4.11</version>
561 <imageName>onap/clamp</imageName>
562 <dockerDirectory>src/main/docker</dockerDirectory>
563 <serverId>docker-hub</serverId>
565 <imageTag>${project.version}</imageTag>
566 <imageTag>latest</imageTag>
568 <forceTags>true</forceTags>
571 <targetPath>/</targetPath>
572 <directory>${project.build.directory}</directory>
573 <include>${project.build.finalName}.jar</include>
576 <targetPath>/</targetPath>
577 <directory>${project.build.directory}</directory>
578 <include>etc/config/**</include>
581 <targetPath>/</targetPath>
582 <directory>${project.build.directory}</directory>
583 <include>etc/keystore/**</include>
590 <phase>package</phase>
595 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
597 <http_proxy>${env.HTTP_PROXY}</http_proxy>
598 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
604 <phase>deploy</phase>
609 <imageName>onap/clamp</imageName>
610 <skipDockerPush>${skip.docker.push}</skipDockerPush>
616 <groupId>org.apache.maven.plugins</groupId>
617 <artifactId>maven-surefire-plugin</artifactId>
618 <version>2.19.1</version>
620 <forkCount>1</forkCount>
621 <reuseForks>false</reuseForks>
626 <groupId>org.apache.maven.plugins</groupId>
627 <artifactId>maven-failsafe-plugin</artifactId>
628 <version>2.16</version>
633 <goal>integration-test</goal>
637 <forkCount>1</forkCount>
638 <reuseForks>false</reuseForks>
645 <groupId>io.fabric8</groupId>
646 <artifactId>docker-maven-plugin</artifactId>
647 <version>0.16.5</version>
649 <verbose>true</verbose>
650 <apiVersion>1.23</apiVersion>
653 <name>mariadb:10.1.11</name>
654 <alias>mariadb</alias>
657 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
659 <hostname>mariadb</hostname>
662 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
663 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
667 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
671 <port>${docker.mariadb.port.host}:3306</port>
680 <id>mariadb-start-for-it</id>
681 <phase>pre-integration-test</phase>
686 <skip>${skipITs}</skip>
690 <id>mariadb-stop-for-it</id>
691 <phase>post-integration-test</phase>
696 <skip>${skipITs}</skip>
703 <groupId>org.jacoco</groupId>
704 <artifactId>jacoco-maven-plugin</artifactId>
705 <version>0.7.7.201606060606</version>
707 <dumpOnExit>true</dumpOnExit>
709 <include>org.onap.clamp.*</include>
714 <id>jacoco-unit-tests</id>
716 <goal>prepare-agent</goal>
719 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
720 <!-- <append>true</append> -->
724 <id>jacoco-integration-tests</id>
725 <phase>pre-integration-test</phase>
727 <goal>prepare-agent</goal>
730 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
731 <!-- <append>true</append> -->
738 <phase>post-integration-test</phase>
741 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
742 <directory>${project.build.directory}/coverage-reports</directory>
744 <include>*.exec</include>
748 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
754 <!-- This plugin will be useful when we will have multi-modules project -->
756 <groupId>org.codehaus.mojo</groupId>
757 <artifactId>versions-maven-plugin</artifactId>
758 <version>1.3.1</version>
766 <skip.staging.artifacts>true</skip.staging.artifacts>
767 <skip.docker.build>false</skip.docker.build>