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
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..2c14542 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,26 +48,6 @@
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
-
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
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
+