From 5ff5f428f77259ae0df0efa290f56334cc484b81 Mon Sep 17 00:00:00 2001 From: Oliver Bertuch Date: Wed, 7 Nov 2018 14:00:13 +0100 Subject: [PATCH] Solves #5274. Using only the S3 part of AWS SDK pom.xml gets lighter. When AWS S3 storage support was introduced back in 2017 in #3921, the team experienced problems with the bundled Jackson library of Glassfish (2.3 instead of 2.6 minimum). By switching to the complete bundle, the bundled Jackson library was used and problems where avoided. This lead to a bigger WAR than necessary (~20 MB) and made a workaround necessary to remove some AWS specific `javamail.providers` to avoid email problems via WAR file manipulation. This commit: * removes the WAR file hacking * makes use of the S3 SDK part only, reducing the WAR size * enables proper for the sake of avoiding dependency convergence problems. People unaware of direct and transitive dependencies and how to manage them are kindly requested to have a look at the Maven docs and tutorials: * https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html * https://www.davidjhay.com/maven-dependency-management * https://maven.apache.org/enforcer/maven-enforcer-plugin/index.html --- pom.xml | 98 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/pom.xml b/pom.xml index abba23d3308..061eafb63bc 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,6 @@ -Xdoclint:none - 1.11.172 UTC en US @@ -25,6 +24,12 @@ --> -Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region} + 1.11.172 + 2.9.6 + 2.10.1 + 1.2 + 4.5.5 + 4.12 5.3.1 5.3.1 @@ -69,10 +74,48 @@ - - + + + + + + com.amazonaws + aws-java-sdk-bom + ${aws.version} + pom + import + + + com.fasterxml.jackson + jackson-bom + ${jackson.version} + import + pom + + + joda-time + joda-time + ${joda.version} + + + commons-logging + commons-logging + ${commons.logging.version} + + + org.apache.httpcomponents + httpclient + ${httpcomponents.client.version} + + + + + + org.passay @@ -110,7 +153,6 @@ org.apache.httpcomponents httpclient - 4.5.5 org.apache.httpcomponents @@ -147,8 +189,8 @@ com.amazonaws - aws-java-sdk-bundle - ${aws.version} + aws-java-sdk-s3 + @@ -644,46 +686,6 @@ coveralls-maven-plugin 4.0.0 - - - org.codehaus.mojo - truezip-maven-plugin - 1.1 - - - remove-javamail-providers-from-exploded - - remove - - package - - - target/dataverse-${project.version}/WEB-INF/lib/aws-java-sdk-bundle-${aws.version}.jar/META-INF - - javamail.providers - - - - - - remove-javamail-providers-from-war - - remove - - package - - - target/dataverse-${project.version}.war/WEB-INF/lib/aws-java-sdk-bundle-${aws.version}.jar/META-INF - - javamail.providers - - - - - - maven-surefire-plugin