Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-5925 package 'standalone' connector tar/zip archive in assembly profile #90

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion cassandra-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
</dependencies>
<executions>
<execution>
<id>default</id>
<id>plugin</id>
<phase>package</phase>
<goals>
<goal>single</goal>
Expand All @@ -244,6 +244,21 @@
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
<execution>
<id>standalone</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<attach>true</attach> <!-- we want attach & deploy these to Maven -->
<descriptors>
<descriptor>${project.basedir}/../src/assembly/assembly-standalone.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
17 changes: 16 additions & 1 deletion cassandra-4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
</dependencies>
<executions>
<execution>
<id>default</id>
<id>plugin</id>
<phase>package</phase>
<goals>
<goal>single</goal>
Expand All @@ -265,6 +265,21 @@
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
<execution>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keriharris @smiklosovic
How about using maven-shade-plugin? The fatjar can be created with it but it provides an option to exclude a set of dependencies. That way we can get both fatjar with the necessary dependencies and the tar.gz as well. WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpechane worth to investigate and compare the results!

<id>standalone</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<attach>true</attach> <!-- we want attach & deploy these to Maven -->
<descriptors>
<descriptor>${project.basedir}/../src/assembly/assembly-standalone.xml</descriptor>
</descriptors>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
77 changes: 77 additions & 0 deletions src/assembly/assembly-standalone.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>standalone</id>
<formats>
<format>tar.gz</format>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<!-- Dependency set for integrating with Kafka Connect / Debezium Server -->
<dependencySet>
<outputDirectory>${project.artifactId}</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<!-- Exclude guava dependencies -->
<exclude>com.google.guava:listenablefuture:*</exclude>

<!-- Exclude dependencies with incorrect scope -->
<exclude>org.checkerframework:checker-qual:*</exclude>
</excludes>
</dependencySet>
<!-- Dependency set for running as a standalone application -->
<dependencySet>
<outputDirectory>${project.artifactId}</outputDirectory>
<unpack>false</unpack>
<scope>provided</scope>
<useProjectArtifact>false</useProjectArtifact>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<!-- Exclude build-time provided Debezium dependencies -->
<exclude>${project.groupId}:debezium-assembly-descriptors:*</exclude>
<exclude>${project.groupId}:debezium-checkstyle:*</exclude>
<exclude>${project.groupId}:debezium-ide-configs:*</exclude>
<exclude>${project.groupId}:debezium-revapi:*</exclude>
<!-- Exclude guava dependencies -->
<exclude>com.google.guava:listenablefuture:*</exclude>
<!-- Exclude dependencies with incorrect scope -->
<exclude>org.checkerframework:checker-qual:*</exclude>
</excludes>
</dependencySet>
<dependencySet>
<outputDirectory>${project.artifactId}</outputDirectory>
<unpack>false</unpack>
<includes>
<include>${project.groupId}:${project.artifactId}:*</include>
</includes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<!-- Get the files from the top-level directory, which should be above the connectors -->
<directory>${project.basedir}/..</directory>
<outputDirectory>${project.artifactId}</outputDirectory>
<includes>
<include>README*</include>
<include>CHANGELOG*</include>
<include>CONTRIBUTE*</include>
<include>COPYRIGHT*</include>
<include>LICENSE*</include>
</includes>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
<fileSet>
<directory>${project.build.directory}/generated-sources</directory>
<outputDirectory>${project.artifactId}</outputDirectory>
<includes>
<include>*.json</include>
</includes>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
</assembly>