Update license; improve coverage; add docs dir
[portal.git] / ecomp-portal-BE-os / pom.xml
index d00d47a..ab9efd8 100644 (file)
@@ -1,73 +1,21 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
-       <groupId>org.openecomp.portal</groupId>
+       <parent>
+               <groupId>org.onap.portal</groupId>
+               <artifactId>onap-portal-parent</artifactId>
+               <version>1.3.0-SNAPSHOT</version>
+       </parent>
+
        <artifactId>ecompportal-be-os</artifactId>
        <packaging>war</packaging>
-       <version>1.1</version>
 
        <properties>
-               <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.1.0</epsdk.version>
-               <portal.version>1.1.0</portal.version>
-               <encoding>UTF-8</encoding>
-               <!-- Tests usually require some setup that maven cannot do, so skip. -->
-               <skiptests>false</skiptests>
-               <!-- Jenkins invokes mvn with argument -Dbuild.number=${BUILD_NUMBER} -->
-               <build.number>0</build.number>
-               <sonar.exclusions>**.js</sonar.exclusions>
-               <nexusproxy>https://nexus.onap.org</nexusproxy>
-               <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
-               <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
-               <sitePath>/content/sites/site/org/onap/portal/${project.version}</sitePath>
+               <!-- If skipTests is false use this command to generate the report: mvn 
+                       clean jacoco:prepare-agent install jacoco:report -->
+               <skipTests>false</skipTests>
        </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}${sitePath}</url>
-               </site>
-       </distributionManagement>
-       <repositories>
-               <repository>
-                       <id>ecomp-releases</id>
-                       <name>OpenECOMP - Release Repository</name>
-                       <url>${nexusproxy}/${releaseNexusPath}</url>
-               </repository>
-               <repository>
-                       <id>ecomp-snapshots</id>
-                       <name>OpenECOMP - Snapshot Repository</name>
-                       <url>${nexusproxy}/${snapshotNexusPath}</url>
-               </repository>
-               <repository>
-                       <id>ecomp-public</id>
-                       <name>ecomp onap public Repository</name>
-                       <url>https://nexus.onap.org/content/groups/public</url>
-               </repository>
-       </repositories>
-
        <build>
                <sourceDirectory>src/main/java</sourceDirectory>
                <!-- The war file name carries no version number -->
                                </dependencies>
                        </plugin>
                        <plugin>
-                               <artifactId>maven-compiler-plugin</artifactId>
-                               <version>3.1</version>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>0.7.6.201602180812</version>
+                               <inherited>True</inherited>
+                               <executions>
+                                       <!-- Unit-Tests -->
+                                       <execution>
+                                               <id>prepare-agent</id>
+                                               <goals>
+                                                       <goal>prepare-agent</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <skipTests>false</skipTests>
+                                                       <destFile>${sonar.jacoco.reportPath}</destFile>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>default-instrument</id>
+                                               <goals>
+                                                       <goal>instrument</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <skipTests>false</skipTests>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>default-restore-instrumented-classes</id>
+                                               <phase>test</phase>
+                                               <goals>
+                                                       <goal>restore-instrumented-classes</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <skipTests>false</skipTests>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>post-unit-test</id>
+                                               <phase>test</phase>
+
+                                               <goals>
+                                                       <goal>report</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <skipTests>false</skipTests>
+                                                       <dataFile>${sonar.jacoco.reportPath}</dataFile>
+                                                       <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                                       <!-- Will see build errors while running the test cases because of dual 
+                                               instrumentation -->
+
+                                       <!-- Integration Tests (Only report goal) -->
+                                       <execution>
+                                               <id>report-integration</id>
+                                               <phase>test</phase>
+                                               <goals>
+                                                       <goal>report-integration</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <skipTests>false</skipTests>
+                                                       <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+                                                       <outputDirectory>${project.basedir}/target/site/it-jacoco</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <version>2.19.1</version>
                                <configuration>
