-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix gcp build with latest maven (#750)
* script to help check for the issue * pom that pins good version of maven-assembly-plugin (3.6.0) * more correct uber-jar assembly pom * revert assembly plugin version to latest, although leave pinned
- Loading branch information
1 parent
14de947
commit 13ef435
Showing
3 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# helper script to quickly check the gRPC services in a jar file, which seems to be root cause | ||
# of the gRPC issue in the cloud function | ||
|
||
# determine the jar file to check | ||
VERSION=$1 | ||
JAR_FILE=target/psoxy-gcp-${VERSION}.jar | ||
|
||
BLUE='\e[34m' | ||
NC='\e[0m' # No Color | ||
|
||
printf "Checking grpc load balancer services in jar file: ${BLUE}${JAR_FILE}${NC}\n" | ||
printf " (as of 2024-07-10, good one contains 3 files, including 'io.grpc.internal.PickFirstLoadBalancerProvider')\n" | ||
jar xf $JAR_FILE META-INF/services/io.grpc.LoadBalancerProvider | ||
|
||
cat META-INF/services/io.grpc.LoadBalancerProvider | ||
rm -rf META-INF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd"> | ||
|
||
<id>uber-jar</id> | ||
<formats> | ||
<format>jar</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<dependencySets> | ||
<dependencySet> | ||
<outputDirectory>/</outputDirectory> | ||
<useProjectArtifact>true</useProjectArtifact> | ||
<unpack>true</unpack> | ||
<scope>runtime</scope> | ||
</dependencySet> | ||
</dependencySets> | ||
<!-- above from https://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies --> | ||
<!-- what we need is below, to merge all the META-INF/services files --> | ||
<containerDescriptorHandlers> | ||
<containerDescriptorHandler> | ||
<handlerName>metaInf-services</handlerName> | ||
</containerDescriptorHandler> | ||
</containerDescriptorHandlers> | ||
</assembly> |