upgrade jersey version for api tests
[vid.git] / vid-app-common / pom.xml
index 175c077..1749039 100755 (executable)
@@ -9,27 +9,53 @@
         inherit from a parent maven module. -->
     <groupId>org.onap.vid</groupId>
     <artifactId>vid-app-common</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
+    <version>5.0.0-SNAPSHOT</version>
     <packaging>war</packaging>
     <name>VID Common</name>
     <description>VID Common code for opensource version</description>
 
+    <parent>
+        <groupId>org.onap.oparent</groupId>
+        <artifactId>oparent</artifactId>
+        <version>2.0.0</version>
+        <relativePath/>
+    </parent>
+
     <properties>
         <encoding>UTF-8</encoding>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
         <epsdk.version>2.4.0</epsdk.version>
-        <springframework.version>4.2.9.RELEASE</springframework.version>
+        <springframework.version>5.1.6.RELEASE</springframework.version>
+        <springframework.orm.version>4.3.22.RELEASE</springframework.orm.version>
+        <!-- epsdk-core is importing this class, which is only on spring-orm 4 but not in orm 5:
+         org.springframework.orm.hibernate4.HibernateTransactionManager
+         so following orm.version lets epsdk-core find it -->
         <hibernate.version>4.3.11.Final</hibernate.version>
