4.0.0 org.onap.policy.clamp policy-clamp 6.2.1 policy-clamp-runtime ${project.artifactId} This is the MAVEN project that builds everything for ONAP POLICY-CLAMP. Docker engine is normally required to perfom all possible tasks (including integration tests) It can build: - The ONAP POLICY-CLAMP JAR that contains CLAMP back-end code. - The DOCKER images for: * POLICY-CLAMP backend (Java Spring) It can test: - The POLICY-CLAMP backend, JAVA unit testing - The POLICY-CLAMP backend, JAVA integration tests (with Spring + docker mariadb database + docker policy/dcae emulator written in python) The test coverage for dev's can be found after a "clean install" build in: - Clamp backend: target/jacoco-dev.exec (unit tests + integration tests merged) or separately target/coverage-reports/jacoco.exec and target/coverage-reports/jacoco-it.exec Useful mvn commands: - mvn clean install: Build Clamp backend JAR + unit tests + integration tests (+coverage for all) - mvn clean install -DskipITs=true: Build Clamp backend JAR + unit tests (+coverage for all), it does not require a DOCKER engine - mvn clean install -DskipTests -P docker: Build Clamp backend JAR + all docker images To start POLICY-CLAMP (Build it before. In order to start frontend, is also required policy/gui repo built): - Use docker-compose file in ./extra/docker/clamp/docker-compose.yml - Use the script located in ./extra/bin/start-backend.sh + start-frontend.sh - Use your IDE to use the Jar or start NVM yyyyMMdd'T'HHmmss'Z' ${project.version} ${maven.build.timestamp} jacoco ${project.build.directory}/surefire-reports ${project.build.directory}/jacoco-html-xml-reports/jacoco.xml ${project.version} DEBUG true src/main src/main/resources/** true src/main/resources/** localhost:5000 nexus3.onap.org:10001 true true true false without-test maven.test.skip true true true without-IT-only skipITs true true true without-IT-only2 skipTests true true true docker true false false false false org.springframework.boot spring-boot-dependencies ${version.springboot} pom import org.codehaus.janino janino org.apache.tomcat.embed tomcat-embed-core org.apache.tomcat.embed tomcat-embed-el org.apache.tomcat.embed tomcat-embed-websocket org.apache.tomcat tomcat-annotations-api org.apache.camel.springboot camel-http-starter ${version.camel} org.apache.camel.springboot camel-spring-boot-starter ${version.camel} org.apache.camel.springboot camel-jaxb-starter ${version.camel} org.apache.camel.springboot camel-servlet-starter ${version.camel} org.apache.camel.springboot camel-gson-starter ${version.camel} org.apache.camel.springboot camel-swagger-java-starter ${version.camel} javax.ws.rs jsr311-api org.slf4j slf4j-ext org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-json org.springframework.boot spring-boot-starter-tomcat org.glassfish jakarta.el org.springframework spring-jdbc org.springframework.boot spring-boot-starter-security org.springframework.boot spring-boot-autoconfigure org.springframework.boot spring-boot-starter-test test com.vaadin.external.google android-json org.springframework.boot spring-boot-starter-data-jpa org.onap.policy.models policy-models-pdp ${policy.models.version} org.eclipse.jetty jetty-server org.glassfish.jersey.containers jersey-container-servlet org.jetbrains.kotlin kotlin-reflect org.jetbrains.kotlin kotlin-stdlib org.jetbrains.kotlin kotlin-stdlib-common javax.xml.ws jaxws-api org.onap.aaf.authz aaf-cadi-aaf javax.servlet servlet-api log4j log4j commons-io commons-io com.googlecode.json-simple json-simple org.apache.commons commons-vfs2 com.squareup.okhttp okhttp org.slf4j slf4j-api javax.transaction jta javax.persistence persistence-api 1.0.2 commons-codec commons-codec org.codehaus.plexus plexus-utils org.jboss.spec.javax.ws.rs jboss-jaxrs-api_2.0_spec org.mariadb.jdbc mariadb-java-client org.onap.sdc.sdc-distribution-client sdc-distribution-client org.onap.sdc.sdc-tosca sdc-tosca com.fasterxml.jackson.core jackson-databind org.yaml snakeyaml org.dom4j dom4j org.junit.vintage junit-vintage-engine test com.github.docker-java docker-java-core test com.fasterxml.jackson.core jackson-databind com.github.docker-java docker-java test policy-clamp-backend src/main/resources true clds/aaf/** src/main/resources false clds/aaf/** src/test/resources **/*.jks **/*.csar true src/test/resources/https **.jks false https src/test/resources/example/sdc **.csar false example/sdc src/main/resources true clds/aaf/** src/main/resources false clds/aaf/** de.jpdigital hibernate52-ddl-maven-plugin 2.2.0 javax.xml.bind jaxb-api 2.3.0 process-classes gen-ddl org.onap.policy.clamp MARIADB53 ${project.basedir}/extra/sql/bulkload/ create-tables true org.codehaus.groovy.maven gmaven-plugin 1.0 docker-tags validate execute ${project.basedir}/src/main/script/TagVersion.groovy org.apache.maven.plugins maven-jar-plugin jar-with-only-classes package jar classes org/** org.codehaus.mojo build-helper-maven-plugin 3.2.0 attach-artifact package ${project.build.directory}/policy-clamp-backend-classes.jar jar classes reserve-port-for-tests process-resources reserve-network-port docker.mariadb.port.host docker.http-cache.port.host clamp.it.tests.http-redirected clamp.it.tests.robotframework.http clamp.it.tests.https clamp.it.tests.http org.springframework.boot spring-boot-maven-plugin repackage package org.apache.maven.plugins maven-surefire-plugin **/*Test.java 1C true false ${surefireArgLine} org.apache.maven.plugins maven-failsafe-plugin integration-tests integration-test verify ${project.build.directory}/classes **/*ItTestCase.java 1C true false ${failsafeArgLine} io.fabric8 docker-maven-plugin org.apache.httpcomponents httpclient 4.5.5 true 1.35 docker.io/mariadb:10.5.4 mariadb strong_pitchou mariadb ${project.basedir}/extra/sql/:/docker-entrypoint-initdb.d:rw ${project.basedir}/extra/docker/mariadb/conf1:/etc/mysql/conf.d port: 3306 /docker-entrypoint-initdb.d/dump/backup-data-only.sh ${docker.mariadb.port.host}:3306 bridge docker.io/python:2-slim python python ${project.basedir}/src/test/resources/http-cache/:/usr/src/http-cache-app ${project.basedir}/src/test/resources/http-cache/example/:/usr/src/http-cache-app/data-cache 8080 direct ${docker.http-cache.port.host}:8080 /usr/src/http-cache-app ./start_http_cache.sh ${python.http.proxy.param} --python_proxyaddress=localhost:${docker.http-cache.port.host} bridge onap/policy-clamp-backend onap-policy-clamp-backend true true latest ${project.docker.latesttagtimestamp.version} ${project.docker.latesttag.version} backend/Dockerfile backend/backend-files.xml onap-policy-clamp-backend generate-images install build push-images deploy push docker-start-for-it pre-integration-test start docker-stop-for-it post-integration-test stop org.jacoco jacoco-maven-plugin true true org/onap/policy/clamp/** pre-unit-test prepare-agent ${project.build.directory}/coverage-reports/jacoco.exec surefireArgLine pre-integration-test pre-integration-test prepare-agent ${project.build.directory}/coverage-reports/jacoco-it.exec failsafeArgLine false merge post-integration-test ${project.build.directory}/coverage-reports *.exec ${project.build.directory}/jacoco.exec report-xml report ${project.build.directory}/jacoco.exec ${project.build.directory}/jacoco-html-xml-reports org.codehaus.mojo versions-maven-plugin org.apache.maven.plugins maven-compiler-plugin org.sonarsource.scanner.maven sonar-maven-plugin org.codehaus.mojo keytool-maven-plugin 1.5 add-certificate-for-dev ${project.build.directory}/classes/clds/aaf/org.onap.clamp.p12 China in the Spring clamptest PKCS12 RSA cn=CN, ou=OU, o=O, c=C 365 generateKeyPair generate-resources add-certificate-for-test ${project.build.directory}/test-classes/clds/aaf/org.onap.clamp.p12 China in the Spring clamptest PKCS12 RSA cn=CN, ou=OU, o=O, c=C 365 generateKeyPair generate-test-resources