-                                       <source>1.8</source>
-                                       <target>1.8</target>
+                                       <skipTests>${skipTests}</skipTests>
+                                       <includes>
+                                               <include>**/*Test.java</include>
+                                               <include>**/*TestCase.java</include>
+                                               <inlcude>**/*TestSuite.java</inlcude>
+                                       </includes>
+                                       <!-- Intentionally Excluding TestFromSuite -->
+                                       <excludes>
+                                               <exclude>**/*TestFromSuite.java</exclude>
+                                       </excludes>
+                                       <additionalClasspathElements>
+                                               <additionalClasspathElement>${basedir}/src/main/webapp</additionalClasspathElement>
+                                               <additionalClasspathElement>../ecomp-portal-BE-common/src/main/webapp</additionalClasspathElement>
+                                               <additionalClasspathElement>../ecomp-portal-BE-common</additionalClasspathElement>
+                                       </additionalClasspathElements>
+                                       <systemPropertyVariables>
+                                               <container.classpath>classpath:</container.classpath>
+                                       </systemPropertyVariables>
                                </configuration>
                        </plugin>
 
                                                </manifestEntries>
                                        </archive>
                                        <overlays>
-                                               <!-- specify the order in which these should be applied -->                                             
+                                               <!-- specify the order in which these should be applied -->
                                                <overlay>
-                                                       <groupId>org.openecomp.portal</groupId>
+                                                       <groupId>org.onap.portal</groupId>
                                                        <artifactId>ecompportal-be-common</artifactId>
                                                </overlay>
                                                <overlay>
-                                                       <groupId>org.openecomp.ecompsdkos</groupId>
+                                                       <groupId>org.onap.portal.sdk</groupId>
                                                        <artifactId>epsdk-app-overlay</artifactId>
                                                </overlay>
                                        </overlays>
 
                        <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. -->
        </build>
 
        <dependencies>
-               <dependency>
-                       <groupId>com.att.eelf</groupId>
-                       <artifactId>eelf-core</artifactId>
-                       <version>${eelf.version}</version>
-               </dependency>
-               <dependency>
-                       <groupId>com.google.code.gson</groupId>
-                       <artifactId>gson</artifactId>
-                       <version>2.5</version>
-               </dependency>
-
                <!-- Spring -->
                <dependency>
                        <groupId>org.springframework</groupId>
                                </exclusion>
                        </exclusions>
                </dependency>
-
                <!-- Hibernate -->
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                        <version>${hibernate.version}</version>
                </dependency>
-
-               <!-- jsr303 validation -->
-               <!-- <dependency> <groupId>javax.validation</groupId> <artifactId>validation-api</artifactId> 
-                       <version>1.1.0.Final</version> </dependency> -->
-
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-validator</artifactId>
                        <artifactId>cxf-rt-rs-client</artifactId>
                        <version>3.0.0-milestone1</version>
                </dependency>
-
                <!-- Mapper -->
                <dependency>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <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>
                        <artifactId>jest</artifactId>
                        <version>2.0.0</version>
                </dependency>
-
                <dependency>
                        <groupId>org.apache.jcs</groupId>
                        <artifactId>jcs</artifactId>
                                        <artifactId>*</artifactId>
                                </exclusion>
                        </exclusions>
-                       <!-- -->
                </dependency>
-
                <dependency>
                        <groupId>org.apache.tomcat</groupId>
                        <artifactId>tomcat-websocket</artifactId>
                        <version>8.0.28</version>
                        <scope>provided</scope>
                </dependency>
-
                <!-- Raptor required Libraries -->
                <!-- for static charts -->
                <dependency>
                                </exclusion>
                        </exclusions>
                </dependency>
-
-               <!-- <dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> 
-                       <version>2.0.8</version> <exclusions> <exclusion> <groupId>org.bouncycastle</groupId> 
-                       <artifactId>bcprov-jdk14</artifactId> </exclusion> </exclusions> </dependency> -->
                <!-- Quartz -->
                <dependency>
                        <groupId>org.quartz-scheduler</groupId>
                                </exclusion>
                        </exclusions>
                </dependency>
