Skip to content

Commit

Permalink
Refactor shaded library project
Browse files Browse the repository at this point in the history
  • Loading branch information
emerkle826 committed Nov 16, 2023
1 parent 810ee5e commit ba983af
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jar-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: zip-up
run: |
zip jars.zip \
management-api-shaded-dataformat-yaml/target/datastax-mgmtapi-shaded-dataformat-yaml*.jar \
management-api-agent-shaded-libs/target/datastax-mgmtapi-agent-shaded-libs*.jar \
management-api-agent-common/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-3.x/target/datastax-mgmtapi-agent-*.jar \
management-api-agent-4.x/target/datastax-mgmtapi-agent-*.jar \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-4_0
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WORKDIR /build
ENV MAAC_PATH /opt/management-api

COPY pom.xml ./
COPY management-api-shaded-dataformat-yaml/pom.xml ./management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml ./management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml ./management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml ./management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml ./management-api-agent-4.x/pom.xml
Expand All @@ -22,7 +22,7 @@ COPY management-api-server/pom.xml ./management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target

COPY management-api-shaded-dataformat-yaml ./management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs ./management-api-agent-shaded-libs
COPY management-api-agent-common ./management-api-agent-common
COPY management-api-agent-3.x ./management-api-agent-3.x
COPY management-api-agent-4.x ./management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-4_0.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ENV MAAC_PATH /opt/management-api
ENV DSE_HOME /opt/dse

COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -72,7 +72,7 @@ COPY management-api-server/pom.xml /tmp/management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-4_1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WORKDIR /build
ENV MAAC_PATH /opt/management-api

COPY pom.xml ./
COPY management-api-shaded-dataformat-yaml/pom.xml ./management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml ./management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml ./management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml ./management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml ./management-api-agent-4.x/pom.xml
Expand All @@ -23,7 +23,7 @@ COPY management-api-server/pom.xml ./management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target

COPY management-api-shaded-dataformat-yaml ./management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs ./management-api-agent-shaded-libs
COPY management-api-agent-common ./management-api-agent-common
COPY management-api-agent-3.x ./management-api-agent-3.x
COPY management-api-agent-4.x ./management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-4_1.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ENV MAAC_PATH /opt/management-api
ENV DSE_HOME /opt/dse

COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -73,7 +73,7 @@ COPY management-api-server/pom.xml /tmp/management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-5_0.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ENV DSE_HOME /opt/dse

# copy over cassandra maven artifacts
COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -63,7 +63,7 @@ COPY management-api-server/pom.xml /tmp/management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-oss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WORKDIR /build
ENV MAAC_PATH /opt/management-api

COPY pom.xml ./
COPY management-api-shaded-dataformat-yaml/pom.xml ./management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml ./management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml ./management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml ./management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml ./management-api-agent-4.x/pom.xml
Expand All @@ -22,7 +22,7 @@ COPY management-api-server/pom.xml ./management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target

COPY management-api-shaded-dataformat-yaml ./management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs ./management-api-agent-shaded-libs
COPY management-api-agent-common ./management-api-agent-common
COPY management-api-agent-3.x ./management-api-agent-3.x
COPY management-api-agent-4.x ./management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-oss.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ENV MAAC_PATH /opt/management-api
ENV DSE_HOME /opt/dse

COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -72,7 +72,7 @@ COPY management-api-server/pom.xml /tmp/management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions cassandra-trunk/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ENV DSE_HOME /opt/dse
# copy over cassandra maven artifacts
COPY --from=cass-builder /root/.m2 /root/.m2
COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -91,7 +91,7 @@ COPY management-api-server/pom.xml /tmp/management-api-server/pom.xml
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi -P trunk && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions dse-68/Dockerfile.jdk11
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ENV MAAC_PATH /opt/management-api
ENV DSE_HOME /opt/dse

COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -95,7 +95,7 @@ COPY settings.xml settings.xml /root/.m2/
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi -P dse && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions dse-68/Dockerfile.jdk8
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ENV MAAC_PATH /opt/management-api
ENV DSE_HOME /opt/dse

COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -95,7 +95,7 @@ COPY settings.xml settings.xml /root/.m2/
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi -P dse && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
4 changes: 2 additions & 2 deletions dse-68/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ENV MAAC_PATH /opt/management-api
ENV DSE_HOME /opt/dse

COPY pom.xml /tmp/pom.xml
COPY management-api-shaded-dataformat-yaml/pom.xml /tmp/management-api-shaded-dataformat-yaml/pom.xml
COPY management-api-agent-shaded-libs/pom.xml /tmp/management-api-agent-shaded-libs/pom.xml
COPY management-api-agent-common/pom.xml /tmp/management-api-agent-common/pom.xml
COPY management-api-agent-3.x/pom.xml /tmp/management-api-agent-3.x/pom.xml
COPY management-api-agent-4.x/pom.xml /tmp/management-api-agent-4.x/pom.xml
Expand All @@ -26,7 +26,7 @@ COPY settings.xml settings.xml /root/.m2/
# a solid cache layer that only gets reset on pom.xml changes
RUN cd /tmp && mvn -q -ff -T 1C install -DskipOpenApi -P dse && rm -rf target

COPY management-api-shaded-dataformat-yaml /tmp/management-api-shaded-dataformat-yaml
COPY management-api-agent-shaded-libs /tmp/management-api-agent-shaded-libs
COPY management-api-agent-common /tmp/management-api-agent-common
COPY management-api-agent-3.x /tmp/management-api-agent-3.x
COPY management-api-agent-4.x /tmp/management-api-agent-4.x
Expand Down
2 changes: 1 addition & 1 deletion management-api-agent-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
</dependency>
<dependency>
<groupId>io.k8ssandra</groupId>
<artifactId>datastax-mgmtapi-shaded-dataformat-yaml</artifactId>
<artifactId>datastax-mgmtapi-agent-shaded-libs</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import com.datastax.oss.driver.api.querybuilder.schema.CreateTableWithOptions;
import com.datastax.oss.driver.api.querybuilder.schema.OngoingPartitionKey;
import com.datastax.oss.driver.internal.core.metadata.schema.parsing.DataTypeCqlNameParser;
import com.fasterxml.jackson.shaded.core.JsonProcessingException;
import com.fasterxml.jackson.shaded.databind.ObjectMapper;
import com.google.common.base.Preconditions;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.Maps;
import io.k8ssandra.shaded.com.fasterxml.jackson.core.JsonProcessingException;
import io.k8ssandra.shaded.com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/
package io.k8ssandra.metrics.builder.relabel;

import com.fasterxml.jackson.shaded.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Strings;
import io.k8ssandra.shaded.com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.regex.Pattern;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/
package io.k8ssandra.metrics.config;

import com.fasterxml.jackson.shaded.databind.ObjectMapper;
import com.fasterxml.jackson.shaded.dataformat.yaml.YAMLFactory;
import io.k8ssandra.metrics.builder.relabel.RelabelSpec;
import io.k8ssandra.shaded.com.fasterxml.jackson.databind.ObjectMapper;
import io.k8ssandra.shaded.com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/
package io.k8ssandra.metrics.config;

import com.fasterxml.jackson.shaded.annotation.JsonProperty;
import io.k8ssandra.metrics.builder.relabel.RelabelSpec;
import io.k8ssandra.shaded.com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package io.k8ssandra.metrics.config;

import com.fasterxml.jackson.shaded.annotation.JsonProperty;
import io.k8ssandra.shaded.com.fasterxml.jackson.annotation.JsonProperty;

public class EndpointConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package io.k8ssandra.metrics.config;

import com.fasterxml.jackson.shaded.annotation.JsonProperty;
import io.k8ssandra.shaded.com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

public class LabelConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
package io.k8ssandra.metrics.config;

import com.fasterxml.jackson.shaded.annotation.JsonProperty;
import io.k8ssandra.shaded.com.fasterxml.jackson.annotation.JsonProperty;

public class TLSConfiguration {
@JsonProperty("ca.crt")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<version>${revision}</version>
</parent>
<version>${revision}</version>
<artifactId>datastax-mgmtapi-shaded-dataformat-yaml</artifactId>
<artifactId>datastax-mgmtapi-agent-shaded-libs</artifactId>
<profiles>
<profile>
<id>default</id>
Expand Down Expand Up @@ -63,23 +63,23 @@
<relocations>
<relocation>
<pattern>org.yaml.snakeyaml</pattern>
<shadedPattern>org.yaml.shaded.snakeyaml</shadedPattern>
<shadedPattern>io.k8ssandra.shaded.org.yaml.snakeyaml</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson.annotation</pattern>
<shadedPattern>com.fasterxml.jackson.shaded.annotation</shadedPattern>
<shadedPattern>io.k8ssandra.shaded.com.fasterxml.jackson.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson.core</pattern>
<shadedPattern>com.fasterxml.jackson.shaded.core</shadedPattern>
<shadedPattern>io.k8ssandra.shaded.com.fasterxml.jackson.core</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson.databind</pattern>
<shadedPattern>com.fasterxml.jackson.shaded.databind</shadedPattern>
<shadedPattern>io.k8ssandra.shaded.com.fasterxml.jackson.databind</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson.dataformat.yaml</pattern>
<shadedPattern>com.fasterxml.jackson.shaded.dataformat.yaml</shadedPattern>
<shadedPattern>io.k8ssandra.shaded.com.fasterxml.jackson.dataformat.yaml</shadedPattern>
</relocation>
</relocations>
</configuration>
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<dseIncluded>false</dseIncluded>
</properties>
<modules>
<module>management-api-shaded-dataformat-yaml</module>
<module>management-api-agent-shaded-libs</module>
<module>management-api-common</module>
<module>management-api-agent-common</module>
<module>management-api-agent-3.x</module>
Expand All @@ -70,7 +70,7 @@
<dseIncluded>true</dseIncluded>
</properties>
<modules>
<module>management-api-shaded-dataformat-yaml</module>
<module>management-api-agent-shaded-libs</module>
<module>management-api-common</module>
<module>management-api-agent-common</module>
<module>management-api-agent-3.x</module>
Expand All @@ -90,7 +90,7 @@
<dseIncluded>false</dseIncluded>
</properties>
<modules>
<module>management-api-shaded-dataformat-yaml</module>
<module>management-api-agent-shaded-libs</module>
<module>management-api-common</module>
<module>management-api-agent-common</module>
<module>management-api-agent-3.x</module>
Expand All @@ -109,7 +109,7 @@
<dseIncluded>true</dseIncluded>
</properties>
<modules>
<module>management-api-shaded-dataformat-yaml</module>
<module>management-api-agent-shaded-libs</module>
<module>management-api-common</module>
<module>management-api-agent-common</module>
<module>management-api-agent-3.x</module>
Expand Down

0 comments on commit ba983af

Please sign in to comment.