diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/ForceMergeActionTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/ForceMergeActionTests.java
index a01fba49d37..3dcc0179e58 100644
--- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/ForceMergeActionTests.java
+++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/ForceMergeActionTests.java
@@ -25,6 +25,7 @@ import org.elasticsearch.cluster.service.ClusterService;
 import org.elasticsearch.common.bytes.BytesReference;
 import org.elasticsearch.common.collect.ImmutableOpenMap;
 import org.elasticsearch.common.io.stream.Writeable.Reader;
+import org.elasticsearch.common.xcontent.DeprecationHandler;
 import org.elasticsearch.common.xcontent.XContentHelper;
 import org.elasticsearch.common.xcontent.XContentParser;
 import org.elasticsearch.common.xcontent.XContentType;
@@ -71,7 +72,8 @@ public class ForceMergeActionTests extends AbstractSerializingTestCase<ForceMerg
 
     public void testMissingMaxNumSegments() throws IOException {
         BytesReference emptyObject = JsonXContent.contentBuilder().startObject().endObject().bytes();
-        XContentParser parser = XContentHelper.createParser(null, emptyObject, XContentType.JSON);
+        XContentParser parser = XContentHelper.createParser(null, DeprecationHandler.THROW_UNSUPPORTED_OPERATION,
+            emptyObject, XContentType.JSON);
         Exception e = expectThrows(IllegalArgumentException.class, () -> ForceMergeAction.parse(parser));
         assertThat(e.getMessage(), equalTo("Required [max_num_segments]"));
     }
diff --git a/x-pack/plugin/index-lifecycle/build.gradle b/x-pack/plugin/index-lifecycle/build.gradle
index 79e9791fae3..be566dce56e 100644
--- a/x-pack/plugin/index-lifecycle/build.gradle
+++ b/x-pack/plugin/index-lifecycle/build.gradle
@@ -17,10 +17,8 @@ licenseHeaders.enabled = false
 integTest.enabled = false
 
 dependencies {
-    provided "org.elasticsearch:elasticsearch:${version}"
-
-    provided "org.elasticsearch.plugin:x-pack-core:${version}"
-    testCompile project(path: ':x-pack-elasticsearch:plugin:core', configuration: 'testArtifacts')
+    compileOnly "org.elasticsearch.plugin:x-pack-core:${version}"
+    testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
 }
 
 dependencyLicenses {