This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 416ab1d  optimize agent package & reduce dependencies (#8461)
416ab1d is described below

commit 416ab1d87d53053e0ef16b27db88a16e1b7b63b3
Author: Daming <[email protected]>
AuthorDate: Wed Dec 2 11:04:04 2020 +0800

    optimize agent package & reduce dependencies (#8461)
---
 shardingsphere-agent/shardingsphere-agent-core/pom.xml      | 13 +++++++++----
 .../assembly/shardingsphere-agent-binary-distribution.xml   |  6 +++---
 shardingsphere-agent/shardingsphere-agent-plugins/pom.xml   | 11 +++++++++++
 3 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/shardingsphere-agent/shardingsphere-agent-core/pom.xml 
b/shardingsphere-agent/shardingsphere-agent-core/pom.xml
index 26da717..7b32311 100644
--- a/shardingsphere-agent/shardingsphere-agent-core/pom.xml
+++ b/shardingsphere-agent/shardingsphere-agent-core/pom.xml
@@ -57,6 +57,15 @@
                             <goal>shade</goal>
                         </goals>
                         <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    
<exclude>com.google.errorprone:error_prone_annotations:jar:</exclude>
+                                    
<exclude>com.google.code.findbugs:jsr305:jar:</exclude>
+                                    
<exclude>org.checkerframework:checker-qual:jar:</exclude>
+                                    
<exclude>com.google.guava:listenablefuture:jar:*</exclude>
+                                    
<exclude>com.google.j2objc:j2objc-annotations:jar:*</exclude>
+                                </excludes>
+                            </artifactSet>
                             <relocations>
                                 <relocation>
                                     <pattern>org.yaml</pattern>
@@ -74,10 +83,6 @@
                                     <pattern>org.apache.commons</pattern>
                                     
<shadedPattern>${shade.package}.org.apache.commons</shadedPattern>
                                 </relocation>
-                                <relocation>
-                                    <pattern>org.checkerframework</pattern>
-                                    
<shadedPattern>${shade.package}.org.checkerframework</shadedPattern>
-                                </relocation>
                             </relocations>
                         </configuration>
                     </execution>
diff --git 
a/shardingsphere-agent/shardingsphere-agent-distribution/src/main/assembly/shardingsphere-agent-binary-distribution.xml
 
b/shardingsphere-agent/shardingsphere-agent-distribution/src/main/assembly/shardingsphere-agent-binary-distribution.xml
index 20293d4..dde487d 100644
--- 
a/shardingsphere-agent/shardingsphere-agent-distribution/src/main/assembly/shardingsphere-agent-binary-distribution.xml
+++ 
b/shardingsphere-agent/shardingsphere-agent-distribution/src/main/assembly/shardingsphere-agent-binary-distribution.xml
@@ -42,7 +42,7 @@
 
         <fileSet>
             
<directory>${project.basedir}/../shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracers/target/plugins</directory>
-            <outputDirectory>/plugins</outputDirectory>
+            <outputDirectory>${basedir}/plugins</outputDirectory>
             <includes>
                 <include>**-${module.version}.jar</include>
             </includes>
@@ -58,7 +58,7 @@
             </includes>
             <binaries>
                 <unpack>false</unpack>
-                <outputDirectory>/</outputDirectory>
+                <outputDirectory>${basedir}/</outputDirectory>
                 <includeDependencies>false</includeDependencies>
                 
<outputFileNameMapping>shardingsphere-agent.jar</outputFileNameMapping>
             </binaries>
@@ -71,7 +71,7 @@
             </includes>
             <binaries>
                 <unpack>false</unpack>
-                <outputDirectory>/plugins</outputDirectory>
+                <outputDirectory>${basedir}/plugins</outputDirectory>
                 <includeDependencies>false</includeDependencies>
                 
<outputFileNameMapping>${module.artifactId}-${module.version}.jar</outputFileNameMapping>
             </binaries>
diff --git a/shardingsphere-agent/shardingsphere-agent-plugins/pom.xml 
b/shardingsphere-agent/shardingsphere-agent-plugins/pom.xml
index 604ae90..77a769a 100644
--- a/shardingsphere-agent/shardingsphere-agent-plugins/pom.xml
+++ b/shardingsphere-agent/shardingsphere-agent-plugins/pom.xml
@@ -61,6 +61,17 @@
                             
<createDependencyReducedPom>true</createDependencyReducedPom>
                             <createSourcesJar>true</createSourcesJar>
                             <shadeSourcesContent>true</shadeSourcesContent>
+                            <artifactSet>
+                                <excludes>
+                                    
<exclude>net.bytebuddy:byte-buddy:jar:</exclude>
+                                    
<exclude>org.checkerframework:checker-qual:jar:</exclude>
+                                    <exclude>com.google.*:*</exclude>
+                                    <exclude>com.google.guava:guava:*</exclude>
+                                    <exclude>org.slf4j:*</exclude>
+                                    <exclude>org.yaml:snakeyaml:*</exclude>
+                                    
<exclude>org.apache.commons:logging:*</exclude>
+                                </excludes>
+                            </artifactSet>
                         </configuration>
                     </execution>
                 </executions>

Reply via email to