-
Notifications
You must be signed in to change notification settings - Fork 886
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
build.gradle: set miniDnsVersion version to the latest 1.0.x #611
Conversation
Thanks for your contribution. However, I wonder if the real problem isn't Maven bailing out. I've looked at igniterealtime/Spark#866 (comment) where you write
So this issue seems to be that something is referencing 1.0.3-SNAPSHOT. Wouldn't identifying the causing dependency and fixing it be the real fix? Smack (and all my other Java projects) use ranged dependencies, if the dependency I guranteed to not break API withing the ranged version specification. This is true for MiniDNS, and, fwiw, JXMPP. This always to consume patch-level releases which often carry important fixes. If you want to pin a dependency to a certain version, then this is usually possible with the help of the build system. I know that Gradle supports this and would be surprised if Maven did not. With the information I have at the moment, I am unfortunately inclined to reject this change. But thanks again for submitting it! |
I tried to see maven dependency tree but it didn't show who referenced which version. |
I tried to
The I replaced range and with both version the build was successful. But I tried a second time and build failed. I removed the The Other problems: In the I had to comment out the android modules because I'm not interested in it. In order to work on the library I don't want to install the AndroidSDK. Maybe it's possible to add some option for this? |
For what it's worth, I'm frequently hit by this issue (unable to download version 1.0.3-SNAPSHOT of minidns) outside of Spark. Just refreshing the Intellij workspace of a project that uses Smack can trigger it. It's a major pain. |
I suspect that contributing factors include:
|
A complicating factor is that the repository that is misbehaving (Sonatype's snapshots repo) is the same one as where Smack publishes its snapshots. If we want to consume Smack's snapshots, you will want to enable the repository (which is likely why this was in Spark's POM). |
Oh, right, the Intellij also tries to resolve deps. This may explain why the build is blinking. I'm not sure how to better to fix this, just hope my solution will be enough
|
I have been talking to Sonatype's support engineers. Per my request, they have modified the repository to remove the faulty reference to the non-existing 1.0.3-SNAPSHOT artifact. Hopefully, this once and for all resolves this problem. I'm not sure if this faulty metadata gets cached in your local .m2 repository, or, if it does, if the changes from upstream automatically bubble down to your local copy. It may be needed to manually remove |
Great, thank you Guus!
I hope they'll do something to avoid such problems in the future.
And still, I believe it would be more stable to not use ranges and always upgrade deps manually with separate minor version increase.
The PR can be closed or merged, anyway the specific issue was solved.
|
I'm not a fan of ranged versions either, but I'll leave that up to @Flowdalic |
Another advantage of ranged version is that dependent releases do not require a Smack release. For example, Smack uses two libraries I also maintain, jxmpp and MiniDNS. Not using ranged dependencies would mean that for every patch-level release of those libraries I would need to create a Smack release for Smack to benefit from the patch-level release. So, yeah, I am really sold on ranged versions. This PR is also just an indirect solution for the problem the PR tries to solve. It seems now that the right solution was deployed, thanks to Guus. |
The minidns dependency use the range to pick the latest version in range of 1.0.x.
This caused some problems in the Spark that I fixed igniterealtime/Spark#866
Anyway, the minidns now released an alpha version of the 1.1 so it shouldn't be any new versions in the 1.0.x series. So here I changed the range to the latest 1.0.5.