+        <jackson.version>2.9.8</jackson.version>
+        <jersey.version>2.28</jersey.version>
+        <surefire.version>2.22.1</surefire.version>
+        <sonar.coverage.exclusions>**/webapp/**/*,**/*.js</sonar.coverage.exclusions>
+
         <!-- Skip assembling the zip by default -->
         <skipassembly>true</skipassembly>
-        <!-- Tests usually require some setup that maven cannot do, so skip. -->
-        <skiptests>false</skiptests>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
-        <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
-        <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
-        <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
-        <sitePath>/content/sites/site/org/onap/vid/${project.version}</sitePath>
+        <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
+        <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
+        <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
+        <sitePath>content/sites/site/org/onap/vid/${project.version}</sitePath>
+
+        <aspectj.version>1.8.9</aspectj.version>
+        <kotlin.version>1.3.11</kotlin.version>
+        <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
+
+        <eirslett.version>1.6</eirslett.version>
+        <node.version>v8.9.4</node.version>
+        <npm.version>5.6.0</npm.version>
+
+        <!-- override using -Drelease_version=foo -Dpatch_version=bar -->
+        <release_version>${env.RELEASE_VERSION}</release_version>
+        <patch_version/>
     </properties>
 
 
         <repository>
             <id>ecomp-releases</id>
             <name>VID Release Repository</name>
-            <url>${nexusproxy}${releaseNexusPath}</url>
+            <url>${nexusproxy}/${releaseNexusPath}</url>
         </repository>
         <repository>
             <id>ecomp-snapshots</id>
             <name>VID Snapshot Repository</name>
-            <url>${nexusproxy}${snapshotNexusPath}</url>
+            <url>${nexusproxy}/${snapshotNexusPath}</url>
         </repository>
         <repository>
             <id>ecomp-staging</id>
             <name>VID Staging Repository</name>
-            <url>${nexusproxy}${stagingNexusPath}</url>
+            <url>${nexusproxy}/${stagingNexusPath}</url>
         </repository>
         <repository>
             <!-- Snapshots repository has ECOMP snapshot artifacts -->
         <!-- added for javadoc -->
         <site>
             <id>ecomp-site</id>
-            <url>dav:${nexusproxy}${sitePath}</url>
+            <url>dav:${nexusproxy}/${sitePath}</url>
         </site>
     </distributionManagement>
 
         <finalName>vid-common</finalName>
 
         <plugins>
+
             <plugin>
-                <groupId>org.sonatype.plugins</groupId>
-                <artifactId>nexus-staging-maven-plugin</artifactId>
-                <version>1.6.7</version>
-                <extensions>true</extensions>
-                <configuration>
-                    <nexusUrl>${nexusproxy}</nexusUrl>
-                    <stagingProfileId>176c31dfe190a</stagingProfileId>
-                    <serverId>ecomp-staging</serverId>
-                </configuration>
+                <artifactId>kotlin-maven-plugin</artifactId>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <version>${kotlin.version}</version>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <goals> <goal>compile</goal> </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>test-compile</id>
+                        <goals> <goal>test-compile</goal> </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
                 <groupId>org.jacoco</groupId>
                 <artifactId>jacoco-maven-plugin</artifactId>
-                <version>0.7.9</version>
+                <version>0.8.3</version>
                 <executions>
                     <execution>
                         <id>default-prepare-agent</id>
                 <version>2.2</version>
             </plugin>
 
-            <!-- Generate POJOs from MSO json schema -->
             <plugin>
-                <groupId>org.jsonschema2pojo</groupId>
-                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
-                <version>0.4.23</version>
-                <configuration>
-                    <sourceDirectory>${basedir}/src/main/resources/json/mso</sourceDirectory>
-                    <targetPackage>org.onap.vid.domain.mso</targetPackage>
-                    <outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
-                </configuration>
+                <groupId>com.github.eirslett</groupId>
+                <artifactId>frontend-maven-plugin</artifactId>
+                <version>${eirslett.version}</version>
                 <executions>
                     <execution>
+                        <id>install node and npm</id>
+                        <goals>
+                            <goal>install-node-and-npm</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                        <configuration>
+                            <npmVersion>${npm.version}</npmVersion>
+                            <nodeVersion>${node.version}</nodeVersion>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>npm config list</id>
+                        <configuration>
+                            <arguments>config ls -l</arguments>
+                        </configuration>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                    </execution>
+                    <execution>
+                        <id>npm install</id>
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                    </execution>
+                    <execution>
+                        <id>npm run-script build</id>
+                        <configuration>
+                            <arguments>run-script build</arguments>
+                        </configuration>
                         <goals>
-                            <goal>generate</goal>
+                            <goal>npm</goal>
                         </goals>
+                        <phase>generate-resources</phase>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
+                <version>3.5.1</version>
                 <configuration>
                     <source>1.8</source>
                     <target>1.8</target>
                 </configuration>
+
+                <executions>
+                    <!-- Replacing default-compile as it is treated specially by maven -->
+                    <execution>
+                        <id>default-compile</id>
+                        <phase>none</phase>
+                    </execution>
+                    <!-- Replacing default-testCompile as it is treated specially by maven -->
+                    <execution>
+                        <id>default-testCompile</id>
+                        <phase>none</phase>
+                    </execution>
+                    <execution>
+                        <id>java-compile</id>
+                        <phase>compile</phase>
+                        <goals> <goal>compile</goal> </goals>
+                    </execution>
+                    <execution>
+                        <id>java-test-compile</id>
+                        <phase>test-compile</phase>
+                        <goals> <goal>testCompile</goal> </goals>
+                    </execution>
+                </executions>
+
+            </plugin>
+
+            <plugin>
+                <groupId>com.google.code.maven-replacer-plugin</groupId>
+                <artifactId>replacer</artifactId>
+                <version>1.5.3</version>
+                <executions>
+                    <execution>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>replace</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <regex>false</regex>
+                    <file>${project.basedir}/src/main/webapp/app/vid/scripts/constants/version.json</file>
+                    <replacements>
+                        <replacement>
+                            <token>BUILD_NUMBER</token>
+                            <value>${release_version}.${patch_version}.${env.BUILD_NUMBER}</value>
+                        </replacement>
+                    </replacements>
+                </configuration>
             </plugin>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.19.1</version>
+                <version>${surefire.version}</version>
                 <configuration>
-                    <skipTests>${skiptests}</skipTests>
                     <includes>
                         <include>**/Test*.java</include>
                         <include>**/*Test.java</include>
                         <container.classpath>classpath:</container.classpath>
                     </systemPropertyVariables>
                     <useSystemClassLoader>false</useSystemClassLoader>
+                    <properties>
+                        <property>
+                            <!-- avoid running JUnit tests within surefire-testng provider -->
+                            <name>junit</name>
+                            <value>false</value>
+                        </property>
+                    </properties>
+                    <threadCount>1</threadCount>
                 </configuration>
+                <dependencies>
+                    <!-- Running TestNG and JUnit Tests -->
+                    <!-- https://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html -->
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-junit47</artifactId>
+                        <version>${surefire.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-testng</artifactId>
+                        <version>${surefire.version}</version>
+                    </dependency>
+                </dependencies>
             </plugin>
 
             <plugin>
                     <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
                     <dateFormatTimeZone>${user.timezone}</dateFormatTimeZone>
                     <generateGitPropertiesFile>true</generateGitPropertiesFile>
-                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
-                    </generateGitPropertiesFilename>
+                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
                     <includeOnlyProperties>
                         <includeOnlyProperty>^git.commit.id$</includeOnlyProperty>
                         <includeOnlyProperty>^git.commit.message.short$</includeOnlyProperty>
                     </includeOnlyProperties>
                 </configuration>
             </plugin>
+
+            <plugin>
+                <!--
+                Replace phase "none" with "process-sources" to enable.
+                Set organizationName as desired.
+                Then run `mvn license:check-file-header`, or even `mvn
+                license:update-file-header`.
+                -->
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>license-maven-plugin</artifactId>
+                <version>1.17</version>
+
+                <executions>
+                    <execution>
+                        <id>first</id>
+                        <goals>
+                            <goal>update-file-header</goal>
+                        </goals>
+                        <!-- replace phase "none" with "process-sources" to enable -->
+                        <phase>none</phase>
+                    </execution>
+                </executions>
+
+                <configuration>
+                    <canUpdateCopyright>false</canUpdateCopyright>
+                    <canUpdateDescription>false</canUpdateDescription>
+                    <licenseName>apache_v2</licenseName>
+                    <processStartTag>============LICENSE_START=======================================================</processStartTag>
+                    <processEndTag>============LICENSE_END=========================================================</processEndTag>
+                    <sectionDelimiter>================================================================================</sectionDelimiter>
+                    <projectName>VID</projectName>
+                    <inceptionYear>2017</inceptionYear>
+                    <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
+                    <canUpdateLicense>true</canUpdateLicense>
+                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
+                    <emptyLineAfterHeader>true</emptyLineAfterHeader>
+                    <verbose>false</verbose>
+
+                    <includes>
+                        <include>**/*.java</include>
+                        <include>**/*.kt</include>
+                        <include>**/*.jsp</include>
+                        <include>**/*.xml</include>
+                        <include>**/*.js</include>
+                        <include>**/*.ts</include>
+                        <include>**/*.html</include>
+                        <include>**/*.css</include>
+                        <include>**/*.sql</include>
+                    </includes>
+
+                    <extraExtensions>
+                        <sql>mysql</sql>
+                    </extraExtensions>
+
+                    <roots>
+                        <root>src/main</root>
+                        <root>src/test</root>
+                    </roots>
+
+                    <excludes>
+                        <exclude>**/app/vid/external/**/*</exclude>
+                        <exclude>**/main/webapp/WEB-INF/**/*</exclude>
+                        <exclude>**/test/resources/WEB-INF/**/*</exclude>
+                        <exclude>**/app/vid/scripts/angular-ui-tree.js</exclude>
+                    </excludes>
+
+                </configuration>
+            </plugin>
+
         </plugins>
     </build>
 
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.3.6</version>
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpmime</artifactId>
-            <version>4.3.6</version>
+            <version>4.5.7</version>
         </dependency>
         <dependency>
             <groupId>com.xebialabs.restito</groupId>
             <version>0.9.3</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.jeasy</groupId>
