# HG changeset patch # User Simon Tooke # Date 1508244598 14400 # Node ID 262f254b0ac0b6bc7fe457f76550cc7693166d73 # Parent 4ef47fad072ab0636e85167e7c17fc2327ac6cc0 Sshared jar files reduce footprint from 120mb to 14 mb This patch shares most of the jar files instead of maintaining separate copies in each war file. The saving is 80MB on disk, and 10-30 MB in memory. before dist/target/image 120 mb image/services 82 mb image/libs 14 mb 140-160 mb serving jvms/0.0.1/tree after dist/target/image 16 mb image/services 1.71 mb image/libs 14 mb 110-140 mb serving jvms/0.0.1/tree diff -r 4ef47fad072a -r 262f254b0ac0 common/core/pom.xml --- a/common/core/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/common/core/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -65,6 +65,7 @@ javax.ws.rs javax.ws.rs-api ${javax-rs-api.version} + provided @@ -72,6 +73,7 @@ org.keycloak keycloak-core ${keycloak.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 common/mongodb/pom.xml --- a/common/mongodb/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/common/mongodb/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -57,12 +57,14 @@ com.redhat.thermostat thermostat-web-gateway-common-core ${project.version} + provided org.mongodb mongo-java-driver ${mongo-java-driver.version} + provided @@ -71,7 +73,13 @@ ${javax.servlet.version} provided - + + + javax.ws.rs + javax.ws.rs-api + ${javax-rs-api.version} + provided + junit @@ -88,7 +96,8 @@ com.google.code.gson gson - 2.2.4 + ${google-gson.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 distribution/pom.xml --- a/distribution/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/distribution/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -312,11 +312,26 @@ + + + com.redhat.thermostat + thermostat-web-gateway-common-mongodb + ${project.version} + com.redhat.thermostat thermostat-web-gateway-server ${project.version} + + + + org.mongodb + mongo-java-driver + ${mongo-java-driver.version} + + + com.redhat.thermostat thermostat-web-gateway-service-jvm-byteman diff -r 4ef47fad072a -r 262f254b0ac0 services/commands/pom.xml --- a/services/commands/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/commands/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -124,11 +124,28 @@ provided + + + javax.ws.rs + javax.ws.rs-api + ${javax-rs-api.version} + provided + + com.google.code.gson gson ${google-gson.version} + provided + + + + + org.keycloak + keycloak-core + ${keycloak.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/jcmd/pom.xml --- a/services/jcmd/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jcmd/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -75,12 +75,15 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided com.redhat.thermostat thermostat-web-gateway-common-core ${project.version} + provided + javax.servlet diff -r 4ef47fad072a -r 262f254b0ac0 services/jvm-byteman/pom.xml --- a/services/jvm-byteman/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jvm-byteman/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -73,8 +73,15 @@ com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided + + + com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/jvm-compiler/pom.xml --- a/services/jvm-compiler/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jvm-compiler/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -59,6 +59,20 @@ + + + com.redhat.thermostat + thermostat-web-gateway-common-mongodb + ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided + + javax.servlet javax.servlet-api @@ -71,11 +85,6 @@ ${javax-rs-api.version} provided - - com.redhat.thermostat - thermostat-web-gateway-common-mongodb - 1.99.12-SNAPSHOT - diff -r 4ef47fad072a -r 262f254b0ac0 services/jvm-cpu/pom.xml --- a/services/jvm-cpu/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jvm-cpu/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -78,11 +78,13 @@ com.redhat.thermostat thermostat-web-gateway-common-core ${project.version} + provided com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/jvm-gc/pom.xml --- a/services/jvm-gc/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jvm-gc/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -76,11 +76,13 @@ com.redhat.thermostat thermostat-web-gateway-common-core ${project.version} + provided com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided @@ -98,5 +100,13 @@ ${javax-rs-api.version} provided + + + + org.mongodb + mongo-java-driver + ${mongo-java-driver.version} + provided + diff -r 4ef47fad072a -r 262f254b0ac0 services/jvm-io/pom.xml --- a/services/jvm-io/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jvm-io/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -75,6 +75,13 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/jvm-memory/pom.xml --- a/services/jvm-memory/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jvm-memory/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -75,6 +75,13 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/jvms/pom.xml --- a/services/jvms/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/jvms/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -76,6 +76,21 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided + + + + + org.mongodb + mongo-java-driver + ${mongo-java-driver.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/system-cpu/pom.xml --- a/services/system-cpu/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/system-cpu/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -76,6 +76,13 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/system-memory/pom.xml --- a/services/system-memory/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/system-memory/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -76,6 +76,13 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/system-network/pom.xml --- a/services/system-network/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/system-network/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -76,6 +76,13 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 services/systems/pom.xml --- a/services/systems/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/services/systems/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -76,6 +76,13 @@ com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + provided + + + com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + provided diff -r 4ef47fad072a -r 262f254b0ac0 tests/integration-tests/pom.xml --- a/tests/integration-tests/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/tests/integration-tests/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -136,6 +136,13 @@ ${jetty.version} test + + + com.google.code.gson + gson + ${google-gson.version} + provided + diff -r 4ef47fad072a -r 262f254b0ac0 tests/pom.xml --- a/tests/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/tests/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -54,5 +54,6 @@ keycloak-integration-tests test-utils + diff -r 4ef47fad072a -r 262f254b0ac0 tests/test-utils/pom.xml --- a/tests/test-utils/pom.xml Tue Oct 17 08:38:18 2017 -0400 +++ b/tests/test-utils/pom.xml Tue Oct 17 08:49:58 2017 -0400 @@ -54,21 +54,36 @@ com.redhat.thermostat + thermostat-web-gateway-common-core + ${project.version} + + + com.redhat.thermostat thermostat-web-gateway-common-mongodb ${project.version} + org.mongodb mongo-java-driver ${mongo-java-driver.version} + + + com.google.code.gson + gson + ${google-gson.version} + provided + + org.eclipse.jetty jetty-client ${jetty.version} + junit