Skip to content

Commit ae7c2b2

Browse files
authored
Using java-agent gradle plugin to phase off Security Manager in favor of Java-agent. (#1917)
* Revert "Fix build due to phasing off SecurityManager usage in favor of Java Agent" This reverts commit 2805580. Signed-off-by: Pranav Reddy <pranavrd@amazon.com> * Using java-agent gradle plugin to phase off Security Manager in favor of Java-agent. Signed-off-by: Pranav Reddy <pranavrd@amazon.com> --------- Signed-off-by: Pranav Reddy <pranavrd@amazon.com>
1 parent 50d38eb commit ae7c2b2

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

build.gradle

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ apply plugin: 'opensearch.testclusters'
5656
apply plugin: 'io.gitlab.arturbosch.detekt'
5757
apply plugin: 'org.jetbrains.kotlin.jvm'
5858
apply plugin: 'org.jetbrains.kotlin.plugin.allopen'
59+
apply plugin: 'opensearch.java-agent'
5960

6061
def usingRemoteCluster = System.properties.containsKey('tests.rest.cluster') || System.properties.containsKey('tests.cluster')
6162
def usingMultiNode = project.properties.containsKey('numNodes')
@@ -179,26 +180,6 @@ allprojects {
179180
plugins.withId('java') {
180181
sourceCompatibility = targetCompatibility = "21"
181182
}
182-
183-
configurations {
184-
agent
185-
}
186-
187-
task prepareAgent(type: Copy) {
188-
from(configurations.agent)
189-
into "$buildDir/agent"
190-
}
191-
192-
dependencies {
193-
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}"
194-
agent "org.opensearch:opensearch-agent:${opensearch_version}"
195-
agent "net.bytebuddy:byte-buddy:${versions.bytebuddy}"
196-
}
197-
198-
tasks.withType(Test) {
199-
dependsOn prepareAgent
200-
jvmArgs += ["-javaagent:" + project.layout.buildDirectory.file("agent/opensearch-agent-${opensearch_version}.jar").get()]
201-
}
202183
}
203184

204185
dependencies {

0 commit comments

Comments
 (0)