-
Notifications
You must be signed in to change notification settings - Fork 435
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
azure-keyvault (mssql-jdbc's dependencies) #17
Comments
For Building mssql-jdbc we need azure-core and azure-keyvault for compiling purpose. Are you suggesting adding this exclusion will remove transitive dependency tree ? |
Well yes, for me over here its just the jdbc driver jar file that I need to use, at least for now, not sure in the future what I'll need to connect though Azure SQL Database. |
May I suggest Maven optional dependencies, they seem like a perfect fit for your problem. |
Well exclusion work for now; I just don't know exactly what I excluded myself from using from mssql-jdbc ;-) |
I had the same issue and needed to exclude A note in the README would be helpful. |
@simdevmon , @martinm1000 : I completely agree with you. We will add one section in README related to dependencies and how to exclude those dependencies. |
Thank you for filling this issue. We will definitely add a section in README to explain this. this dependency |
@v-xiangs : I'm only using the jars, I'm not sure how one could exclude 1 class or 2; my main issue here is that unless its officially documented, I can't be sure that I won't get ClassNotFound exceptions in runtime while using the jdbc driver (for SQL Server). But looks like I've been doing it without its deps before maven with no problems. |
azure-keyvault (mssql-jdbc's dependencies) microsoft#17 : Adding section in README related to dependency
@v-xiangs Why not split a project into two modules: core and azure? Then people who don't use extra features would simply use core only. |
@vyazelenko thank you for your brilliant idea, we will definitely think about this. |
I believe that exclusion is the wrong way to go. Forcing everybody that does not use azure (which I believe is the majority of developers out there) to write those ugly exclusions in the pom is just wrong. You should go with the optional dependency solution @marschall suggested. The fix is relatively simple. You just have to write this in the driver pom: |
@gstojsic : Thanks for your suggestion. It's really simple and straightforward. Let me test how it works if any project having dependency on azure-keyvault (Project using keyvault related features) |
@v-nisidh Yes. Projects using azure-keyvault features will have to specifically add the dependency. But that is much better than forcing 10 Mb of jars on everyone else or forcing them to exclude dependencies. Of course there should be a readme section explaining people to add the dependency in their project (pom) if they wish to use azure-keyvault features. |
@gstojsic - before we proceed with deciding to exclude these dependencies from the jar, we are working through the use cases of Azure Key Vault features with the JDBC driver. We'll continue weighing the different alternatives of including/excluding these dependencies and provide an update. |
@ajlam Of course you have to weigh the pros and cons. It would be nice to hear from other developers reading this. What do they think? Which solution do they prefer? |
@gstojsic Well if those Azure deps were already existing before this lib was under maven, most developers already didn't use or even know about those dependencies, so I would vote for the Optional option. |
We just hit this problem. The Azure dependencies transitively depend on Jersey 1, which is classpath-incompatible with Jersey 2. Since our application relies on Jersey 2, we had to exclude Azure dependencies. We'd definitely appreciate splitting the Azure support into a separate package. Another option to consider is whether it's possible to bundle the required Jersey and/or JAX-RS classes into a private namespace, much like what was done in the Testcontainers project. |
@martinm1000 We revisited this issue and really liked @gstojsic 's idea to make the dependency optional. We submitted a PR #148 for this and also updated the ReadMe file in the PR. Please let us know if it works for you. |
Thanks @marschall @martinm1000 . Closing this issue with #148 |
The JDBC team would like to learn more about the Java & SQL Server configuration you're using to help guide priorities going forward. If you have a few minutes, would you please take this survey? |
Not sure if this is alright, but I needed to exclude azure-keyvault since I do not use it, and this dependency was adding a lot more of its own deps to my final build.
Can you clarify those dependencies ? Maybe add this to the project README ? Thanks !
Dependency tree report:
The text was updated successfully, but these errors were encountered: