Repository: netty/netty
Issue: Could not find netty-transport-native-epoll-4.1.57.Final-SNAPSHOT-linux-x86_64.jar

With the recent changes for Netty SNAPSHOTS deployment, the message below is thrown when one tries to build using Netty SNAPSHOTS

```
Could not find netty-transport-native-epoll-4.1.57.Final-SNAPSHOT-linux-x86_64.jar (io.netty:netty-transport-native-epoll:4.1.57.Final-SNAPSHOT:20201223.100457-23).
Searched in the following locations:
    https://oss.sonatype.org/content/repositories/snapshots/io/netty/netty-transport-native-epoll/4.1.57.Final-SNAPSHOT/netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-linux-x86_64.jar
```

The `oss.sonatype.org` currently contains these artifacts. The SNAPSHOTS upload contains either `linux-x86_64` or `linux-aarch_64`:

```
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-linux-x86_64.jar	Wed Dec 23 09:59:13 UTC 2020	152114	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-linux-x86_64.jar.md5	Wed Dec 23 09:59:13 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-linux-x86_64.jar.sha1	Wed Dec 23 09:59:13 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-sources.jar	Wed Dec 23 09:59:09 UTC 2020	85770	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-sources.jar.md5	Wed Dec 23 09:59:09 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-sources.jar.sha1	Wed Dec 23 09:59:09 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-test-sources.jar	Wed Dec 23 09:59:10 UTC 2020	225891	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-test-sources.jar.md5	Wed Dec 23 09:59:11 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-test-sources.jar.sha1	Wed Dec 23 09:59:10 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-tests.jar	Wed Dec 23 09:59:11 UTC 2020	275714	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-tests.jar.md5	Wed Dec 23 09:59:12 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22-tests.jar.sha1	Wed Dec 23 09:59:12 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22.jar	Wed Dec 23 09:59:06 UTC 2020	122951	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22.jar.md5	Wed Dec 23 09:59:07 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22.jar.sha1	Wed Dec 23 09:59:07 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22.pom	Wed Dec 23 09:59:07 UTC 2020	4955	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22.pom.md5	Wed Dec 23 09:59:07 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.095906-22.pom.sha1	Wed Dec 23 09:59:07 UTC 2020	40	
```

```
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-linux-aarch_64.jar	Wed Dec 23 10:05:02 UTC 2020	148585	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-linux-aarch_64.jar.md5	Wed Dec 23 10:05:02 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-linux-aarch_64.jar.sha1	Wed Dec 23 10:05:02 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-sources.jar	Wed Dec 23 10:04:59 UTC 2020	85767	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-sources.jar.md5	Wed Dec 23 10:05:00 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-sources.jar.sha1	Wed Dec 23 10:04:59 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-test-sources.jar	Wed Dec 23 10:05:00 UTC 2020	222361	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-test-sources.jar.md5	Wed Dec 23 10:05:01 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-test-sources.jar.sha1	Wed Dec 23 10:05:00 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-tests.jar	Wed Dec 23 10:05:01 UTC 2020	272184	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-tests.jar.md5	Wed Dec 23 10:05:01 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23-tests.jar.sha1	Wed Dec 23 10:05:01 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23.jar	Wed Dec 23 10:04:57 UTC 2020	122946	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23.jar.md5	Wed Dec 23 10:04:57 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23.jar.sha1	Wed Dec 23 10:04:57 UTC 2020	40	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23.pom	Wed Dec 23 10:04:58 UTC 2020	4959	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23.pom.md5	Wed Dec 23 10:04:58 UTC 2020	32	
netty-transport-native-epoll-4.1.57.Final-20201223.100457-23.pom.sha1	Wed Dec 23 10:04:58 UTC 2020	40	
```

### Expected behavior
To be able to build using Netty SNAPSHOTS

### Actual behavior
Could not find netty-transport-native-epoll-4.1.57.Final-SNAPSHOT-linux-x86_64.jar

### Possible solution
Deploy the artifacts with different  classifiers with one SNAPSHOT deploy

### Netty version
4.1.57.Final-SNAPSHOT


Issue comments:
@violetagg I wonder how we can archive this as we need to build on different platforms. Any idea ? 
@normanmaurer I didn't have such issue till now, but is it possible to build first the artifacts and then to upload them all?

On the link below it is described how to deploy many files with different classifiers. Will this help?
http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html

@violetagg thats because we didn't deploy these artefacts as snapshot until now... I will investigate. Thanks!
@violetagg This should be fixed now... https://github.com/netty/netty/pull/10893
@normanmaurer Thanks a lot. My build is green again :)
Happy holidays!
> @violetagg这应该现在修复... #10893
Could not find netty-transport-native-epoll-4.1.57.Final-SNAPSHOT-linux-aarch_64.jar (io.netty:netty-transport-native-epoll:4.1.57.Final) 
how to fix it?
i work at gradle and idea when i flush denpendencis 
version： io.netty:netty-all:4.1.77.Final  phenomenon：normal before 4.1.68

Pull request review comments:

Patch that resolved the issue:
diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-deploy.yml
index 7208df32f5c..513dee25a2d 100644
--- a/.github/workflows/ci-deploy.yml
+++ b/.github/workflows/ci-deploy.yml
@@ -11,69 +11,75 @@ on:
   workflow_dispatch:
 
 jobs:
-  deploy-linux-x86_64:
+  stage-snapshot:
     runs-on: ubuntu-latest
-    steps:
-      - uses: s4u/maven-settings-action@v2.2.0
-        with:
-          servers: |
-            [{
-                "id": "sonatype-nexus-snapshots",
-                "username": "${{ secrets.SONATYPE_USERNAME }}",
-                "password": "${{ secrets.SONATYPE_PASSWORD }}"
-            }]
+    strategy:
+      matrix:
+        include:
+          - setup: linux-x86_64-java8
+            docker-compose-build: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml build"
+            docker-compose-run: "-f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml run stage-snapshot"
+          - setup: linux-aarch64
+            docker-compose-build: "-f docker/docker-compose.centos-7.yaml build"
+            docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-snapshot"
 
+    name: stage-snapshot-${{ matrix.setup }}
+    steps:
       - uses: actions/checkout@v2
 
       # Cache .m2/repository
       - uses: actions/cache@v2
         env:
-          cache-name: deploy-linux-x86_64-cache-m2-repository
+          cache-name: staging-${{ matrix.setup }}-cache-m2-repository
         with:
           path: ~/.m2/repository
-          key: ${{ runner.os }}-deploy-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
+          key: ${{ runner.os }}-staging-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
           restore-keys: |
-            ${{ runner.os }}-deploy-${{ env.cache-name }}-
-            ${{ runner.os }}-deploy-
+            ${{ runner.os }}-staging-${{ env.cache-name }}-
+            ${{ runner.os }}-staging-
 
       # Enable caching of Docker layers
       - uses: satackey/action-docker-layer-caching@v0.0.8
         env:
-          docker-cache-name: deploy-linux-x86_64-cache-docker
+          docker-cache-name: staging-${{ matrix.setup }}-cache-docker
         continue-on-error: true
         with:
-          key: ${{ runner.os }}-deploy-${{ env.docker-cache-name }}-{hash}
+          key: ${{ runner.os }}-staging-${{ env.docker-cache-name }}-{hash}
           restore-keys: |
-            ${{ runner.os }}-deploy-${{ env.docker-cache-name }}-
+            ${{ runner.os }}-staging-${{ env.docker-cache-name }}-
+
+      - name: Create local staging directory
+        run: mkdir -p ~/local-staging
 
       - name: Build docker image
-        run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml build
+        run: docker-compose ${{ matrix.docker-compose-build }}
 
-      - name: Deploy snapshots
-        run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.centos-6.18.yaml run deploy
+      - name: Stage snapshots to local staging directory
+        run: docker-compose ${{ matrix.docker-compose-run }}
 
-  deploy-linux-aarch64:
-    runs-on: ubuntu-latest
-    # We depend on the deploy of linux-x86_64 so we can download the dependencies
-    needs: deploy-linux-x86_64
-    # Skip for now until we figured out how to deploy SNAPSHOTS with the the same timestamps
-    if: ${{ false }}
-    steps:
-      - uses: s4u/maven-settings-action@v2.2.0
+      - name: Upload local staging directory
+        uses: actions/upload-artifact@v2
         with:
-          servers: |
-            [{
-                "id": "sonatype-nexus-snapshots",
-                "username": "${{ secrets.SONATYPE_USERNAME }}",
-                "password": "${{ secrets.SONATYPE_PASSWORD }}"
-            }]
+          name: ${{ matrix.setup }}-local-staging
+          path: ~/local-staging
+          if-no-files-found: error
 
+  deploy-staged-snapshots:
+    runs-on: ubuntu-18.04
+    # Wait until we have staged everything
+    needs: stage-snapshot
+    steps:
       - uses: actions/checkout@v2
 
+      - name: Set up JDK 8
+        uses: actions/setup-java@v1
+        with:
+          java-version: 8
+
       # Cache .m2/repository
       - uses: actions/cache@v2
         env:
-          cache-name: deploy-linux-aarch64-cache-m2-repository
+          cache-name: deploy-staging-cache-m2-repository
         with:
           path: ~/.m2/repository
           key: ${{ runner.os }}-deploy-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
@@ -81,18 +87,41 @@ jobs:
             ${{ runner.os }}-deploy-${{ env.cache-name }}-
             ${{ runner.os }}-deploy-
 
-      # Enable caching of Docker layers
-      - uses: satackey/action-docker-layer-caching@v0.0.8
-        env:
-          docker-cache-name: deploy-linux-aarch64-cache-docker
-        continue-on-error: true
+      # Setup some env to re-use later.
+      - name: Prepare enviroment variables
+        run: |
+          echo "LOCAL_STAGING_DIR=$HOME/local-staging" >> $GITHUB_ENV
+
+      # Hardcode the staging artifacts that need to be downloaded.
+      # These must match the matrix setups. There is currently no way to pull this out of the config.
+      - name: Download linux-aarch64 staging directory
+        uses: actions/download-artifact@v2
         with:
-          key: ${{ runner.os }}-deploy-${{ env.docker-cache-name }}-{hash}
-          restore-keys: |
-            ${{ runner.os }}-deploy-${{ env.docker-cache-name }}-
+          name: linux-aarch64-local-staging
+          path: ~/linux-aarch64-local-staging
 
-      - name: Build docker image
-        run: docker-compose -f docker/docker-compose.centos-7.yaml build
+      - name: Download linux-x86_64-java8 staging directory
+        uses: actions/download-artifact@v2
+        with:
+          name: linux-x86_64-java8-local-staging
+          path: ~/linux-x86_64-java8-local-staging
+
+      - name: Merge staging repositories
+        run: |
+          mkdir -p ~/local-staging/deferred
+          cat ~/linux-aarch64-local-staging/deferred/.index >>  ~/local-staging/deferred/.index
+          cp -r ~/linux-aarch64-local-staging/deferred/* ~/local-staging/deferred/
+          cat ~/linux-x86_64-java8-local-staging/deferred/.index >>  ~/local-staging/deferred/.index
+          cp -r ~/linux-x86_64-java8-local-staging/deferred/* ~/local-staging/deferred/
+
+      - uses: s4u/maven-settings-action@v2.2.0
+        with:
+          servers: |
+            [{
+              "id": "sonatype-nexus-snapshots",
+              "username": "${{ secrets.SONATYPE_USERNAME }}",
+              "password": "${{ secrets.SONATYPE_PASSWORD }}"
+            }]
 
-      - name: Deploy snapshots
-        run: docker-compose -f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-deploy
+      - name: Deploy local staged artifacts
+        run: mvn -B --file pom.xml org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=$LOCAL_STAGING_DIR
\ No newline at end of file
diff --git a/docker/docker-compose.centos-6.18.yaml b/docker/docker-compose.centos-6.18.yaml
index ff1aa5154c9..e522f6348b4 100644
--- a/docker/docker-compose.centos-6.18.yaml
+++ b/docker/docker-compose.centos-6.18.yaml
@@ -20,6 +20,9 @@ services:
   build-leak-boringssl-static:
     image: netty:centos-6-1.8
 
+  stage-snapshot:
+    image: netty:centos-6-1.8
+
   deploy:
     image: netty:centos-6-1.8
 
diff --git a/docker/docker-compose.centos-7.yaml b/docker/docker-compose.centos-7.yaml
index f4d99054937..5b2d324ea4e 100644
--- a/docker/docker-compose.centos-7.yaml
+++ b/docker/docker-compose.centos-7.yaml
@@ -24,7 +24,17 @@ services:
 
   cross-compile-aarch64-deploy:
     <<: *cross-compile-aarch64-common
-    command: /bin/bash -cl "./mvnw -pl transport-native-unix-common,transport-native-epoll clean deploy -Plinux-aarch64 -DskipTests=true"
+    command: /bin/bash -cl "./mvnw -Plinux-aarch64 -pl transport-native-unix-common,transport-native-epoll clean deploy -DskipTests=true"
+
+  cross-compile-aarch64-stage-snapshot:
+    <<: *cross-compile-aarch64-common
+    volumes:
+      - ~/.ssh:/root/.ssh
+      - ~/.gnupg:/root/.gnupg
+      - ~/.m2:/root/.m2
+      - ~/local-staging:/root/local-staging
+      - ..:/code
+    command: /bin/bash -cl "./mvnw -Plinux-aarch64 -pl transport-native-unix-common,transport-native-epoll clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DaltStagingDirectory=/root/local-staging -DskipRemoteStaging=true -DskipTests=true"
 
   cross-compile-aarch64-shell:
     <<: *cross-compile-aarch64-common
diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml
index e2dc92fc105..e516a26bc44 100644
--- a/docker/docker-compose.yaml
+++ b/docker/docker-compose.yaml
@@ -30,6 +30,16 @@ services:
     <<: *common
     command: /bin/bash -cl "./mvnw clean deploy -DskipTests=true"
 
+  stage-snapshot:
+    <<: *common
+    volumes:
+      - ~/.ssh:/root/.ssh
+      - ~/.gnupg:/root/.gnupg
+      - ~/.m2:/root/.m2
+      - ~/local-staging:/root/local-staging
+      - ..:/code
+    command: /bin/bash -cl "./mvnw clean package org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DaltStagingDirectory=/root/local-staging -DskipRemoteStaging=true -DskipTests=true"
+
   build-boringssl-static:
     <<: *common
     command: /bin/bash -cl "./mvnw -P boringssl clean install -Dio.netty.testsuite.badHost=netty.io -Dxml.skip=true"


Test patch: