Skip to content

Commit

Permalink
chore(libcryostat): clean up to use libcryostat dependency (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores authored Jul 19, 2024
1 parent 0654934 commit 2b5cb20
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 15 deletions.
27 changes: 22 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@
<url>https://github.com/cryostatio/cryostat-agent/tree/main</url>
</scm>

<repositories>
<repository>
<id>s01.oss.sonatype.org-snapshot</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>

<properties>
<mainClass>io.cryostat.agent.Agent</mainClass>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -77,7 +91,7 @@
<com.google.dagger.version>2.51.1</com.google.dagger.version>
<com.google.dagger.compiler.version>${com.google.dagger.version}</com.google.dagger.compiler.version>

<io.cryostat.core.version>2.30.3</io.cryostat.core.version>
<io.cryostat.libcryostat.version>4.0.0-SNAPSHOT</io.cryostat.libcryostat.version>

<org.apache.commons.io.version>2.13.0</org.apache.commons.io.version>
<org.apache.httpcomponents.httpclient.version>4.5.14</org.apache.httpcomponents.httpclient.version>
Expand Down Expand Up @@ -168,9 +182,8 @@
</dependency>
<dependency>
<groupId>io.cryostat</groupId>
<!-- This is only used for computing our own JVM's JVM ID - that part could be extracted out of -core -->
<artifactId>cryostat-core</artifactId>
<version>${io.cryostat.core.version}</version>
<artifactId>libcryostat</artifactId>
<version>${io.cryostat.libcryostat.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -313,6 +326,10 @@
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>shaded</shadedClassifierName>
<relocations>
<relocation>
<pattern>io.cryostat.libcryostat</pattern>
<shadedPattern>${shade.prefix}.io.cryostat.libcryostat</shadedPattern>
</relocation>
<relocation>
<pattern>io.cryostat.core</pattern>
<shadedPattern>${shade.prefix}.io.cryostat.core</shadedPattern>
Expand Down Expand Up @@ -446,7 +463,7 @@
<trimTrailingWhitespace/>
<endWithNewline/>
<importOrder>
<order>java,javax,org.openjdk.jmc,io.cryostat,</order>
<order>java,javax,io.cryostat,</order>
</importOrder>
<removeUnusedImports/>
</java>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/cryostat/agent/MainModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
import io.cryostat.agent.remote.RemoteContext;
import io.cryostat.agent.remote.RemoteModule;
import io.cryostat.agent.triggers.TriggerModule;
import io.cryostat.core.JvmIdentifier;
import io.cryostat.core.net.IDException;
import io.cryostat.libcryostat.JvmIdentifier;
import io.cryostat.libcryostat.net.IDException;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/io/cryostat/agent/model/MBeanInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
import java.util.Map;
import java.util.concurrent.Callable;

import io.cryostat.core.net.MBeanMetrics;
import io.cryostat.core.net.MemoryMetrics;
import io.cryostat.core.net.OperatingSystemMetrics;
import io.cryostat.core.net.RuntimeMetrics;
import io.cryostat.core.net.ThreadMetrics;
import io.cryostat.libcryostat.net.MBeanMetrics;
import io.cryostat.libcryostat.net.MemoryMetrics;
import io.cryostat.libcryostat.net.OperatingSystemMetrics;
import io.cryostat.libcryostat.net.RuntimeMetrics;
import io.cryostat.libcryostat.net.ThreadMetrics;

import com.sun.management.UnixOperatingSystemMXBean;
import org.apache.commons.codec.digest.DigestUtils;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/cryostat/agent/remote/MBeanContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import javax.inject.Inject;

import io.cryostat.agent.model.MBeanInfo;
import io.cryostat.core.net.MBeanMetrics;
import io.cryostat.libcryostat.net.MBeanMetrics;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.net.httpserver.HttpExchange;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/cryostat/agent/remote/RecordingsContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
import io.cryostat.agent.FlightRecorderHelper;
import io.cryostat.agent.harvest.Harvester;
import io.cryostat.agent.util.StringUtils;
import io.cryostat.core.serialization.SerializableRecordingDescriptor;
import io.cryostat.core.templates.MutableTemplateService.InvalidEventTemplateException;
import io.cryostat.libcryostat.serialization.SerializableRecordingDescriptor;
import io.cryostat.libcryostat.templates.InvalidEventTemplateException;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down

0 comments on commit 2b5cb20

Please sign in to comment.