Repository: netty/netty
Issue: Module compatibility

Netty 4.1.66 introduced a requirement on tc-native 2.0.40 with this commit https://github.com/netty/netty/commit/40fb6026efd2a9fc67049b437e4db5d6d81d688c

This led to a user being confronted with an error after upgrading Micronaut (which includes 4.1.66) https://github.com/micronaut-projects/micronaut-core/issues/5920

Can we get the tc-native modules added to the netty bom so we can avoid this?

Issue comments:
@jameskleeh I am currently not sure how to do this as the user can either use `netty-tcnative` or `netty-tcnative-boringssl-static`. Or you are saying we should add both ?
Yeah I think both
@jameskleeh want to provide a PR ?
Sure
@jameskleeh ping me once something is ready for review 
@jameskleeh https://github.com/netty/netty/pull/11609

Pull request review comments:
Should the `dependencyManagement` section here list all other artifacts produced by tcnative, like `netty-tcnative-openssl-static`, etc.? 
Can netty use `netty-bom-ssl` instead of defining another constant for that?
We only publish a static artifact for boringssl 
I think this not works .. what exactly do you have in mind ?
Ok, should this doc be updated: https://netty.io/wiki/forked-tomcat-native.html#artifacts?
Like depending on the `bom-ssl` and not specifying a version for `tcnative`, letting it to be inferred through the bom
From what I know this shouldn't be done ... I also don't think it's a big problem to just keep these in sync 
If the `bom-ssl` is not used by this repo, it can be moved to https://github.com/netty/netty-tcnative
Well you can still build these but we don't release them 
Ok, sounds good
Perhaps `${tcnative.artifactId}` for consistency.
Where is `${tcnative.version}` being set? The pom says "keep in sync" but I don't see a property section here.
Could the Netty version be specified in a property so that you only have to modify it in one place?
`bom-ssl/pom.xml` ?  to just `bom/pom.xml` now, correct?
`netty-tcnative-boringssl-static` also has jars with different classifiers, should we list them all?
https://repo1.maven.org/maven2/io/netty/netty-tcnative-boringssl-static/2.0.41.Final/
Leftover from the previous iteration
Same
I guess we could ... Let me do this 
This one is updated automatically by the release plugin 
parent pom.xml 
No we want to define these explicit

Patch that resolved the issue:
diff --git a/bom/pom.xml b/bom/pom.xml
index 429c477cffe..e05844a8d51 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -253,6 +253,60 @@
         <version>4.1.68.Final-SNAPSHOT</version>
         <classifier>osx-x86_64</classifier>
       </dependency>
+
+      <!-- Add netty-tcnative* as well as users need to ensure they use the correct version -->
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative</artifactId>
+        <version>${tcnative.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative</artifactId>
+        <version>${tcnative.version}</version>
+        <classifier>linux-x86_64</classifier>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative</artifactId>
+        <version>${tcnative.version}</version>
+        <classifier>linux-aarch_64</classifier>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative</artifactId>
+        <version>${tcnative.version}</version>
+        <classifier>osx-x86_64</classifier>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative-boringssl-static</artifactId>
+        <version>${tcnative.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative-boringssl-static</artifactId>
+        <version>${tcnative.version}</version>
+        <classifier>linux-x86_64</classifier>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative-boringssl-static</artifactId>
+        <version>${tcnative.version}</version>
+        <classifier>linux-aarch_64</classifier>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative-boringssl-static</artifactId>
+        <version>${tcnative.version}</version>
+        <classifier>osx_64</classifier>
+      </dependency>
+      <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative-boringssl-static</artifactId>
+        <version>${tcnative.version}</version>
+        <classifier>windows_64</classifier>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 </project>


Test patch: