From 91ae4ec8ee5c65c3f3a7c8f3b4e92389b1c5e109 Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Mon, 1 Jul 2019 17:33:08 +0200 Subject: [PATCH 1/4] make scylla-apiclient a separate module so the jar can be reused --- dependency-reduced-pom.xml | 52 +++++++++++++ pom.xml | 73 ++++++++----------- scylla-apiclient/dependency-reduced-pom.xml | 24 ++++++ scylla-apiclient/pom.xml | 69 ++++++++++++++++++ .../java/com/scylladb/jmx/api/APIClient.java | 0 .../java/com/scylladb/jmx/api/APIConfig.java | 0 .../java/com/scylladb/jmx/api/CacheEntry.java | 0 .../com/scylladb/jmx/utils/FileUtils.java | 0 .../java/com/scylladb/jmx/utils/Pair.java | 0 .../jmx/utils/SnapshotDetailsTabularData.java | 0 scylla-jmx-parent/pom.xml | 18 +++++ 11 files changed, 192 insertions(+), 44 deletions(-) create mode 100644 dependency-reduced-pom.xml create mode 100644 scylla-apiclient/dependency-reduced-pom.xml create mode 100644 scylla-apiclient/pom.xml rename {src => scylla-apiclient/src}/main/java/com/scylladb/jmx/api/APIClient.java (100%) rename {src => scylla-apiclient/src}/main/java/com/scylladb/jmx/api/APIConfig.java (100%) rename {src => scylla-apiclient/src}/main/java/com/scylladb/jmx/api/CacheEntry.java (100%) rename {src => scylla-apiclient/src}/main/java/com/scylladb/jmx/utils/FileUtils.java (100%) rename {src => scylla-apiclient/src}/main/java/com/scylladb/jmx/utils/Pair.java (100%) rename {src => scylla-apiclient/src}/main/java/com/scylladb/jmx/utils/SnapshotDetailsTabularData.java (100%) create mode 100644 scylla-jmx-parent/pom.xml diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml new file mode 100644 index 0000000..b4a1e2f --- /dev/null +++ b/dependency-reduced-pom.xml @@ -0,0 +1,52 @@ + + + + scylla-jmx-parent + com.scylladb.jmx + 1.0 + scylla-jmx-parent/pom.xml + + 4.0.0 + com.scylladb.jmx + scylla-jmx + Scylla JMX + 1.0 + + + + maven-shade-plugin + 2.4.1 + + + package + + shade + + + + + + com.scylladb.jmx.main.Main + + + + + + + + + + + + junit + junit + 4.8.2 + test + + + + 1.8 + 1.8 + + + diff --git a/pom.xml b/pom.xml index a970a93..a8bca5c 100644 --- a/pom.xml +++ b/pom.xml @@ -7,38 +7,25 @@ 1.0 jar + + com.scylladb.jmx + scylla-jmx-parent + 1.0 + ./scylla-jmx-parent/pom.xml + + Scylla JMX 1.8 1.8 - + - org.yaml - snakeyaml - 1.16 - - - org.glassfish.jersey.core - jersey-common - 2.22.1 - - - javax.ws.rs - javax.ws.rs-api - 2.0.1 - - - javax.ws.rs - jsr311-api - 1.1.1 - - - org.glassfish.jersey.core - jersey-client - 2.22.1 + com.scylladb.jmx + scylla-apiclient + 1.0 org.slf4j @@ -61,29 +48,25 @@ 4.8.2 test - - org.glassfish - javax.json - 1.0.4 - - - com.google.guava - guava - 18.0 - - - com.google.collections - google-collections - 1.0 - - - javax.activation - activation - 1.1 - + + + + + + + + + + + + + + + + org.apache.maven.plugins maven-shade-plugin @@ -95,6 +78,8 @@ shade + + diff --git a/scylla-apiclient/dependency-reduced-pom.xml b/scylla-apiclient/dependency-reduced-pom.xml new file mode 100644 index 0000000..e3eab86 --- /dev/null +++ b/scylla-apiclient/dependency-reduced-pom.xml @@ -0,0 +1,24 @@ + + + + scylla-jmx + com.scylladb.jmx + 1.0 + + 4.0.0 + scylla-apiclient + Scylla REST API client + + + junit + junit + 4.8.2 + test + + + + 1.8 + 1.8 + + + diff --git a/scylla-apiclient/pom.xml b/scylla-apiclient/pom.xml new file mode 100644 index 0000000..184d215 --- /dev/null +++ b/scylla-apiclient/pom.xml @@ -0,0 +1,69 @@ + +4.0.0 + + com.scylladb.jmx + scylla-apiclient + jar + 1.0 + + Scylla REST API client + + + 1.8 + 1.8 + + + + + org.yaml + snakeyaml + 1.16 + + + org.glassfish.jersey.core + jersey-common + 2.22.1 + + + javax.ws.rs + javax.ws.rs-api + 2.0.1 + + + javax.ws.rs + jsr311-api + 1.1.1 + + + org.glassfish.jersey.core + jersey-client + 2.22.1 + + + org.glassfish + javax.json + 1.0.4 + + + com.google.guava + guava + 18.0 + + + com.google.collections + google-collections + 1.0 + + + javax.activation + activation + 1.1 + + + + + + + + diff --git a/src/main/java/com/scylladb/jmx/api/APIClient.java b/scylla-apiclient/src/main/java/com/scylladb/jmx/api/APIClient.java similarity index 100% rename from src/main/java/com/scylladb/jmx/api/APIClient.java rename to scylla-apiclient/src/main/java/com/scylladb/jmx/api/APIClient.java diff --git a/src/main/java/com/scylladb/jmx/api/APIConfig.java b/scylla-apiclient/src/main/java/com/scylladb/jmx/api/APIConfig.java similarity index 100% rename from src/main/java/com/scylladb/jmx/api/APIConfig.java rename to scylla-apiclient/src/main/java/com/scylladb/jmx/api/APIConfig.java diff --git a/src/main/java/com/scylladb/jmx/api/CacheEntry.java b/scylla-apiclient/src/main/java/com/scylladb/jmx/api/CacheEntry.java similarity index 100% rename from src/main/java/com/scylladb/jmx/api/CacheEntry.java rename to scylla-apiclient/src/main/java/com/scylladb/jmx/api/CacheEntry.java diff --git a/src/main/java/com/scylladb/jmx/utils/FileUtils.java b/scylla-apiclient/src/main/java/com/scylladb/jmx/utils/FileUtils.java similarity index 100% rename from src/main/java/com/scylladb/jmx/utils/FileUtils.java rename to scylla-apiclient/src/main/java/com/scylladb/jmx/utils/FileUtils.java diff --git a/src/main/java/com/scylladb/jmx/utils/Pair.java b/scylla-apiclient/src/main/java/com/scylladb/jmx/utils/Pair.java similarity index 100% rename from src/main/java/com/scylladb/jmx/utils/Pair.java rename to scylla-apiclient/src/main/java/com/scylladb/jmx/utils/Pair.java diff --git a/src/main/java/com/scylladb/jmx/utils/SnapshotDetailsTabularData.java b/scylla-apiclient/src/main/java/com/scylladb/jmx/utils/SnapshotDetailsTabularData.java similarity index 100% rename from src/main/java/com/scylladb/jmx/utils/SnapshotDetailsTabularData.java rename to scylla-apiclient/src/main/java/com/scylladb/jmx/utils/SnapshotDetailsTabularData.java diff --git a/scylla-jmx-parent/pom.xml b/scylla-jmx-parent/pom.xml new file mode 100644 index 0000000..1d834ef --- /dev/null +++ b/scylla-jmx-parent/pom.xml @@ -0,0 +1,18 @@ + + 4.0.0 + + com.scylladb.jmx + scylla-jmx-parent + 1.0 + pom + + + ../ + ../scylla-apiclient + + + + + Scylla JMX Parent + From 222990d821897d5c6ddd62b2c1524ce5c4c9e43a Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Mon, 8 Jul 2019 10:04:24 +0200 Subject: [PATCH 2/4] cleanup commented implicit steps in mvn --- pom.xml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pom.xml b/pom.xml index a8bca5c..2c14542 100644 --- a/pom.xml +++ b/pom.xml @@ -51,22 +51,6 @@ - - - - - - - - - - - - - - - - org.apache.maven.plugins maven-shade-plugin @@ -78,8 +62,6 @@ shade - - From 4296c7d3aee598941da009cc15bd701f414a3020 Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Mon, 8 Jul 2019 10:54:04 +0200 Subject: [PATCH 3/4] trigger build from parent maven to have the local repo properly set up --- reloc/build_reloc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reloc/build_reloc.sh b/reloc/build_reloc.sh index f021dd2..8417e01 100755 --- a/reloc/build_reloc.sh +++ b/reloc/build_reloc.sh @@ -52,6 +52,6 @@ if [ -z "$NODEPS" ]; then sudo ./install-dependencies.sh fi -mvn -B install +mvn -B --file scylla-jmx-parent/pom.xml install ./SCYLLA-VERSION-GEN scripts/create-relocatable-package.py build/scylla-jmx-package.tar.gz From 183eb6158aad3e3c918799a8af217e25107038ec Mon Sep 17 00:00:00 2001 From: Lubos Kosco Date: Mon, 8 Jul 2019 11:02:45 +0200 Subject: [PATCH 4/4] fix README for building instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2c45f3..9f504b8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Scylla JMX server implements the Apache Cassandra JMX interface for compatibilit To compile JMX server, run: ```console -$ mvn package +$ mvn --file scylla-jmx-parent/pom.xml package ``` ## Running