New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netty-all 4.1.64 has a broken dependency graph #11272
Comments
@fredericBregier one thing... can you verify what the outcome is when your add |
@normanmaurer When I removed |
@normanmaurer Both Java 8 and Java 11 |
@normanmaurer Sorry for the "spam", if I let |
Ah wait ... I may have an idea... can you try what happens when you do:
|
Motivation: We shouldn't include netty-examples as dependency for netty-all as this will try to pull in all sorts of dependencies which are optional. Modifications: Remove dependency on netty-examples Result: Fixes #11272
@fredericBregier if this helps I am sure the issue will go-away with #11273 |
@normanmaurer Still not enough:
But less dependencies concerned ( Both Java 8 and 11 of course |
@normanmaurer When I compare (through IntelliJ) the Dependency Analyzer, it seems (is it correct ?) that:
|
I run
It failed using 4.1.64-Final. I tried to remove
|
@fredericBregier let me investigate... here are multiple problems into play. |
Motivation: We shouldn't include netty-examples as dependency for netty-all as this will try to pull in all sorts of dependencies which are optional. Modifications: Remove dependency on netty-examples Result: Related to #11272
@normanmaurer Just for information, I tried to exclude all "test" part, but no success yet:
Still : [ERROR] Failed to execute goal on project testNetty64: Could not resolve dependencies for project org.example:testNetty64:jar:1.0-SNAPSHOT: Could not find artifact io.netty:netty-transport-native-epoll:jar:${os.detected.name}-${os.detected.arch}:4.1.64.Final in MavenCentral (https://repo.maven.apache.org/maven2) -> [Help 1] |
Motivation: We shouldn't include netty-examples as dependency for netty-all as this will try to pull in all sorts of dependencies which are optional. Modifications: Remove dependency on netty-examples Result: Related to #11272
The variables within I think the problem is that I wonder if using |
@candrews @normanmaurer actually the correct thing would be to not use |
Motivation: When used as a maven extension in the parent pom, the properties set by `os-maven-plugin` aren't available in projects that use that parent pom. By using `os-maven-plugin` as a plugin instead, those properties are available within child project poms. Modification: Removed `os-maven-plugin` as a maven extension, configured it instead to run as a maven plugin. Result: Fixes netty#11272
That makes a lot of sense to me, thank you! Here's a PR making that change: #11278 With #11278, the test case given in the description (running |
@candrews If it fixes the dependencies, great !!! |
@normanmaurer Can you estimate when a 4.1.64.1 or 4.1.65 will be released? |
@boris-unckel hopefully this week |
Motivation: The OS used to build netty-all is irrelevant to the system using `netty-all`. The build environment's OS should not impact the dependencies of `netty-all`. The OS used to build netty-all is irrelevant to the system using `netty-all` at runtime. So instead of using `os-maven-plugin` via the `jni.classifiers` property to set dependency classifiers, set the correct classifiers explicitly. Modification: Set classifiers of the dependencies in `netty-all`. Result: Fixes netty#11272 See netty#8097
@normanmaurer Thanks ! |
Motivation: We shouldn't include netty-examples as dependency for netty-all as this will try to pull in all sorts of dependencies which are optional. Modifications: Remove dependency on netty-examples Result: Related to netty#11272
Motivation: 612ab58 did change the way how netty-all was produced by unfortunally it messed up the dependency graph for our native artifacts. This commit reverts changes done by 612ab58 and also clean up the profiles Modifications: netty-all is useable again Result: Fixes netty#11272
Expected behavior
When maven compile (or install) runs on a maven project using both dependencies below, it should not generate errors with dependencies cannot be resolved.
Actual behavior
It generates errors such as:
ERROR] Failed to execute goal on project testNetty64: Could not resolve dependencies for project org.example:testNetty64:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: io.netty:netty- tcnative:jar:${os.detected.classifier}:2.0.39.Final, io.netty:netty-transport-native- epoll:jar:${os.detected.name}-${os.detected.arch}:4.1.64.Final: Could not find artifact io.netty:netty- tcnative:jar:${os.detected.classifier}:2.0.39.Final in MavenCentral (https://repo.maven.apache.org/maven2) -> [Help 1]
Steps to reproduce
Simple pom.xml as below:
maven clean compile
Netty version
Replacing 4.1.64-Final by 4.1.63-Final runs fine.
With 4.1.64-Final:
mvn clean compile -U
In DEBUG mode, I've got the following possibly useful elements:
mvn clean compile -e -X -U
JVM version (e.g.
java -version
)Tried using Java 8 and Java 11
OS version (e.g.
uname -a
)The text was updated successfully, but these errors were encountered: