<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.clamp</groupId>
<artifactId>clds</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>5.1.0-SNAPSHOT</version>
<name>clamp</name>
<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
<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.2.0.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.27</tomcat.version>
+ <tomcat.version>9.0.33</tomcat.version>
<ui.react.src>ui-react</ui.react.src>
- <npm.publish.url>https://nexus3.onap.org/repository/npm.release/</npm.publish.url>
+ <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>
</dependencyManagement>
<dependencies>
- <dependency>
- <groupId>org.apache.xmlgraphics</groupId>
- <artifactId>batik-svggen</artifactId>
- <version>1.11</version>
- </dependency>
- <dependency>
- <groupId>org.apache.xmlgraphics</groupId>
- <artifactId>batik-svg-dom</artifactId>
- <version>1.11</version>
- </dependency>
- <dependency>
- <groupId>org.apache.xmlgraphics</groupId>
- <artifactId>batik-transcoder</artifactId>
- <version>1.11</version>
- </dependency>
<dependency>
<groupId>com.att.eelf</groupId>
<artifactId>eelf-core</artifactId>
</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>
<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>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
- <executions>
<execution>
+ <id>npm-repos-selection</id>
<phase>validate</phase>
<goals>
<goal>execute</goal>
<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>
<includes>
<include>**/*ItCase.java</include>
</includes>
- <forkCount>1</forkCount>
+ <forkCount>1C</forkCount>
<reuseForks>true</reuseForks>
<useSystemClassLoader>false</useSystemClassLoader>
<argLine>${failsafeArgLine}</argLine>
<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>
<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.13.0</nodeVersion>
- <npmVersion>6.13.0</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>
+ <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory>
<arguments>publish</arguments>
</configuration>
</execution>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.3.2</version>
+ <executions>
+ <execution>
+ <id>libIndexCheck</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>bash</executable>
+ <arguments>
+ <argument>${project.basedir}/src/main/script/checkLibIndex.sh</argument>
+ </arguments>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>