4.0.0 org.onap.policy.clamp policy-clamp 6.1.2-SNAPSHOT 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) * POLICY-CLAMP frontend (Javascript React) 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 POLICY-CLAMP frontend, Javascript tests (NodeJS(NPM) + JEST and Enzyme for React) 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 - Clamp frontend: target/ui-react/coverage Useful mvn commands: - mvn clean install: Build Clamp backend JAR + unit tests + integration tests + NPM tests (+coverage for all) - mvn clean install -DskipITs=true: Build Clamp backend JAR + unit tests + NPM 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): - 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/NPM 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 ${project.build.directory}/${ui.react.src}/node/node true src/main,${project.build.directory}/${ui.react.src}/src src/main/resources/** true ${project.build.directory}/${ui.react.src}/coverage/lcov.info src/main/resources/**,target/ui-react/src/**/*.test.js,target/ui-react/src/setupTests.js localhost:5000 nexus3.onap.org:10001 true true true false ui-react ui-react-lib https://nexus3.onap.org/repository/npm.snapshot/ 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 com.att.eelf eelf-core ${version.eelf.core} org.powermock powermock-module-junit4 org.powermock powermock-api-mockito org.codehaus.janino janino org.apache.tomcat.embed tomcat-embed-core ${version.tomcat} org.apache.tomcat.embed tomcat-embed-el ${version.tomcat} org.apache.tomcat.embed tomcat-embed-websocket ${version.tomcat} org.apache.tomcat tomcat-annotations-api ${version.tomcat} 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 ${version.springboot} org.springframework.boot spring-boot-starter-json org.springframework.boot spring-boot-starter-tomcat ${version.springboot} org.glassfish jakarta.el org.springframework spring-jdbc org.springframework.boot spring-boot-starter-security ${version.springboot} org.springframework.boot spring-boot-autoconfigure ${version.springboot} org.springframework.boot spring-boot-starter-test ${version.springboot} test com.vaadin.external.google android-json org.springframework.boot spring-boot-starter-data-jpa ${version.springboot} 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 1.5.1 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/** ${ui.react.src} node_modules src/** public/** package.json package-lock.json true ${project.build.directory}/${ui.react.src} ${ui.react.src} src/** **/__snapshots__/** **/**.test.js true ${project.build.directory}/${ui.react.lib.src} ${ui.react.lib.src} ** node_modules/** package-lock.json true ${project.build.directory}/${ui.react.lib.src} 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 io.github.swagger2markup swagger2markup-maven-plugin 1.3.3 io.github.swagger2markup swagger2markup-import-files-ext 1.3.3 io.github.swagger2markup swagger2markup-spring-restdocs-ext 1.3.3 ${project.basedir}/docs/swagger/swagger.json ${project.build.directory}/asciidoc/generated ASCIIDOC post-integration-test convertSwagger2markup org.asciidoctor asciidoctor-maven-plugin 1.5.7.1 org.asciidoctor asciidoctorj-pdf 1.5.0-alpha.10.1 ${project.basedir}/src/main/resources/asciidoc swagger.adoc book left 3 ${project.build.directory}/asciidoc/generated output-html post-integration-test process-asciidoc html5 ${project.basedir}/docs/swagger ${project.basedir}/src/main/resources/META-INF/resources/ output-pdf post-integration-test process-asciidoc pdf ${project.basedir}/docs/swagger org.codehaus.groovy.maven gmaven-plugin 1.0 docker-tags validate execute ${project.basedir}/src/main/script/TagVersion.groovy npm-repos-selection validate execute ${project.basedir}/src/main/script/SelectNpmRepo.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 1C true false ${surefireArgLine} org.apache.maven.plugins maven-failsafe-plugin integration-tests integration-test verify ${project.build.directory}/classes **/*ItCase.java 1C true false ${failsafeArgLine} io.fabric8 docker-maven-plugin 0.35.0 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 onap/policy-clamp-frontend onap-policy-clamp-frontend true true latest ${project.docker.latesttagtimestamp.version} ${project.docker.latesttag.version} frontend/Dockerfile frontend/frontend-files.xml onap-policy-clamp-frontend 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 ${jacoco.version} 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 1.3.1 com.github.eirslett frontend-maven-plugin 1.11.3 ${project.build.directory}/${ui.react.src} ${repo.npm} install_node_and_npm install-node-and-npm generate-sources v14.16.1 6.14.13 npm_install npm compile ${project.build.directory}/${ui.react.src} install npm_test npm test ${maven.test.skip} run-script test:coverage ${project.build.directory}/${ui.react.src} npm_install_lib npm deploy ${project.build.directory}/${ui.react.lib.src} install npm_build_lib npm deploy ${project.build.directory}/${ui.react.lib.src} run build npm_publish npm deploy ${project.build.directory}/${ui.react.lib.src} publish org.apache.maven.plugins maven-compiler-plugin org.sonarsource.scanner.maven sonar-maven-plugin ${sonar.scanner.version} org.codehaus.mojo exec-maven-plugin 1.3.2 libIndexCheck validate exec bash ${project.basedir}/src/main/script/checkLibIndex.sh 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