<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:
- 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
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
- <!-- The value below comes from the jacoco maven plugin output, sonar now takes xml only -->
<sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/jacoco-html-xml-reports/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
- <!-- <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.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.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.exclusions>src/main/resources/**</sonar.exclusions>
<sonar.scm.exclusions.disabled>true</sonar.scm.exclusions.disabled>
<python.http.proxy.param />
<tomcat.version>9.0.27</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.release/</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>
</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>
</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>
<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>
<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>
<phase>test</phase>
<configuration>
<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>