-
                <dependency>
                        <groupId>commons-codec</groupId>
                        <artifactId>commons-codec</artifactId>
                        <version>1.9</version>
                </dependency>
-
                <dependency>
                        <groupId>com.att.nsa</groupId>
                        <artifactId>cambriaClient</artifactId>
                                </exclusion>
                        </exclusions>
                </dependency>
-
                <!-- SDK overlay war -->
                <dependency>
-                       <groupId>org.openecomp.ecompsdkos</groupId>
+                       <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-app-overlay</artifactId>
                        <version>${epsdk.version}</version>
                        <type>war</type>
                </dependency>
-
                <dependency>
-                       <groupId>org.openecomp.ecompsdkos</groupId>
+                       <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-app-common</artifactId>
                        <version>${epsdk.version}</version>
                        <type>jar</type>
                </dependency>
-
                <!-- EcompPortal common overlay -->
                <dependency>
-                       <groupId>org.openecomp.portal</groupId>
+                       <groupId>org.onap.portal</groupId>
                        <artifactId>ecompportal-be-common</artifactId>
-                       <version>${portal.version}</version>
+                       <version>${project.version}</version>
                        <type>war</type>
                </dependency>
-
                <dependency>
-                       <groupId>org.openecomp.portal</groupId>
+                       <groupId>org.onap.portal</groupId>
                        <artifactId>ecompportal-be-common</artifactId>
-                       <version>${portal.version}</version>
+                       <version>${project.version}</version>
                        <type>jar</type>
                        <classifier>classes</classifier>
                </dependency>
-
                <dependency>
-                       <groupId>org.openecomp.ecompsdkos</groupId>
+                       <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-fw</artifactId>
                        <version>${epsdk.version}</version>
                        <exclusions>
                                </exclusion>
                        </exclusions>
                </dependency>
-
                <dependency>
-                       <groupId>org.openecomp.ecompsdkos</groupId>
+                       <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-core</artifactId>
                        <version>${epsdk.version}</version>
                </dependency>
-
                <dependency>
-                       <groupId>org.openecomp.ecompsdkos</groupId>
+                       <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-workflow</artifactId>
                        <version>${epsdk.version}</version>
                </dependency>
-
                <!-- Raptor required Libraries -->
                <!-- for static charts -->
                <dependency>
-                       <groupId>org.openecomp.ecompsdkos</groupId>
+                       <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-analytics</artifactId>
                        <version>${epsdk.version}</version>
                </dependency>
-
                <!-- Referenced by some poms and needed for testing; do NOT use "test" 
                        scope here. -->
                <dependency>
                        <artifactId>httpclient</artifactId>
                        <version>4.5.2</version>
                </dependency>
-
                <!-- for testing -->
                <dependency>
                        <groupId>junit</groupId>
                        <version>4.11</version>
                        <scope>test</scope>
                </dependency>
-
+               <dependency>
+                       <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>
+                       <artifactId>mockito-core</artifactId>
+                       <version>1.8.5</version>
+                       <scope>test</scope>
+               </dependency>
                <dependency>
                        <groupId>commons-beanutils</groupId>
                        <artifactId>commons-beanutils</artifactId>
                        <version>1.9.2</version>
                </dependency>
-
                <!-- OpenID Connect Dependencies -->
                <dependency>
                        <groupId>org.mitre</groupId>
                                </exclusion>
                        </exclusions>
                </dependency>
-
                <dependency>
                        <groupId>org.springframework.security</groupId>
                        <artifactId>spring-security-taglibs</artifactId>
                                </exclusion>
                        </exclusions>
                </dependency>
-
                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>1.8.9</version>
                </dependency>
-
        </dependencies>
+
+       <reporting>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <version>3.0.0-M1</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>
+
 </project>