OOZIE-3490 [Java 11] Remove com.sun:tools dependency from core module (kmarton via asalamon74)
diff --git a/core/pom.xml b/core/pom.xml
index 0d6bf7b..7541bf6 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -238,14 +238,6 @@
</dependency>
<dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>${targetJavaVersion}</version>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- <scope>system</scope>
- </dependency>
-
- <dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<scope>provided</scope>
diff --git a/core/src/test/java/org/apache/oozie/util/TestMetricsInstrumentation.java b/core/src/test/java/org/apache/oozie/util/TestMetricsInstrumentation.java
index dbb75ed..8d74725 100644
--- a/core/src/test/java/org/apache/oozie/util/TestMetricsInstrumentation.java
+++ b/core/src/test/java/org/apache/oozie/util/TestMetricsInstrumentation.java
@@ -28,9 +28,6 @@
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
-import com.sun.tools.attach.VirtualMachine;
-import com.sun.tools.attach.VirtualMachineDescriptor;
-import com.sun.tools.attach.spi.AttachProvider;
import org.apache.oozie.service.Services;
import org.apache.oozie.test.XTestCase;
@@ -219,48 +216,4 @@
} catch (UnsupportedOperationException uoe) {
}
}
-
- public void testJMXInstrumentation() throws Exception {
- final AttachProvider attachProvider = AttachProvider.providers().get(0);
-
- VirtualMachineDescriptor descriptor = null;
-
- //Setting the id of the VM unique, so we can find it.
- String uniqueId = UUID.randomUUID().toString();
- System.setProperty("processSettings.unique.id", uniqueId);
-
- //Finding our own VM by the id.
- for(VirtualMachineDescriptor d : VirtualMachine.list()) {
- String remoteUniqueId = VirtualMachine.attach(d).getSystemProperties().getProperty("processSettings.unique.id");
- if(remoteUniqueId != null && remoteUniqueId.equals(uniqueId))
- {
- descriptor = d;
- break;
- }
- }
-
- assertNotNull("Could not find own virtual machine", descriptor);
-
- //Attaching JMX agent to our own VM
- final VirtualMachine virtualMachine = attachProvider.attachVirtualMachine(descriptor);
- String agent = virtualMachine.getSystemProperties().getProperty("java.home") +
- File.separator + "lib" + File.separator + "management-agent.jar";
- virtualMachine.loadAgent(agent);
- final Object portObject = virtualMachine.getAgentProperties().
- get("com.sun.management.jmxremote.localConnectorAddress");
-
- final JMXServiceURL target = new JMXServiceURL(portObject + "");
-
- JMXConnector jmxc = JMXConnectorFactory.connect(target);
- MBeanServerConnection conn = jmxc.getMBeanServerConnection();
-
- //Query a value through JMX from our own VM
- Object value = null;
- try {
- value = conn.getAttribute(new ObjectName("metrics:name=jvm.memory.heap.committed"),"Value");
- } catch (Exception e) {
- fail("Could not fetch metric");
- }
- assertNotNull("JMX service error", value);
- }
}
diff --git a/release-log.txt b/release-log.txt
index 9540f82..b6cda0c 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
-- Oozie 5.2.0 release (trunk - unreleased)
+OOZIE-3490 [Java 11] Remove com.sun:tools dependency from core module (kmarton via asalamon74)
OOZIE-3393 amend Add Oozie instrumentation delayed metric in CoordMaterializeTriggerService (zuston via asalamon74)
OOZIE-3500 Flaky tests based on WorkflowTestCase (asalamon74 via kmarton)
OOZIE-3498 TestOozieCLI testRetryWithRetryCount and testRetryForTimeout is flaky (asalamon74 via kmarton)