Skip to content

Commit

Permalink
[NativeIO] Shade packages into lakesoul-io-java
Browse files Browse the repository at this point in the history
Signed-off-by: maosen <[email protected]>
Co-authored-by: maosen <[email protected]>
  • Loading branch information
moresun and maosen authored Mar 14, 2024
1 parent 57bb458 commit 76add95
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DBUtil {
private static final String passwordDefault = "lakesoul_test";

private static final String driverNameKey = "lakesoul.pg.driver";
private static final String urlKey = "lakesoul.pg.url";
public static final String urlKey = "lakesoul.pg.url";
public static final String usernameKey = "lakesoul.pg.username";
public static final String passwordKey = "lakesoul.pg.password";

Expand Down
110 changes: 109 additions & 1 deletion native-io/lakesoul-io-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ SPDX-License-Identifier: Apache-2.0


<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency>

<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
Expand Down Expand Up @@ -194,6 +200,108 @@ SPDX-License-Identifier: Apache-2.0
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.6.3</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactSet>
<includes>
<include>com.dmetasoul:lakesoul-common</include>
<include>org.scala-lang:scala-library</include>
<include>org.scala-lang:scala-reflect</include>
<include>com.github.jnr:jnr-ffi</include>
<include>com.github.jnr:jffi</include>
<include>cglib:*</include>
<include>com.alibaba:fastjson</include>
<include>org.ow2.asm:*</include>
<include>com.zaxxer:HikariCP</include>
<include>org.postgresql:postgresql</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
<filter>
<artifact>com.github.jnr:jnr-ffi</artifact>
<excludes>
<exclude>com.github.jnr:jffi</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>org.apache.spark.sql</pattern>
<shadedPattern>com.lakesoul.shaded.org.apache.spark.sql</shadedPattern>
</relocation>
<relocation>
<pattern>com.zaxxer.hikari</pattern>
<shadedPattern>com.lakesoul.shaded.com.zaxxer.hikari</shadedPattern>
</relocation>
<relocation>
<pattern>org.postgresql</pattern>
<shadedPattern>com.lakesoul.shaded.org.postgresql</shadedPattern>
</relocation>
<relocation>
<pattern>org.ow2.asm</pattern>
<shadedPattern>com.lakesoul.shaded.org.ow2.asm</shadedPattern>
</relocation>
<relocation>
<pattern>org.objectweb.asm</pattern>
<shadedPattern>com.lakesoul.shaded.org.objectweb.asm</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -374,4 +482,4 @@ SPDX-License-Identifier: Apache-2.0
<!-- </plugin>-->
</plugins>
</build>
</project>
</project>

0 comments on commit 76add95

Please sign in to comment.