+            <artifactId>easy-random-core</artifactId>
+            <version>4.0.0.RC1</version>
+            <scope>test</scope>
+        </dependency>
 
         <!-- Helpers -->
         <dependency>
         </dependency>
         <dependency>
             <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-core</artifactId>
-            <version>1.2.3</version>
+            <artifactId>logback-classic</artifactId>
         </dependency>
+
         <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <version>1.2.3</version>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib-jdk8</artifactId>
+            <version>${kotlin.version}</version>
         </dependency>
 
         <!-- Mapper -->
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-annotations</artifactId>
-            <version>2.6.3</version>
+            <version>${jackson.version}</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-core</artifactId>
-            <version>2.8.6</version>
+            <version>${jackson.version}</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
-            <version>2.6.7.1</version>
+            <version>${jackson.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-mapper-asl</artifactId>
-            <version>1.9.13</version>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-kotlin</artifactId>
+            <version>${jackson.version}</version>
         </dependency>
+        <!-- c3p0 is to override epsdk-app-common's c3p0 0.9.5.2 vulnerability -->
         <dependency>
             <groupId>com.mchange</groupId>
             <artifactId>c3p0</artifactId>
-            <version>0.9.5.2</version>
+            <version>0.9.5.4</version>
         </dependency>
         <dependency>
             <groupId>io.searchbox</groupId>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.12</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>jcl-over-slf4j</artifactId>
             <version>1.7.12</version>
         </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context-support</artifactId>
-            <version>${springframework.version}</version>
-        </dependency>
+
+        <!-- springframework to override epsdk-app-common's and epsdk-core's versions -->
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
             <artifactId>spring-webmvc</artifactId>
             <version>${springframework.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+            <version>${springframework.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+            <version>${springframework.orm.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aop</artifactId>
+            <version>${springframework.version}</version>
+        </dependency>
+
         <dependency>
             <groupId>org.glassfish.jersey.core</groupId>
             <artifactId>jersey-client</artifactId>
-            <version>2.23.1</version>
+            <version>${jersey.version}</version>
         </dependency>
         <dependency>
             <groupId>org.glassfish.jersey.connectors</groupId>
             <artifactId>jersey-jetty-connector</artifactId>
-            <version>2.23.1</version>
+            <version>${jersey.version}</version>
+        </dependency>
+        <!--https://stackoverflow.com/questions/44088493/jersey-stopped-working-with-injectionmanagerfactory-not-found-->
+        <dependency>
+            <groupId>org.glassfish.jersey.inject</groupId>
+            <artifactId>jersey-hk2</artifactId>
+            <version>${jersey.version}</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.jaxrs</groupId>
             <artifactId>jackson-jaxrs-json-provider</artifactId>
-            <version>2.6.3</version>
+            <version>${jackson.version}</version>
         </dependency>
         <dependency>
             <groupId>commons-beanutils</groupId>
             <artifactId>commons-beanutils</artifactId>
-            <version>1.9.3</version>
         </dependency>
         <dependency>
             <groupId>com.googlecode.json-simple</groupId>
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
-            <version>6.8</version>
+            <version>6.14.3</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.skyscreamer</groupId>
             <artifactId>jsonassert</artifactId>
             <version>1.5.0</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.onap.sdc.sdc-tosca</groupId>
             <artifactId>sdc-tosca</artifactId>
-            <version>1.4.1</version>
+            <version>1.5.1</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <version>1.23.0</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.media</groupId>
+            <artifactId>jersey-media-json-jackson</artifactId>
+            <version>${jersey.version}</version>
+                <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.6</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-text</artifactId>
             <version>1.1</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-proxy</artifactId>
+            <version>1.0</version>
+        </dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
             <artifactId>java-hamcrest</artifactId>
             <artifactId>togglz-spring-core</artifactId>
             <version>2.5.0.Final</version>
         </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>1.4.196</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.2.11</version>
+        </dependency>
+
         <dependency>
             <groupId>org.assertj</groupId>
             <artifactId>assertj-core</artifactId>
             <version>3.10.0</version>
-            <scope>compile</scope>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
         </dependency>
     </dependencies>
 </project>