4.0.0 org.onap.policy clamp 6.1.0-SNAPSHOT policy-clamp org.onap.policy.parent integration 3.3.0 This is the MAVEN project that builds everything for ONAP POLICY-CLAMP. Docker engine is normally requires 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} UTF-8 UTF-8 1.0.0 3.7.3 2.4.4 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 9.0.45 ui-react ui-react-lib https://nexus3.onap.org/repository/npm.snapshot/ 2.4.0 1.8.1 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 ecomp-releases ONAP Release Repository https://nexus.onap.org/content/repositories/releases/ ecomp-snapshots ONAP Snapshot Repository https://nexus.onap.org/content/repositories/snapshots/ ecomp-site dav:https://nexus.onap.org/content/sites/site/org/onap/policy/clamp/${project.version} onap-public onap-public https://nexus.onap.org/content/repositories/public/ true false ecomp-releases ONAP Release Repository https://nexus.onap.org/content/repositories/releases/ ecomp-staging ONAP Staging Repository https://nexus.onap.org/content/repositories/staging/ ecomp-snapshots ONAP Snapshot Repository https://nexus.onap.org/content/repositories/snapshots/ true false central http://repo1.maven.org/maven2/ onap-public onap-public https://nexus.onap.org/content/repositories/public/ true false central http://repo1.maven.org/maven2/ org.springframework.boot spring-boot-dependencies ${springboot.version} pom import org.apache.camel.springboot camel-spring-boot-bom ${camel.version} pom import com.att.eelf eelf-core ${eelf.core.version} org.powermock powermock-module-junit4 org.powermock powermock-api-mockito org.codehaus.janino janino 3.0.8 org.apache.tomcat.embed tomcat-embed-core ${tomcat.version} org.apache.tomcat.embed tomcat-embed-el ${tomcat.version} org.apache.tomcat.embed tomcat-embed-websocket ${tomcat.version} org.apache.tomcat tomcat-annotations-api ${tomcat.version} org.apache.camel.springboot camel-http-starter org.apache.camel.springboot camel-spring-boot-starter org.apache.camel.springboot camel-jaxb-starter org.apache.camel.springboot camel-servlet-starter org.apache.camel.springboot camel-gson-starter org.apache.camel.springboot camel-swagger-java-starter 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 javax.xml.ws jaxws-api 2.3.1 org.onap.aaf.authz aaf-cadi-aaf 2.1.15 javax.servlet servlet-api log4j log4j ch.qos.logback logback-core 1.2.3 ch.qos.logback logback-classic 1.2.3 commons-io commons-io 2.8.0 com.googlecode.json-simple json-simple 1.1.1 org.apache.commons commons-vfs2 2.8.0 com.squareup.okhttp okhttp org.slf4j slf4j-api javax.transaction jta 1.1 javax.persistence persistence-api 1.0.2 commons-codec commons-codec 1.15 org.codehaus.plexus plexus-utils 3.3.0 org.jboss.spec.javax.ws.rs jboss-jaxrs-api_2.0_spec 1.0.1.Final org.mariadb.jdbc mariadb-java-client 2.7.2 org.onap.sdc.sdc-distribution-client sdc-distribution-client 1.4.1 org.onap.sdc.sdc-tosca sdc-tosca 1.5.1 com.fasterxml.jackson.core jackson-databind org.yaml snakeyaml 1.28 org.dom4j dom4j 2.1.3 org.junit.vintage junit-vintage-engine 5.7.1 test org.assertj assertj-core 3.10.0 test com.github.docker-java docker-java-core 3.2.7 test com.fasterxml.jackson.core jackson-databind com.github.docker-java docker-java 3.2.7 test org.onap.policy.common utils-test ${policy.common.version} 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 3.2.0 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 ${springboot.version} repackage package org.apache.maven.plugins maven-surefire-plugin 2.22.2 1C true false ${surefireArgLine} org.apache.maven.plugins maven-failsafe-plugin 2.22.2 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 0.8.5 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.12 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 3.8.1 11 11 org.sonarsource.scanner.maven sonar-maven-plugin 3.7.0.1746 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