<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.clamp</groupId>
<artifactId>clds</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>5.0.6</version>
<name>clamp</name>
<parent>
<groupId>org.onap.oparent</groupId>
<artifactId>oparent</artifactId>
- <version>2.0.0</version>
+ <version>2.1.0</version>
</parent>
<description>
This is the MAVEN project that builds everything for ONAP CLAMP.
Docker engine is normally requires to perfom all possible tasks (including integration tests)
-
+
It can build:
- The ONAP CLAMP JAR that contains CLAMP back-end code.
- The DOCKER images for:
* CLAMP backend (Java Spring)
* CLAMP frontend (Javscript React)
- * The dashboard - Elastic search
- * The dashboard - Logstash
- * The dashboard - Kibana
It can test:
- The CLAMP backend, JAVA unit testing
- The CLAMP backend, JAVA integration tests (with Spring + docker mariadb database + docker policy/dcae emulator written in python)
- The CLAMP frontend, Javascrip tests (NodeJS(NPM) + JEST + Enzyme fro 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
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
<clamp.project.version>${project.version}</clamp.project.version>
<clamp.build.timestamp>${maven.build.timestamp}</clamp.build.timestamp>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<eelf.core.version>1.0.0</eelf.core.version>
- <camel.version>2.24.0</camel.version>
- <springboot.version>2.1.5.RELEASE</springboot.version>
+ <camel.version>2.25.0</camel.version>
+ <springboot.version>2.2.6.RELEASE</springboot.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
- <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
- <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/jacoco-html-xml-reports/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
<sonar.projectVersion>${project.version}</sonar.projectVersion>
- <!-- Enable language to disable javascript analysis -->
- <!-- <sonar.language>java</sonar.language> -->
- <!-- Parameters for Javascript coverage -->
+ <sonar.log.level>DEBUG</sonar.log.level>
+ <sonar.nodejs.executable>${project.build.directory}/${ui.react.src}/node/node</sonar.nodejs.executable>
+ <sonar.verbose>true</sonar.verbose>
<sonar.sources>src/main,${project.build.directory}/${ui.react.src}/src</sonar.sources>
- <sonar.javascript.lcov.reportPaths>${project.build.directory}/${ui.react.src}/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
-
<sonar.exclusions>src/main/resources/**</sonar.exclusions>
- <sonar.coverage.exclusions>src/main/resources/**,target/ui-react/src/**/*.test.js,target/ui-react/src/setupTests.js,src/main/docker/kibana/*.py</sonar.coverage.exclusions>
+ <sonar.scm.exclusions.disabled>true</sonar.scm.exclusions.disabled>
+ <sonar.javascript.lcov.reportPaths>${project.build.directory}/${ui.react.src}/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
+ <sonar.coverage.exclusions>src/main/resources/**,target/ui-react/src/**/*.test.js,target/ui-react/src/setupTests.js</sonar.coverage.exclusions>
<docker.push.registry>localhost:5000</docker.push.registry>
<docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
<docker.skip.build>true</docker.skip.build>
<docker.skip.tag>true</docker.skip.tag>
<skip.staging.artifacts>false</skip.staging.artifacts>
<python.http.proxy.param />
- <tomcat.version>9.0.20</tomcat.version>
+ <tomcat.version>9.0.33</tomcat.version>
<ui.react.src>ui-react</ui.react.src>
+ <ui.react.lib.src>ui-react-lib</ui.react.lib.src>
<npm.publish.url>https://nexus3.onap.org/repository/npm.snapshot/</npm.publish.url>
</properties>
<profiles>
+ <!-- BEGIN: NOT USABLE profiles, those are defined when specific flags are enabled -->
<profile>
<id>without-test</id>
<activation>
<docker.skip>true</docker.skip>
</properties>
</profile>
+ <!-- END: NOT USABLE profiles, those are defined when specific flags are enabled -->
<profile>
<id>docker</id>
<properties>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.11</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId>
<version>1.11</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>1.11</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>com.att.eelf</groupId>
<artifactId>eelf-core</artifactId>
<version>${eelf.core.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.janino</groupId>
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.3.1</version>
+ </dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
<version>1.3</version>
</dependency>
<!-- Other dependencies to fix nexus IQ reported vulnerabilities -->
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ <version>5.2.3.RELEASE</version>
+ </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<artifactId>sdc-tosca</artifactId>
<version>1.5.1</version>
</dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.26</version>
+ </dependency>
+ <dependency>
+ <groupId>org.dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>2.1.3</version>
+ </dependency>
+
<!-- TESTING -->
<dependency>
<groupId>org.assertj</groupId>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.10.19</version>
+ <version>2.28.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito2</artifactId>
+ <version>2.0.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>2.0.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<finalName>clamp</finalName>
<testResources>
+ <testResource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <excludes>
+ <exclude>clds/aaf/**</exclude>
+ </excludes>
+ </testResource>
+ <testResource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>clds/aaf/**</include>
+ </includes>
+ </testResource>
<testResource>
<directory>src/test/resources</directory>
<excludes>
</testResource>
</testResources>
<resources>
- <!-- For AAF folder maven should not try to filter Keystores/Truststores ... Otherwise
+ <!-- For AAF folder maven should not try to filter Keystores/Truststores ... Otherwise
they will be broken and unreadable -->
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${ui.react.src}</directory>
+ <excludes>
+ <exclude>node_modules</exclude>
+ </excludes>
<includes>
<include>src/**</include>
<include>public/**</include>
<filtering>true</filtering>
<targetPath>${project.build.directory}/${ui.react.src}</targetPath>
</resource>
+ <resource>
+ <directory>${ui.react.src}</directory>
+ <includes>
+ <include>src/**</include>
+ </includes>
+ <excludes>
+ <exclude>**/__snapshots__/**</exclude>
+ <exclude>**/**.test.js</exclude>
+ </excludes>
+ <filtering>true</filtering>
+ <targetPath>${project.build.directory}/${ui.react.lib.src}</targetPath>
+ </resource>
+ <resource>
+ <directory>${ui.react.lib.src}</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>node_modules/**</exclude>
+ <exclude>package-lock.json</exclude>
+ </excludes>
+ <filtering>true</filtering>
+ <targetPath>${project.build.directory}/${ui.react.lib.src}</targetPath>
+ </resource>
</resources>
<plugins>
<plugin>
- <groupId>de.jpdigital</groupId>
- <artifactId>hibernate52-ddl-maven-plugin</artifactId>
- <version>2.2.0</version>
+ <groupId>de.jpdigital</groupId>
+ <artifactId>hibernate52-ddl-maven-plugin</artifactId>
+ <version>2.2.0</version>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
</goals>
<configuration>
<packages>
- <param>org.onap.clamp.dao.model</param>
+ <param>org.onap.clamp</param>
</packages>
<dialects>
<param>MARIADB53</param>
</executions>
</plugin>
- <!-- Read the swagger.json file and the definition from SwaggerConfig.java; generate
+ <!-- Read the swagger.json file and the definition from SwaggerConfig.java; generate
a list of .adoc files containing the APIs info in more structured way -->
<plugin>
<groupId>io.github.swagger2markup</groupId>
</executions>
</plugin>
- <!-- Run the generated asciidoc through Asciidoctor to generate other documentation
+ <!-- Run the generated asciidoc through Asciidoctor to generate other documentation
types, such as PDFs or HTML5 -->
<plugin>
<groupId>org.asciidoctor</groupId>
<version>1.0</version>
<executions>
<execution>
+ <id>docker-tags</id>
<phase>validate</phase>
<goals>
<goal>execute</goal>
<source>${project.basedir}/src/main/script/TagVersion.groovy</source>
</configuration>
</execution>
+ <execution>
+ <id>npm-repos-selection</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${project.basedir}/src/main/script/SelectNpmRepo.groovy</source>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <!-- Temporary fix -->
- <version>1.5.13.RELEASE</version>
- <!-- <version>${springboot.version}</version> -->
+ <version>${springboot.version}</version>
<executions>
<execution>
<goals>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
<configuration>
<forkCount>1C</forkCount>
<reuseForks>true</reuseForks>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
- <version>2.22.1</version>
+ <version>2.22.2</version>
<executions>
<execution>
<id>integration-tests</id>
<includes>
<include>**/*ItCase.java</include>
</includes>
- <forkCount>1</forkCount>
+ <forkCount>1C</forkCount>
<reuseForks>true</reuseForks>
<useSystemClassLoader>false</useSystemClassLoader>
<argLine>${failsafeArgLine}</argLine>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
- <version>0.27.2</version>
+ <version>0.31.0</version>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<ports>
<port>${docker.mariadb.port.host}:3306</port>
</ports>
+ <network>
+ <mode>bridge</mode>
+ </network>
</run>
</image>
<image>
<shell>./start_http_cache.sh ${python.http.proxy.param}
--python_proxyaddress=localhost:${docker.http-cache.port.host}</shell>
</cmd>
+ <network>
+ <mode>bridge</mode>
+ </network>
</run>
</image>
<image>
<tag>${project.docker.latesttagtimestamp.version}</tag>
<tag>${project.docker.latesttag.version}</tag>
</tags>
- <!-- A relative path is looked up in ${project.basedir}/src/main/docker by
+ <!-- A relative path is looked up in ${project.basedir}/src/main/docker by
default -->
<dockerFile>backend/Dockerfile</dockerFile>
<assembly>
<tag>${project.docker.latesttagtimestamp.version}</tag>
<tag>${project.docker.latesttag.version}</tag>
</tags>
- <!-- A relative path is looked up in ${project.basedir}/src/main/docker by
+ <!-- A relative path is looked up in ${project.basedir}/src/main/docker by
default -->
<dockerFile>frontend/Dockerfile</dockerFile>
<assembly>
</assembly>
</build>
</image>
- <image>
- <name>onap/clamp-dashboard-logstash</name>
- <alias>onap-clamp-dashboard-logstash</alias>
- <run>
- <skip>true</skip>
- </run>
- <build>
- <cleanup>true</cleanup>
- <tags>
- <tag>latest</tag>
- <tag>${project.docker.latesttagtimestamp.version}</tag>
- <tag>${project.docker.latesttag.version}</tag>
- </tags>
- <dockerFile>logstash/Dockerfile</dockerFile>
- </build>
- </image>
- <image>
- <name>onap/clamp-dashboard-kibana</name>
- <alias>onap-clamp-dashboard-kibana</alias>
- <run>
- <skip>true</skip>
- </run>
- <build>
- <cleanup>true</cleanup>
- <tags>
- <tag>latest</tag>
- <tag>${project.docker.latesttagtimestamp.version}</tag>
- <tag>${project.docker.latesttag.version}</tag>
- </tags>
- <dockerFile>kibana/Dockerfile</dockerFile>
- </build>
- </image>
</images>
</configuration>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.8.2</version>
+ <version>0.8.5</version>
<configuration>
<dumpOnExit>true</dumpOnExit>
<append>true</append>
<includes>
- <include>org.onap.clamp.*</include>
+ <include>org/onap/clamp/**</include>
</includes>
</configuration>
<executions>
</includes>
</fileSet>
</fileSets>
- <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
+ <destFile>${project.build.directory}/jacoco.exec</destFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report-xml</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <!-- Setting explicit path, so that we remember where it picks them up from -->
+ <dataFile>${project.build.directory}/jacoco.exec</dataFile>
+ <outputDirectory>${project.build.directory}/jacoco-html-xml-reports</outputDirectory>
</configuration>
</execution>
</executions>
<version>1.8.0</version>
<configuration>
<installDirectory>${project.build.directory}/${ui.react.src}</installDirectory>
- <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
</configuration>
<executions>
<execution>
</goals>
<phase>generate-sources</phase>
<configuration>
- <nodeVersion>v12.10.0</nodeVersion>
- <npmVersion>6.10.3</npmVersion>
+ <nodeVersion>v12.13.0</nodeVersion>
+ <npmVersion>6.13.0</npmVersion>
</configuration>
</execution>
<execution>
</goals>
<phase>compile</phase>
<configuration>
+ <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
<arguments>install</arguments>
</configuration>
</execution>
</goals>
<phase>test</phase>
<configuration>
+ <skip>${maven.test.skip}</skip>
<arguments>run-script test:coverage</arguments>
+ <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>npm_install_lib</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <phase>deploy</phase>
+ <configuration>
+ <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory>
+ <arguments>install</arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>npm_build_lib</id>
+ <goals>
+ <goal>npm</goal>
+ </goals>
+ <phase>deploy</phase>
+ <configuration>
+ <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory>
+ <arguments>run build</arguments>
</configuration>
</execution>
<execution>
</goals>
<phase>deploy</phase>
<configuration>
- <arguments>publish --registry ${npm.publish.url}</arguments>
+ <skip>true</skip>
+ <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory>
+ <arguments>publish</arguments>
</configuration>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ <configuration>
+ <source>11</source>
+ <target>11</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.sonarsource.scanner.maven</groupId>
+ <artifactId>sonar-maven-plugin</artifactId>
+ <version>3.7.0.1746</version>
+ </plugin>
</plugins>
</build>
</project>