提交 19584b6f 编写于 作者: A ascrutae

add logic of shade grpc

上级 a7279a83
......@@ -27,6 +27,10 @@
<shade.com.google.target>${shade.package}.${shade.com.google.source}</shade.com.google.target>
<shade.org.apache.source>org.apache</shade.org.apache.source>
<shade.org.apache.target>${shade.package}.${shade.org.apache.source}</shade.org.apache.target>
<shade.io.grpc.source>io.grpc</shade.io.grpc.source>
<shade.io.grpc.target>${shade.package}.${shade.io.grpc.source}</shade.io.grpc.target>
<shade.io.netty.source>io.netty</shade.io.netty.source>
<shade.io.netty.target>${shade.package}.${shade.io.netty.source}</shade.io.netty.target>
</properties>
<dependencies>
......@@ -105,6 +109,9 @@
<artifactSet>
<excludes>
<exclude>net.bytebuddy:byte-buddy:jar:</exclude>
<exclude>com.google.errorprone:error_prone_annotations:jar:</exclude>
<exclude>com.google.code.findbugs:jsr305:jar:</exclude>
<exclude>com.google.instrumentation:instrumentation-api:jar:</exclude>
</excludes>
</artifactSet>
<relocations>
......@@ -120,11 +127,53 @@
<pattern>${shade.org.apache.source}</pattern>
<shadedPattern>${shade.org.apache.target}</shadedPattern>
</relocation>
<relocation>
<pattern>${shade.io.grpc.source}</pattern>
<shadedPattern>${shade.io.grpc.target}</shadedPattern>
</relocation>
<relocation>
<pattern>${shade.io.netty.source}</pattern>
<shadedPattern>${shade.io.netty.target}</shadedPattern>
</relocation>
<relocation>
<pattern>${shade.io.netty.source}</pattern>
<shadedPattern>${shade.io.netty.target}</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>unpack</id>
<phase>package</phase>
<configuration>
<target>
<unzip src="${project.build.directory}/${artifactId}-${version}.jar"
dest="${project.build.directory}/unpacked/"/>
<move todir="${project.build.directory}/unpacked/META-INF/services"
includeemptydirs="false">
<fileset dir="${project.build.directory}/unpacked/META-INF/services">
<include name="io.grpc.*"/>
</fileset>
<mapper type="glob" from="*" to="${shade.package}.*"/>
</move>
<jar destfile="${project.build.directory}/${artifactId}-${version}.jar"
basedir="${project.build.directory}/unpacked"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
......@@ -149,6 +149,10 @@
<exclude>commons-logging:*</exclude>
<exclude>commons-codec:*</exclude>
<exclude>*:gson</exclude>
<exclude>io.grpc:*</exclude>
<exclude>io.netty:*</exclude>
<exclude>com.google.protobuf:*</exclude>
<exclude>com.google.guava:guava</exclude>
</excludes>
</artifactSet>
<relocations>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册