A terrible idea

13 views
Skip to first unread message

Matt Savage

unread,
Oct 22, 2013, 4:50:54 PM10/22/13
to shave...@googlegroups.com

We had to pull the Amazon S3 libs into a project today.

They use Spring.

As you can imagine, working out the deps was a pita.

Would it be crazy to write a tool in sm that traversed a given pom's dependencies, just using repo1, and generated a .dependencies file? Possibly including regular checks with the user to see whether they want to pull in optional dependencies?

Also, I haven't tried this but does sm care about whitespace at the beginning of lines? Could I nest dependencies using indents to indicate hierarchy? Just as rough documentation- no semantics implied.

Stuart Miller

unread,
Oct 22, 2013, 5:24:18 PM10/22/13
to shave...@googlegroups.com

It really feels like some of those repo sites should have done this already, but I had a look and couldn't find anything apart from a blog post saying "why doesn't the server calculate all the dependencies for me and send it back in one zip" (which sounds reasonable really, given how long it takes for Maven to download the internet.

Doing this on the client side sounds an awful lot like mvn dependency:tree. That would also have the benefit of resolving the conflicts for you, so maybe all you would have to write is one line of sed?

--
You received this message because you are subscribed to the Google Groups "shavenmaven" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shavenmaven...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Daniel Worthington-Bodart

unread,
Oct 22, 2013, 5:54:37 PM10/22/13
to shave...@googlegroups.com

What was wrong with your s3 goodness in utterlyidle?

I'd probably do something along the lines of:

Support downloading poms
Support translating poms to dependency files (non transitive)
Support recursive / flatMapping the whole thing to get transitive

On 22 Oct 2013 21:50, "Matt Savage" <matthew...@gmail.com> wrote:
--

Daniel Worthington-Bodart

unread,
Oct 22, 2013, 5:59:15 PM10/22/13
to shave...@googlegroups.com

Stuart, good point around resolution. I'd make not fix any thing, so you get multiple listed in the file it generates. Then you delete the ones you don't like.

I'm not sure if I want this in SM mind, I really don't want to make this easy as that's the whole point of SM. All the pain is up front and it encourages you to not use massive transitive frameworks

Matt Savage

unread,
Oct 22, 2013, 6:12:28 PM10/22/13
to shave...@googlegroups.com

UI doesn't support SQS signing yet and we need to get some stuff delivered this week. We'll be replacing it real soon.

deptree + grep might do but it'd be nice not to need maven at all. Also, I'm not sure I _want_ maven to resolve my dependency conflicts. I just want it to list the dependencies and let me work it out.

Haven't looked at a pom for a while- I'll have to check whether it's madness to consider not using deptree.

On 22 Oct 2013 22:54, "Daniel Worthington-Bodart" <d...@bodar.com> wrote:
>

Matt Savage

unread,
Oct 22, 2013, 6:18:51 PM10/22/13
to shave...@googlegroups.com

> I'd make not fix any thing, so you get multiple listed in the file it generates.

+1

> I'm not sure if I want this in SM mind, I really don't want to make this easy as that's the whole point of SM

I'm with you. It's interesting that I only ever want this stuff when I'm using a project with badly-managed dependencies. I wish everyone offered a nodeps version; or a fewdeps version that jarjars everything they don't expose.

But, on the other hand, if my project _has_ to depend on one of these horror shows, sm ends up punishing me for something I can't control and haven't chosen.

I definitely don't want to encourage it, and I like the feedback that not supporting transitives gives me. On the other hand, I'd also appreciate a helping hand when the world won't cooperate.

I might just release it as a separate project and add a link in the sm wiki.

Daniel Worthington-Bodart

unread,
Oct 22, 2013, 6:23:46 PM10/22/13
to shave...@googlegroups.com

Well maybe if it just produces the dependency file and then you check it, that might be okay to go in SM

Matt Savage

unread,
Oct 22, 2013, 6:57:51 PM10/22/13
to shave...@googlegroups.com

Yeah, definitely no support for anything but explicit dep files. Just a helper tool, and hopefully a very small, simple one that doesn't try to support too much.

I'll hack it together when I next get some time and we can see what it looks like.

Reply all
Reply to author
Forward
0 new messages