<version>1.1</version>
<properties>
+ <portal.version>1.3.0-SNAPSHOT</portal.version>
+ <epsdk.version>1.3.0</epsdk.version>
+ <!-- Jenkins SHOULD invoke mvn with argument -Dbuild.number=${BUILD_NUMBER} -->
+ <build.number>0</build.number>
<springframework.version>4.2.0.RELEASE</springframework.version>
<hibernate.version>4.3.11.Final</hibernate.version>
<eelf.version>1.0.0</eelf.version>
- <epsdk.version>1.3.0-SNAPSHOT</epsdk.version>
- <portal.version>1.3.0-SNAPSHOT</portal.version>
<encoding>UTF-8</encoding>
- <!-- Tests usually require some setup that maven cannot do, so skip. -->
- <skipTests>true</skipTests>
- <!-- Jenkins SHOULD invoke mvn with argument -Dbuild.number=${BUILD_NUMBER} -->
- <build.number>0</build.number>
+ <!-- If skipTests is false use this command to generate the report:
+ mvn clean jacoco:prepare-agent install jacoco:report -->
+ <skipTests>false</skipTests>
+ <skipCoverage>false</skipCoverage>
+ <jacoco.data.file>${project.build.directory}/coverage-reports/jacoco-ut.exec</jacoco.data.file>
+ <sonar-jacoco-listeners.version>3.8</sonar-jacoco-listeners.version>
+ <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
+ <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>${project.build.directory}/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
<sonar.exclusions>**.js</sonar.exclusions>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
+ <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
<releaseNexusPath>content/repositories/releases/</releaseNexusPath>
</properties>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.10.4</version>
- <configuration>
- <failOnError>false</failOnError>
- <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
- <docletArtifact>
- <groupId>org.umlgraph</groupId>
- <artifactId>umlgraph</artifactId>
- <version>5.6</version>
- </docletArtifact>
- <additionalparam>-views</additionalparam>
- <useStandardDocletOptions>true</useStandardDocletOptions>
- </configuration>
- </plugin>
-
- </plugins>
- </reporting>
- <distributionManagement>
- <site>
- <id>ecomp-site</id>
- <url>dav:${nexusproxy}/content/sites/site/org/onap/portal/${project.version}</url>
- </site>
- </distributionManagement>
<repositories>
<repository>
<id>onap-releases</id>
+ <name>ONAP - Release Repository</name>
<url>${nexusproxy}/${releaseNexusPath}</url>
</repository>
+ <repository>
+ <id>onap-staging</id>
+ <name>ONAP - Staging Repository</name>
+ <url>${nexusproxy}/${stagingNexusPath}</url>
+ </repository>
<repository>
<id>onap-snapshots</id>
+ <name>ONAP - Snapshot Repository</name>
<url>${nexusproxy}/${snapshotNexusPath}</url>
</repository>
<repository>
<id>onap-public</id>
- <url>https://nexus.onap.org/content/groups/public</url>
+ <url>${nexusproxy}/content/groups/public</url>
</repository>
</repositories>
<target>1.8</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.5.201505241946</version>
- <executions>
-
- <!-- Prepares the property pointing to the JaCoCo runtime agent which
- is passed as VM argument when Maven the Surefire plugin is executed. -->
- <execution>
- <id>pre-unit-test</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <!-- Sets the path to the file which contains the execution data. -->
- <destFile>${basedir}/target/coverage-reports/jacoco-ut.exec</destFile>
- <!-- Sets the name of the property containing the settings for JaCoCo
- runtime agent. -->
- <propertyName>surefireArgLine</propertyName>
- <skip>${skipTests}</skip>
- </configuration>
-
- </execution>
- <!-- Ensures that the code coverage report for unit tests is created
- after unit tests have been run. -->
- <execution>
- <id>post-unit-test</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <!-- Sets the path to the file which contains the execution data. -->
- <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
- <!-- Sets the output directory for the code coverage report. -->
- <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
- <skip>${skipTests}</skip>
-
- </configuration>
- </execution>
- <!-- Will see build errors while running the test cases because of dual
- instrumentation -->
- <execution>
- <id>default-instrument</id>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <skip>${skipTests}</skip>
- </configuration>
- </execution>
- <execution>
- <id>default-restore-instrumented-classes</id>
- <goals>
- <goal>restore-instrumented-classes</goal>
- </goals>
- <configuration>
- <skip>${skipTests}</skip>
- </configuration>
- </execution>
- </executions>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <executions>
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <!-- Integration Tests (Only report goal) -->
+ <execution>
+ <id>report-integration</id>
+ <goals>
+ <goal>report-integration</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/it-jacoco</outputDirectory>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <!-- Will see build errors while running the test cases because of dual
+ instrumentation -->
+ <execution>
+ <id>default-instrument</id>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ <configuration>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-restore-instrumented-classes</id>
+ <goals>
+ <goal>restore-instrumented-classes</goal>
+ </goals>
+ <configuration>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.0.2</version>
- <executions>
- <execution>
- <id>copy-src</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/classes</outputDirectory>
- <overwrite>false</overwrite>
- <skip>${skipTests}</skip>
- <resources>
- <resource>
- <directory>${basedir}/../ecomp-portal-BE-common/target/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
-
- </executions>
- </plugin>
-
-
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
- <version>3.0.1</version>
+ <version>3.0.2</version>
<!-- Your own property files can be placed in ecomp-portal-be/../../overrides
directory and they will override the generic source controlled versions at
build time allowing you to test locally with your own settings. -->
</resources>
</configuration>
</execution>
+<!-- <execution> -->
+<!-- <id>copy-src</id> -->
+<!-- <phase>generate-resources</phase> -->
+<!-- <goals> -->
+<!-- <goal>copy-resources</goal> -->
+<!-- </goals> -->
+<!-- <configuration> -->
+<!-- <outputDirectory>${basedir}/target/classes</outputDirectory> -->
+<!-- <overwrite>false</overwrite> -->
+<!-- <skip>${skipTests}</skip> -->
+<!-- <resources> -->
+<!-- <resource> -->
+<!-- <directory>${basedir}/../ecomp-portal-BE-common/target/classes</directory> -->
+<!-- </resource> -->
+<!-- </resources> -->
+<!-- </configuration> -->
+<!-- </execution> -->
</executions>
</plugin>
</plugins>
<artifactId>classmate</artifactId>
<version>1.3.1</version>
</dependency>
-
+
+ <!-- Use Mariadb connector/j for failover -->
<dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.22</version>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>1.5.8</version>
</dependency>
-
+
<!-- Elastic Search -->
<dependency>
<groupId>org.elasticsearch</groupId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onap.portal</groupId>
- <artifactId>ecomp-portal-BE-common-test</artifactId>
- <version>${portal.version}</version>
- <scope>test</scope>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-core</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
</dependency>
</dependencies>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.4</version>
+ <configuration>
+ <failOnError>false</failOnError>
+ <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
+ <docletArtifact>
+ <groupId>org.umlgraph</groupId>
+ <artifactId>umlgraph</artifactId>
+ <version>5.6</version>
+ </docletArtifact>
+ <additionalparam>-views</additionalparam>
+ <useStandardDocletOptions>true</useStandardDocletOptions>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </reporting>
+
+ <distributionManagement>
+ <site>
+ <id>ecomp-site</id>
+ <url>dav:${nexusproxy}/content/sites/site/org/onap/portal/${project.version}</url>
+ </site>
+ </distributionManagement>
+
</project>