From 323e65114ab323ec7888a4a9735f97f0345438a3 Mon Sep 17 00:00:00 2001 From: Gerson Sunye Date: Mon, 13 Jun 2022 16:39:45 +0200 Subject: [PATCH] Reduce the size of neoemf-data-hbase generated artifact To correctly test the neoemf-data-hbase module inside the neoemf-tests module, we had to use test-scope dependencies as compile-scope ones. As a result, the generated jar was too big, i.e. > 130MB. Now we generated a test-jar that includes all test dependencies and import it to the neoemf-tests module. --- neoemf-data/hbase/pom.xml | 56 +++++++++++++++---- .../assembly/test-jar-with-dependencies.xml | 23 ++++++++ neoemf-tests/pom.xml | 10 ++++ pom.xml | 5 ++ 4 files changed, 84 insertions(+), 10 deletions(-) create mode 100644 neoemf-data/hbase/src/main/assembly/test-jar-with-dependencies.xml diff --git a/neoemf-data/hbase/pom.xml b/neoemf-data/hbase/pom.xml index 3bec45caa..6d9b2166f 100644 --- a/neoemf-data/hbase/pom.xml +++ b/neoemf-data/hbase/pom.xml @@ -18,13 +18,6 @@ 2.4.12 - - 3.3.3 @@ -32,6 +25,11 @@ org.apache.hbase hbase-testing-util + + org.apache.hbase + hbase-testing-util + test-jar + org.apache.hbase hbase-client @@ -47,15 +45,26 @@ org.apache.hbase hbase-testing-util - compile + test ${hbase.version} org.slf4j slf4j-log4j12 + + org.slf4j + slf4j-reload4j + + + org.apache.hbase + hbase-testing-util + test + test-jar + ${hbase.version} + org.apache.hbase hbase-client @@ -64,7 +73,7 @@ org.junit.vintage junit-vintage-engine - 5.8.2 + ${junit.version} test @@ -89,7 +98,34 @@ - + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + src/main/assembly/test-jar-with-dependencies.xml + + + + + package + + single + + + + diff --git a/neoemf-data/hbase/src/main/assembly/test-jar-with-dependencies.xml b/neoemf-data/hbase/src/main/assembly/test-jar-with-dependencies.xml new file mode 100644 index 000000000..5723487f1 --- /dev/null +++ b/neoemf-data/hbase/src/main/assembly/test-jar-with-dependencies.xml @@ -0,0 +1,23 @@ + + test-jar-with-dependencies + + jar + + false + + + / + true + true + false + test + + *:test-jar:* + *:jar:* + ${project.groupId}:${project.artifactId}:test-jar + + + + diff --git a/neoemf-tests/pom.xml b/neoemf-tests/pom.xml index 90d1d4637..520bde55c 100644 --- a/neoemf-tests/pom.xml +++ b/neoemf-tests/pom.xml @@ -229,6 +229,16 @@ test + + + + org.apache.hbase + hbase-testing-util + test-jar + ${hbase.version} + test + + diff --git a/pom.xml b/pom.xml index 8eccc79f8..28b35781a 100644 --- a/pom.xml +++ b/pom.xml @@ -490,6 +490,11 @@ maven-gpg-plugin 1.6 + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 +