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 - org.onap.clamp.config.files.cldsReference=classpath:/clds/clds-reference.properties
24 - org.onap.clamp.config.files.cldsPolicyConfig=classpath:/clds/clds-policy-config.properties
25 - org.onap.clamp.config.files.cldsUsers=classpath:/clds/clds-users.json
26 - org.onap.clamp.config.files.globalClds=classpath:/clds/globalClds.properties
31 <maven.compiler.source>1.8</maven.compiler.source>
32 <maven.compiler.target>1.8</maven.compiler.target>
33 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
36 <docker.mariadb.port.host>3306</docker.mariadb.port.host>
37 <sdk.java.common.logging>0.0.3-oss</sdk.java.common.logging>
38 <project.scm.id>git-server</project.scm.id>
39 <java.version>1.8</java.version>
40 <csi.logging>6.1.0.6-oss</csi.logging>
41 <sdk.camel.rest>6.2.0.6-oss</sdk.camel.rest>
42 <sdk.camunda.core>6.1.0.3-oss</sdk.camunda.core>
44 <sonar.language>java</sonar.language>
45 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
46 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
47 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
48 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
49 <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
50 <sonar.projectVersion>${project.version}</sonar.projectVersion>
52 <docker.push.registry>localhost:5000</docker.push.registry>
53 <skip.docker.build>true</skip.docker.build>
54 <skip.docker.tag>true</skip.docker.tag>
55 <skip.docker.push>true</skip.docker.push>
56 <skip.staging.artifacts>false</skip.staging.artifacts>
58 <nexusproxy>https://nexus.onap.org</nexusproxy>
59 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
60 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
61 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
62 <sitePath>/content/sites/site/org/onap/clamp/${project.version}</sitePath>
65 <distributionManagement>
67 <id>ecomp-releases</id>
68 <name>Clamp Release Repository</name>
69 <url>${nexusproxy}/${releaseNexusPath}</url>
72 <id>ecomp-snapshots</id>
73 <name>Clamp Snapshot Repository</name>
74 <url>${nexusproxy}/${snapshotNexusPath}</url>
78 <url>dav:${nexusproxy}${sitePath}</url>
80 </distributionManagement>
85 <name>Maven 2 repository 2</name>
86 <url>http://repo2.maven.org/maven2/</url>
89 <id>ecomp-releases</id>
90 <name>ONAP Release Repository</name>
91 <url>${nexusproxy}/${releaseNexusPath}</url>
94 <id>ecomp-staging</id>
95 <name>ONAP Staging Repository</name>
96 <url>${nexusproxy}/${stagingNexusPath}</url>
99 <id>ecomp-snapshots</id>
100 <name>ONAP Snapshot Repository</name>
101 <url>${nexusproxy}/${snapshotNexusPath}</url>
103 <enabled>true</enabled>
106 <enabled>false</enabled>
111 <name>Spring repo</name>
112 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
115 <id>repository.jboss.org-public</id>
116 <name>JBoss.org Maven repository</name>
117 <url>https://repository.jboss.org/nexus/content/groups/public</url>
121 <dependencyManagement>
124 <!-- Import dependency management from Spring Boot -->
125 <groupId>org.springframework.boot</groupId>
126 <artifactId>spring-boot-dependencies</artifactId>
127 <version>1.4.1.RELEASE</version>
129 <scope>import</scope>
132 </dependencyManagement>
137 <groupId>com.googlecode.json-simple</groupId>
138 <artifactId>json-simple</artifactId>
139 <version>1.1</version>
142 <groupId>org.apache.commons</groupId>
143 <artifactId>commons-vfs2</artifactId>
144 <version>2.0</version>
148 <groupId>org.springframework.security</groupId>
149 <artifactId>spring-security-test</artifactId>
155 <!-- Dependencies of parent pom start -->
157 <groupId>com.att.ajsc</groupId>
158 <artifactId>sdk-java-common-logging</artifactId>
159 <version>${sdk.java.common.logging}</version>
162 <groupId>org.springframework.boot</groupId>
163 <artifactId>spring-boot-starter-tomcat</artifactId>
164 <scope>compile</scope>
167 <groupId>org.springframework.boot</groupId>
168 <artifactId>spring-boot-starter-actuator</artifactId>
171 <groupId>org.springframework.boot</groupId>
172 <artifactId>spring-boot-starter-security</artifactId>
175 <groupId>org.springframework.boot</groupId>
176 <artifactId>spring-boot-starter-test</artifactId>
180 <groupId>joda-time</groupId>
181 <artifactId>joda-time</artifactId>
184 <groupId>org.springframework</groupId>
185 <artifactId>spring-context</artifactId>
188 <groupId>org.slf4j</groupId>
189 <artifactId>slf4j-api</artifactId>
192 <groupId>javax.ws.rs</groupId>
193 <artifactId>javax.ws.rs-api</artifactId>
194 <version>2.0</version>
197 <groupId>org.springframework</groupId>
198 <artifactId>spring-test</artifactId>
201 <groupId>junit</groupId>
202 <artifactId>junit</artifactId>
205 <groupId>org.mockito</groupId>
206 <artifactId>mockito-all</artifactId>
207 <version>1.9.5</version>
210 <groupId>commons-logging</groupId>
211 <artifactId>commons-logging</artifactId>
212 <version>1.1.1</version>
215 <groupId>org.springframework</groupId>
216 <artifactId>spring-aspects</artifactId>
219 <groupId>com.fasterxml.jackson.core</groupId>
220 <artifactId>jackson-core</artifactId>
223 <groupId>com.fasterxml.jackson.core</groupId>
224 <artifactId>jackson-databind</artifactId>
227 <groupId>org.springframework</groupId>
228 <artifactId>spring-webmvc</artifactId>
231 <groupId>org.springframework.boot</groupId>
232 <artifactId>spring-boot-starter-web</artifactId>
235 <groupId>log4j</groupId>
236 <artifactId>log4j</artifactId>
237 <version>1.2.17</version>
240 <groupId>org.springframework.boot</groupId>
241 <artifactId>spring-boot</artifactId>
244 <groupId>org.springframework.boot</groupId>
245 <artifactId>spring-boot-autoconfigure</artifactId>
248 <groupId>javax.transaction</groupId>
249 <artifactId>jta</artifactId>
250 <version>1.1</version>
253 <groupId>javax.persistence</groupId>
254 <artifactId>persistence-api</artifactId>
255 <version>1.0.2</version>
258 <groupId>org.hibernate</groupId>
259 <artifactId>hibernate-annotations</artifactId>
260 <version>3.5.6-Final</version>
263 <groupId>org.apache.geronimo.specs</groupId>
264 <artifactId>geronimo-jpa_2.0_spec</artifactId>
265 <version>1.1</version>
268 <groupId>dom4j</groupId>
269 <artifactId>dom4j</artifactId>
270 <version>1.6.1</version>
272 <!-- Dependencies of parent pom end -->
274 <groupId>com.att.ajsc</groupId>
275 <artifactId>sdk-java-camel-rest</artifactId>
276 <version>${sdk.camel.rest}</version>
279 <groupId>io.swagger</groupId>
280 <artifactId>swagger-core</artifactId>
281 <version>1.5.8</version>
284 <groupId>io.swagger</groupId>
285 <artifactId>swagger-annotations</artifactId>
286 <version>1.5.8</version>
288 <!-- Camunda Core -->
290 <groupId>com.att.ajsc</groupId>
291 <artifactId>sdk-java-camunda-core</artifactId>
292 <version>${sdk.camunda.core}</version>
296 <groupId>org.springframework</groupId>
297 <artifactId>spring-context-support</artifactId>
301 <groupId>com.att.ajsc</groupId>
302 <artifactId>sdk-java-common-interceptors</artifactId>
303 <version>${csi.logging}</version>
306 <groupId>org.eclipse.jetty.orbit</groupId>
307 <artifactId>javax.servlet</artifactId>
310 <groupId>com.att.ajsc</groupId>
311 <artifactId>ajsc-core</artifactId>
315 <!-- CSI Logging End -->
317 <groupId>org.onap.policy.engine</groupId>
318 <artifactId>PolicyEngineAPI</artifactId>
319 <version>1.1.0-SNAPSHOT</version>
322 <artifactId>log4j</artifactId>
323 <groupId>log4j</groupId>
326 <groupId>org.slf4j</groupId>
327 <artifactId>slf4j-log4j12</artifactId>
330 <artifactId>apache-log4j-extras</artifactId>
331 <groupId>log4j</groupId>
334 <artifactId>jackson-databind</artifactId>
335 <groupId>com.fasterxml.jackson.core</groupId>
340 <groupId>org.onap.policy.common</groupId>
341 <artifactId>ONAP-Logging</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>
359 <groupId>org.onap.policy.engine</groupId>
360 <artifactId>ControlloopPolicy</artifactId>
361 <version>1.1.0-SNAPSHOT</version>
364 <artifactId>log4j</artifactId>
365 <groupId>log4j</groupId>
368 <groupId>org.slf4j</groupId>
369 <artifactId>slf4j-log4j12</artifactId>
372 <artifactId>apache-log4j-extras</artifactId>
373 <groupId>log4j</groupId>
379 <groupId>com.fasterxml.jackson.core</groupId>
380 <artifactId>jackson-databind</artifactId>
381 <version>2.6.3</version>
384 <groupId>com.fasterxml.jackson.dataformat</groupId>
385 <artifactId>jackson-dataformat-yaml</artifactId>
386 <version>2.6.3</version>
389 <groupId>org.apache.commons</groupId>
390 <artifactId>commons-csv</artifactId>
391 <version>1.3</version>
394 <groupId>org.jboss.resteasy</groupId>
395 <artifactId>resteasy-client</artifactId>
396 <version>3.0.8.Final</version>
399 <groupId>com.sun.faces</groupId>
400 <artifactId>jsf-api</artifactId>
401 <version>2.1.7</version>
404 <groupId>com.sun.faces</groupId>
405 <artifactId>jsf-impl</artifactId>
406 <version>2.1.7</version>
412 <finalName>clamp</finalName>
416 <directory>src/test/resources</directory>
418 <include>**/*</include>
420 <filtering>true</filtering>
425 <directory>src/main/resources</directory>
426 <filtering>true</filtering>
429 <directory>src/main/docker</directory>
431 <include>**/*</include>
433 <filtering>true</filtering>
436 <directory>src/main/doxygen</directory>
438 <include>**/*</include>
440 <filtering>true</filtering>
448 <groupId>org.apache.maven.plugins</groupId>
449 <artifactId>maven-jar-plugin</artifactId>
450 <version>3.0.2</version>
453 <id>jar-with-only-classes</id>
454 <phase>package</phase>
459 <classifier>classes</classifier>
461 <include>org/**</include>
468 <groupId>com.github.kongchen</groupId>
469 <artifactId>swagger-maven-plugin</artifactId>
470 <version>3.1.5</version>
473 <phase>compile</phase>
475 <goal>generate</goal>
481 <location>org.onap.clamp.clds.service</location>
483 <basePath>/</basePath>
485 <title>${project.artifactId} Service</title>
486 <version>${project.version}</version>
488 <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
496 <groupId>org.codehaus.mojo</groupId>
497 <artifactId>build-helper-maven-plugin</artifactId>
498 <version>3.0.0</version>
502 <goal>attach-artifact</goal>
504 <phase>package</phase>
508 <file>${project.build.directory}/clamp-classes.jar</file>
510 <classifier>classes</classifier>
519 <groupId>org.springframework.boot</groupId>
520 <artifactId>spring-boot-maven-plugin</artifactId>
521 <version>1.5.3.RELEASE</version>
525 <goal>repackage</goal>
527 <phase>package</phase>
532 <groupId>org.apache.maven.plugins</groupId>
533 <artifactId>maven-gpg-plugin</artifactId>
534 <version>1.5</version>
540 <id>sign-artifacts</id>
541 <phase>verify</phase>
549 <groupId>org.sonatype.plugins</groupId>
550 <artifactId>nexus-staging-maven-plugin</artifactId>
551 <version>1.6.7</version>
552 <extensions>true</extensions>
554 <serverId>ossrhajsc</serverId>
555 <nexusUrl>https://oss.sonatype.org/</nexusUrl>
556 <autoReleaseAfterClose>true</autoReleaseAfterClose>
557 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
561 <groupId>com.spotify</groupId>
562 <artifactId>docker-maven-plugin</artifactId>
563 <version>0.4.11</version>
565 <imageName>onap/clamp</imageName>
566 <dockerDirectory>src/main/docker</dockerDirectory>
567 <serverId>docker-hub</serverId>
569 <imageTag>${project.version}</imageTag>
570 <imageTag>latest</imageTag>
572 <forceTags>true</forceTags>
575 <targetPath>/</targetPath>
576 <directory>${project.build.directory}</directory>
577 <include>${project.build.finalName}.jar</include>
580 <targetPath>/</targetPath>
581 <directory>${project.build.directory}</directory>
582 <include>etc/config/**</include>
585 <targetPath>/</targetPath>
586 <directory>${project.build.directory}</directory>
587 <include>etc/keystore/**</include>
594 <phase>package</phase>
599 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
601 <http_proxy>${env.HTTP_PROXY}</http_proxy>
602 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
608 <phase>deploy</phase>
613 <imageName>onap/clamp</imageName>
614 <skipDockerPush>${skip.docker.push}</skipDockerPush>
620 <groupId>org.apache.maven.plugins</groupId>
621 <artifactId>maven-surefire-plugin</artifactId>
622 <version>2.19.1</version>
624 <forkCount>1</forkCount>
625 <reuseForks>false</reuseForks>
630 <groupId>org.apache.maven.plugins</groupId>
631 <artifactId>maven-failsafe-plugin</artifactId>
632 <version>2.16</version>
637 <goal>integration-test</goal>
641 <forkCount>1</forkCount>
642 <reuseForks>false</reuseForks>
649 <groupId>io.fabric8</groupId>
650 <artifactId>docker-maven-plugin</artifactId>
651 <version>0.16.5</version>
653 <verbose>true</verbose>
654 <apiVersion>1.23</apiVersion>
657 <name>mariadb:10.1.11</name>
658 <alias>mariadb</alias>
661 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
663 <hostname>mariadb</hostname>
666 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
667 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
671 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
675 <port>${docker.mariadb.port.host}:3306</port>
684 <id>mariadb-start-for-it</id>
685 <phase>pre-integration-test</phase>
690 <skip>${skipITs}</skip>
694 <id>mariadb-stop-for-it</id>
695 <phase>post-integration-test</phase>
700 <skip>${skipITs}</skip>
707 <groupId>org.jacoco</groupId>
708 <artifactId>jacoco-maven-plugin</artifactId>
709 <version>0.7.7.201606060606</version>
711 <dumpOnExit>true</dumpOnExit>
713 <include>org.onap.clamp.*</include>
718 <id>jacoco-unit-tests</id>
720 <goal>prepare-agent</goal>
723 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
724 <!-- <append>true</append> -->
728 <id>jacoco-integration-tests</id>
729 <phase>pre-integration-test</phase>
731 <goal>prepare-agent</goal>
734 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
735 <!-- <append>true</append> -->
742 <phase>post-integration-test</phase>
745 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
746 <directory>${project.build.directory}/coverage-reports</directory>
748 <include>*.exec</include>
752 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
758 <!-- This plugin will be useful when we will have multi-modules project -->
760 <groupId>org.codehaus.mojo</groupId>
761 <artifactId>versions-maven-plugin</artifactId>
762 <version>1.3.1</version>
770 <skip.staging.artifacts>true</skip.staging.artifacts>
771 <skip.docker.build>false</skip.docker.build>