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.push>true</skip.docker.push>
61 <skip.staging.artifacts>false</skip.staging.artifacts>
63 <nexusproxy>https://nexus.onap.org</nexusproxy>
64 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
65 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
66 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
67 <sitePath>/content/sites/site/org/onap/clamp/${project.version}</sitePath>
70 <distributionManagement>
72 <id>ecomp-releases</id>
73 <name>Clamp Release Repository</name>
74 <url>${nexusproxy}/${releaseNexusPath}</url>
77 <id>ecomp-snapshots</id>
78 <name>Clamp Snapshot Repository</name>
79 <url>${nexusproxy}/${snapshotNexusPath}</url>
83 <url>dav:${nexusproxy}${sitePath}</url>
85 </distributionManagement>
90 <name>Maven 2 repository 2</name>
91 <url>http://repo2.maven.org/maven2/</url>
94 <id>ecomp-releases</id>
95 <name>ONAP Release Repository</name>
96 <url>${nexusproxy}/${releaseNexusPath}</url>
99 <id>ecomp-staging</id>
100 <name>ONAP Staging Repository</name>
101 <url>${nexusproxy}/${stagingNexusPath}</url>
104 <id>ecomp-snapshots</id>
105 <name>ONAP Snapshot Repository</name>
106 <url>${nexusproxy}/${snapshotNexusPath}</url>
108 <enabled>true</enabled>
111 <enabled>false</enabled>
116 <name>Spring repo</name>
117 <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
120 <id>repository.jboss.org-public</id>
121 <name>JBoss.org Maven repository</name>
122 <url>https://repository.jboss.org/nexus/content/groups/public</url>
126 <dependencyManagement>
129 <!-- Import dependency management from Spring Boot -->
130 <groupId>org.springframework.boot</groupId>
131 <artifactId>spring-boot-dependencies</artifactId>
132 <version>1.4.1.RELEASE</version>
134 <scope>import</scope>
137 </dependencyManagement>
142 <groupId>com.googlecode.json-simple</groupId>
143 <artifactId>json-simple</artifactId>
144 <version>1.1</version>
147 <groupId>org.apache.commons</groupId>
148 <artifactId>commons-vfs2</artifactId>
149 <version>2.0</version>
153 <groupId>org.springframework.security</groupId>
154 <artifactId>spring-security-test</artifactId>
160 <!-- Dependencies of parent pom start -->
162 <groupId>com.att.ajsc</groupId>
163 <artifactId>sdk-java-common-logging</artifactId>
164 <version>${sdk.java.common.logging}</version>
167 <groupId>org.springframework.boot</groupId>
168 <artifactId>spring-boot-starter-tomcat</artifactId>
169 <scope>compile</scope>
172 <groupId>org.springframework.boot</groupId>
173 <artifactId>spring-boot-starter-actuator</artifactId>
176 <groupId>org.springframework.boot</groupId>
177 <artifactId>spring-boot-starter-security</artifactId>
180 <groupId>org.springframework.boot</groupId>
181 <artifactId>spring-boot-starter-test</artifactId>
185 <groupId>joda-time</groupId>
186 <artifactId>joda-time</artifactId>
189 <groupId>org.springframework</groupId>
190 <artifactId>spring-context</artifactId>
193 <groupId>org.slf4j</groupId>
194 <artifactId>slf4j-api</artifactId>
197 <groupId>javax.ws.rs</groupId>
198 <artifactId>javax.ws.rs-api</artifactId>
199 <version>2.0</version>
202 <groupId>org.springframework</groupId>
203 <artifactId>spring-test</artifactId>
206 <groupId>junit</groupId>
207 <artifactId>junit</artifactId>
210 <groupId>org.mockito</groupId>
211 <artifactId>mockito-all</artifactId>
212 <version>1.9.5</version>
215 <groupId>commons-logging</groupId>
216 <artifactId>commons-logging</artifactId>
217 <version>1.1.1</version>
220 <groupId>org.springframework</groupId>
221 <artifactId>spring-aspects</artifactId>
224 <groupId>com.fasterxml.jackson.core</groupId>
225 <artifactId>jackson-core</artifactId>
228 <groupId>com.fasterxml.jackson.core</groupId>
229 <artifactId>jackson-databind</artifactId>
232 <groupId>org.springframework</groupId>
233 <artifactId>spring-webmvc</artifactId>
236 <groupId>org.springframework.boot</groupId>
237 <artifactId>spring-boot-starter-web</artifactId>
240 <groupId>log4j</groupId>
241 <artifactId>log4j</artifactId>
242 <version>1.2.17</version>
245 <groupId>org.springframework.boot</groupId>
246 <artifactId>spring-boot</artifactId>
249 <groupId>org.springframework.boot</groupId>
250 <artifactId>spring-boot-autoconfigure</artifactId>
253 <groupId>javax.transaction</groupId>
254 <artifactId>jta</artifactId>
255 <version>1.1</version>
258 <groupId>javax.persistence</groupId>
259 <artifactId>persistence-api</artifactId>
260 <version>1.0.2</version>
263 <groupId>org.hibernate</groupId>
264 <artifactId>hibernate-annotations</artifactId>
265 <version>3.5.6-Final</version>
268 <groupId>org.apache.geronimo.specs</groupId>
269 <artifactId>geronimo-jpa_2.0_spec</artifactId>
270 <version>1.1</version>
273 <groupId>dom4j</groupId>
274 <artifactId>dom4j</artifactId>
275 <version>1.6.1</version>
277 <!-- Dependencies of parent pom end -->
279 <groupId>com.att.ajsc</groupId>
280 <artifactId>sdk-java-camel-rest</artifactId>
281 <version>${sdk.camel.rest}</version>
284 <groupId>io.swagger</groupId>
285 <artifactId>swagger-core</artifactId>
286 <version>1.5.8</version>
289 <groupId>io.swagger</groupId>
290 <artifactId>swagger-annotations</artifactId>
291 <version>1.5.8</version>
293 <!-- Camunda Core -->
295 <groupId>com.att.ajsc</groupId>
296 <artifactId>sdk-java-camunda-core</artifactId>
297 <version>${sdk.camunda.core}</version>
301 <groupId>org.springframework</groupId>
302 <artifactId>spring-context-support</artifactId>
306 <groupId>com.att.ajsc</groupId>
307 <artifactId>sdk-java-common-interceptors</artifactId>
308 <version>${csi.logging}</version>
311 <groupId>org.eclipse.jetty.orbit</groupId>
312 <artifactId>javax.servlet</artifactId>
315 <groupId>com.att.ajsc</groupId>
316 <artifactId>ajsc-core</artifactId>
320 <!-- CSI Logging End -->
322 <groupId>org.onap.policy.engine</groupId>
323 <artifactId>PolicyEngineAPI</artifactId>
324 <version>1.1.0-SNAPSHOT</version>
327 <artifactId>log4j</artifactId>
328 <groupId>log4j</groupId>
331 <groupId>org.slf4j</groupId>
332 <artifactId>slf4j-log4j12</artifactId>
335 <artifactId>apache-log4j-extras</artifactId>
336 <groupId>log4j</groupId>
339 <artifactId>jackson-databind</artifactId>
340 <groupId>com.fasterxml.jackson.core</groupId>
345 <groupId>org.onap.policy.common</groupId>
346 <artifactId>ONAP-Logging</artifactId>
347 <version>1.1.0-SNAPSHOT</version>
350 <artifactId>log4j</artifactId>
351 <groupId>log4j</groupId>
354 <groupId>org.slf4j</groupId>
355 <artifactId>slf4j-log4j12</artifactId>
358 <artifactId>apache-log4j-extras</artifactId>
359 <groupId>log4j</groupId>
364 <groupId>org.onap.policy.engine</groupId>
365 <artifactId>ControlloopPolicy</artifactId>
366 <version>1.1.0-SNAPSHOT</version>
369 <artifactId>log4j</artifactId>
370 <groupId>log4j</groupId>
373 <groupId>org.slf4j</groupId>
374 <artifactId>slf4j-log4j12</artifactId>
377 <artifactId>apache-log4j-extras</artifactId>
378 <groupId>log4j</groupId>
384 <groupId>com.fasterxml.jackson.core</groupId>
385 <artifactId>jackson-databind</artifactId>
386 <version>2.6.3</version>
389 <groupId>com.fasterxml.jackson.dataformat</groupId>
390 <artifactId>jackson-dataformat-yaml</artifactId>
391 <version>2.6.3</version>
394 <groupId>org.apache.commons</groupId>
395 <artifactId>commons-csv</artifactId>
396 <version>1.3</version>
399 <groupId>org.jboss.resteasy</groupId>
400 <artifactId>resteasy-client</artifactId>
401 <version>3.0.8.Final</version>
404 <groupId>com.sun.faces</groupId>
405 <artifactId>jsf-api</artifactId>
406 <version>2.1.7</version>
409 <groupId>com.sun.faces</groupId>
410 <artifactId>jsf-impl</artifactId>
411 <version>2.1.7</version>
417 <finalName>clamp</finalName>
421 <directory>src/test/resources</directory>
423 <include>**/*</include>
425 <filtering>true</filtering>
430 <directory>src/main/resources</directory>
431 <filtering>true</filtering>
434 <directory>src/main/docker</directory>
436 <include>**/*</include>
438 <filtering>true</filtering>
441 <directory>src/main/doxygen</directory>
443 <include>**/*</include>
445 <filtering>true</filtering>
453 <groupId>org.apache.maven.plugins</groupId>
454 <artifactId>maven-jar-plugin</artifactId>
455 <version>3.0.2</version>
458 <id>jar-with-only-classes</id>
459 <phase>package</phase>
464 <classifier>classes</classifier>
466 <include>org/**</include>
473 <groupId>com.github.kongchen</groupId>
474 <artifactId>swagger-maven-plugin</artifactId>
475 <version>3.1.5</version>
478 <phase>compile</phase>
480 <goal>generate</goal>
486 <location>org.onap.clamp.clds.service</location>
488 <basePath>/</basePath>
490 <title>${project.artifactId} Service</title>
491 <version>${project.version}</version>
493 <swaggerDirectory>${project.build.directory}/classes/META-INF/resources/icd</swaggerDirectory>
501 <groupId>org.codehaus.mojo</groupId>
502 <artifactId>build-helper-maven-plugin</artifactId>
503 <version>3.0.0</version>
507 <goal>attach-artifact</goal>
509 <phase>package</phase>
513 <file>${project.build.directory}/clamp-classes.jar</file>
515 <classifier>classes</classifier>
524 <groupId>org.springframework.boot</groupId>
525 <artifactId>spring-boot-maven-plugin</artifactId>
526 <version>1.5.3.RELEASE</version>
530 <goal>repackage</goal>
532 <phase>package</phase>
537 <groupId>org.apache.maven.plugins</groupId>
538 <artifactId>maven-gpg-plugin</artifactId>
539 <version>1.5</version>
545 <id>sign-artifacts</id>
546 <phase>verify</phase>
554 <groupId>org.sonatype.plugins</groupId>
555 <artifactId>nexus-staging-maven-plugin</artifactId>
556 <version>1.6.7</version>
557 <extensions>true</extensions>
559 <nexusUrl>${nexusproxy}</nexusUrl>
560 <stagingProfileId>176c31dfe190a</stagingProfileId>
561 <serverId>ecomp-staging</serverId>
562 <skipNexusStagingDeployMojo>${skip.staging.artifacts}</skipNexusStagingDeployMojo>
566 <groupId>com.spotify</groupId>
567 <artifactId>docker-maven-plugin</artifactId>
568 <version>1.0.0</version>
570 <imageName>onap/clamp</imageName>
571 <dockerDirectory>src/main/docker</dockerDirectory>
572 <serverId>docker-hub</serverId>
574 <imageTag>${project.version}</imageTag>
575 <imageTag>latest</imageTag>
577 <forceTags>true</forceTags>
580 <targetPath>/</targetPath>
581 <directory>${project.build.directory}</directory>
582 <include>${project.build.finalName}.jar</include>
585 <targetPath>/</targetPath>
586 <directory>${project.build.directory}</directory>
587 <include>etc/config/**</include>
590 <targetPath>/</targetPath>
591 <directory>${project.build.directory}</directory>
592 <include>etc/keystore/**</include>
599 <phase>package</phase>
604 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
606 <http_proxy>${env.HTTP_PROXY}</http_proxy>
607 <https_proxy>${env.HTTPS_PROXY}</https_proxy>
613 <phase>package</phase>
618 <image>onap/clamp</image>
619 <newName>${docker.push.registry}/onap/clamp</newName>
620 <skipDockerTag>${skip.docker.push}</skipDockerTag>
625 <phase>deploy</phase>
630 <imageName>${docker.push.registry}/onap/clamp</imageName>
631 <skipDockerPush>${skip.docker.push}</skipDockerPush>
637 <groupId>org.apache.maven.plugins</groupId>
638 <artifactId>maven-surefire-plugin</artifactId>
639 <version>2.19.1</version>
641 <forkCount>1</forkCount>
642 <reuseForks>false</reuseForks>
647 <groupId>org.apache.maven.plugins</groupId>
648 <artifactId>maven-failsafe-plugin</artifactId>
649 <version>2.16</version>
654 <goal>integration-test</goal>
658 <forkCount>1</forkCount>
659 <reuseForks>false</reuseForks>
666 <groupId>io.fabric8</groupId>
667 <artifactId>docker-maven-plugin</artifactId>
668 <version>0.16.5</version>
670 <verbose>true</verbose>
671 <apiVersion>1.23</apiVersion>
674 <name>mariadb:10.1.11</name>
675 <alias>mariadb</alias>
678 <MYSQL_ROOT_PASSWORD>strong_pitchou</MYSQL_ROOT_PASSWORD>
680 <hostname>mariadb</hostname>
683 <volume>${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d</volume>
684 <volume>${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d</volume>
688 <log>socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution</log>
692 <port>${docker.mariadb.port.host}:3306</port>
701 <id>mariadb-start-for-it</id>
702 <phase>pre-integration-test</phase>
707 <skip>${skipITs}</skip>
711 <id>mariadb-stop-for-it</id>
712 <phase>post-integration-test</phase>
717 <skip>${skipITs}</skip>
724 <groupId>org.jacoco</groupId>
725 <artifactId>jacoco-maven-plugin</artifactId>
726 <version>0.7.7.201606060606</version>
728 <dumpOnExit>true</dumpOnExit>
730 <include>org.onap.clamp.*</include>
735 <id>jacoco-unit-tests</id>
737 <goal>prepare-agent</goal>
740 <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
741 <!-- <append>true</append> -->
745 <id>jacoco-integration-tests</id>
746 <phase>pre-integration-test</phase>
748 <goal>prepare-agent</goal>
751 <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
752 <!-- <append>true</append> -->
759 <phase>post-integration-test</phase>
762 <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
763 <directory>${project.build.directory}/coverage-reports</directory>
765 <include>*.exec</include>
769 <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
775 <!-- This plugin will be useful when we will have multi-modules project -->
777 <groupId>org.codehaus.mojo</groupId>
778 <artifactId>versions-maven-plugin</artifactId>
779 <version>1.3.1</version>
787 <skip.staging.artifacts>true</skip.staging.artifacts>
788 <skip.docker.build>false</skip.docker.build>