last day (15 days later) » 

17:15
0
A: Maven how to exclude dependecy which appears multiple times

carlspringAs @JF Meier said, there is no real way to exclude it from all the transitive dependencies. If the problem is that it's causing a conflict with another version of the same dependency, you override this, but explicitly defining the dependency with the version that you're interested in. This way, ...

Usually, for overriding versions, I would use <dependencyManagement>.
Absolutely! :) However, sometimes you might have a dependency coming from multiple transitivie dependencies each bringing a different version of it and sometimes fixing the mess might be easier with a more brutal approach like defining the dependency explicitly higher up in the dependency graph.
But, <dependencyManagement> already overrides all transitive dependencies. What is the advantage of using an explicit dependency?
You mean if you define the dependency (that you want to be excluding) under a <dependencyManagement/> section?
I mean that if I want aws-java-sdk-s3 in version 2.0 throughout my transitive dependencies, I would add an entry to the dependencyManagement section and would not define aws-java-sdk-s3 as direct dependency (unless, of course, I also use it directly in my source code).
17:15
I was actually referring to the case where several different dependencies could be bringing different versions of aws-java-sdk-s3. This is often the case for things like commons-io, commons-logging and so on (in large codebases this is quite possible and often causes a mess and defining exclusions for each of them one by one might be a massive pain compared to just defining the dependency with the particular version that you'd like to enforce)...
I am talking about the very same thing. If you have various versions of commons-io in your transitive dependencies, just put one <dependencyManagement> entry for commons-io into your project (with the version you desire). This replaces all transitive versions with this version. You do not need to add a direct dependency.
Interesting! I wasn't aware of this neat trick! Thanks! :)
Hi! :)
Our roads here keep meeting every once in a while, I thought I'd reach out and get us introduced!
it seems we work in the same field!
That is true. Nice to meet you!
Likewise!
Thanks for the tip! :)
Maven is full of interesting features and plugins, but it is sometimes hard to figure out the right way.
And, of course, there are different ways to reach the same goal
17:19
Yeah, I've been dealing with Maven ever since 1.x as a Build & Release Engineer. I thought I knew all about this.
hahaha
That is actually a long time. I started about 3 or 4 years ago, when we decided to migrate all projects of our company to Maven.
cool! :)
i started my own OSS project as an alternative to Nexus and Artifactory.
if you're into OSS and Hacktoberfest, perhaps you'd like to have a look?
(it is work in progress, of course... it's not yet production ready, although we're aiming for a proper release, hopefull, in the next few months)
Oh, really? Interesting. We are currently still on Nexus 2, but plan to evaluate Nexus 3 and Artifactory soon because they are the main ones on the market. But, as you probably also noticed, both are far from perfect.
both, as very far form perfect.
i used to be a nexus evangelist
pretty much until the core developers quit in the same day on an april fool's day
our project is not yet ready for production, as i said. however, we have actually made a lot of progress
Thanks.
17:24
in many areas
What are your main differences to the "big ones"?
we're actually looking for more people like us with the proper knowledge to join in and help make it better.
By the way, when did the core developers quit?
we have a very different architecture
and our layout providers are actually all in java.
unlike some of the ones for nexus, for example
they're also all OSS
and will always be OSS.
this way people who actually know the layout formats can always join in and fix things, when bugs pop up.
well, this was some > 4-5 years ago
Sounds like a good idea
17:26
when they were starting nx3
i used to introduce nexus to each company i worked for
and kept reporting issues and suggesting features to them
What made you stop?
but... they don't always accept the ideas
or take forever to look into them.
so, i thought why not start something fresh :)
I will definitely have a look.
What technologies do you use in the project?
feel free to join our community chat
(at the moment we're experiencing some issue with it)
it's all java based, with spring boot/security/etc
Good.
17:31
this is our knowledge base
we need to do more work on the UI
How did you build the UI?
and we need people to help out with implementing the different layout formats, among other things
angular
but... like i said, the UI still needs work :)
I guess, you can say the same thing about the Nexus 3 UI ;-)
we have full support for maven, npm, nuget (protocol v2) and raw. our community is is currently working on the pypi support as well! :)
well... nexus never had a UI in the first place...
and artifactory's UI also leaves a lot to be desired
haha
nice to make your acquaintance!
I understand somehow that Sonatype puts most of their work (apparently) into adding more and more repository types, but a good UI, especially good searching and sorting, is also something important. I still don't understand why none of the major repositories manages to sort versions correctly, like 1.10 is later than 1.2
17:42
if you're interested, feel free to join our channel
Thank you for the interesting information!
and share any ideas you might have
yeah
we think so too
they are making something like $30-50 000 000 a year
i'm sure they can hire a few high end angular guys to do things right
it's very disappointing.
the problem is that nexus and artifactory are constantly fighting who's better
and they try to support more and more layout formats
but they don't really support them.
they're "community contributions"
and then they put them as things they have "support" for.
and they keep competing with each other on things that are stupid.
and not well implemented.
This is probably what the sales department is interested in.
Having lots of "features"
we're well aware that we're not there yet, but we think that we've overtaken Apache's Archiva (they only support Maven (and i think OSGI) repositories and we have 4 so far and a 5th on the way)
But in the end, you also need happy customers. And I doubt that all this makes the customers happy in the long run.
17:47
yeah
Thank again, see you around here on SO.
see you! :)
nice meeting you!

last day (15 days later) »