Skip to content

Commit 1c1da9f

Browse files
committed
Fix netty-all artifact snapshot deployments (#14264)
Motivation: We need to ensure we have all the native dependencies thats we need before we re-generate the netty-all jar as otherwise these willl be missing if people depend on it Modifications: - Add extra profile which only add linux native libs - Add some more steps in the workflow to ensure we regenerate the netty-all jar before deploy everything that was locally staged Result: Fix netty-all snapshot build
1 parent 235eb6f commit 1c1da9f

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/ci-deploy.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,17 @@ jobs:
126126
name: linux-x86_64-java8-local-staging
127127
path: ~/linux-x86_64-java8-local-staging
128128

129+
- name: Copy previous build artifacts to local maven repository
130+
run: |
131+
cp -r ~/linux-aarch64-local-staging/deferred/* ~/.m2/repository/
132+
cp -r ~/linux-riscv64-local-staging/deferred/* ~/.m2/repository/
133+
cp -r ~/linux-x86_64-java8-local-staging/deferred/* ~/.m2/repository/
134+
135+
- name: Generate netty-all and deploy to local staging.
136+
run: |
137+
mkdir -p ~/all-local-staging
138+
./mvnw -B --file pom.xml -Plinux-native-dependencies -pl all clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DaltStagingDirectory=$HOME/all-local-staging -DskipRemoteStaging=true -DskipTests=true
139+
129140
- name: Merge staging repositories
130141
run: |
131142
mkdir -p ~/local-staging/deferred
@@ -135,6 +146,8 @@ jobs:
135146
cp -r ~/linux-riscv64-local-staging/deferred/* ~/local-staging/deferred/
136147
cat ~/linux-x86_64-java8-local-staging/deferred/.index >> ~/local-staging/deferred/.index
137148
cp -r ~/linux-x86_64-java8-local-staging/deferred/* ~/local-staging/deferred/
149+
cat ~/all-local-staging/deferred/.index >> ~/local-staging/deferred/.index
150+
cp -r ~/all-local-staging/deferred/* ~/local-staging/deferred/
138151
139152
- uses: s4u/[email protected]
140153
with:

all/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,32 @@
112112
</dependency>
113113
</dependencies>
114114
</profile>
115+
<profile>
116+
<id>linux-native-dependencies</id>
117+
<dependencies>
118+
<!-- Depend on all our native jars for linux only -->
119+
<!-- As this is executed on either macOS or Linux we directly need to specify the classifier -->
120+
<!-- These dependencies will also be "merged" into the dependency section by the flatten plugin -->
121+
<dependency>
122+
<groupId>${project.groupId}</groupId>
123+
<artifactId>netty-transport-native-epoll</artifactId>
124+
<classifier>linux-x86_64</classifier>
125+
<scope>runtime</scope>
126+
</dependency>
127+
<dependency>
128+
<groupId>${project.groupId}</groupId>
129+
<artifactId>netty-transport-native-epoll</artifactId>
130+
<classifier>linux-aarch_64</classifier>
131+
<scope>runtime</scope>
132+
</dependency>
133+
<dependency>
134+
<groupId>${project.groupId}</groupId>
135+
<artifactId>netty-transport-native-epoll</artifactId>
136+
<classifier>linux-riscv64</classifier>
137+
<scope>runtime</scope>
138+
</dependency>
139+
</dependencies>
140+
</profile>
115141

116142
<!-- The linux profile will only include the native jar for epoll to the all jar.
117143
If you want to also include the native jar for kqueue use -Puber.

0 commit comments

Comments
 (0)