examples: Document how to preserve META-INF/services in uber jars · grpc/grpc-java@97695d5 · GitHub
Skip to content

Commit 97695d5

Browse files
committed
examples: Document how to preserve META-INF/services in uber jars
1 parent 6d611f7 commit 97695d5

3 files changed

Lines changed: 65 additions & 0 deletions

File tree

examples/build.gradle

Lines changed: 9 additions & 0 deletions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 https://maven.apache.org/xsd/assembly-2.2.0.xsd">
4+
<!--
5+
This is jar-with-dependencies with the metaInf-services handler added.
6+
https://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies
7+
https://maven.apache.org/plugins/maven-assembly-plugin/examples/single/using-container-descriptor-handlers.html
8+
-->
9+
<id>jar-with-dependencies</id>
10+
<formats>
11+
<format>jar</format>
12+
</formats>
13+
<includeBaseDirectory>false</includeBaseDirectory>
14+
<dependencySets>
15+
<dependencySet>
16+
<outputDirectory>/</outputDirectory>
17+
<useProjectArtifact>true</useProjectArtifact>
18+
<unpack>true</unpack>
19+
<scope>runtime</scope>
20+
</dependencySet>
21+
</dependencySets>
22+
<containerDescriptorHandlers>
23+
<containerDescriptorHandler>
24+
<handlerName>metaInf-services</handlerName>
25+
</containerDescriptorHandler>
26+
</containerDescriptorHandlers>
27+
</assembly>

examples/pom.xml

Lines changed: 29 additions & 0 deletions

0 commit comments

Comments
 (0)