Skip to content

Commit 2dbb9e6

Browse files
committed
Support phasing off SecurityManager usage in favor of Java Agent
Signed-off-by: Gulshan <[email protected]>
1 parent 766784d commit 2dbb9e6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ def pluginClassName = 'QueryInsightsPlugin'
5757

5858
configurations {
5959
zipArchive
60+
agent
61+
}
62+
63+
dependencies {
64+
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}"
65+
agent "org.opensearch:opensearch-agent:${opensearch_version}"
66+
agent "net.bytebuddy:byte-buddy:${versions.bytebuddy}"
6067
}
6168

6269
java {
@@ -364,3 +371,13 @@ task updateVersion {
364371
}
365372
}
366373

374+
task prepareAgent(type: Copy) {
375+
from(configurations.agent)
376+
into "$buildDir/agent"
377+
}
378+
379+
tasks.withType(Test) {
380+
dependsOn prepareAgent
381+
jvmArgs += ["-javaagent:" + project.layout.buildDirectory.file("agent/opensearch-agent-${opensearch_version}.jar").get()]
382+
}
383+

0 commit comments

Comments
 (0)