Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Improving the Maven Repository

Brett Porter provides a few steps on how you can help improve the Maven repository. My advice? Convert your project to use Maven 2 as an experiment. That's what I did with Equinox 1.5. In the process I found 28 issues with POMs at ibiblio. If you're using Ant, you can use Maven 2's Ant Tasks to download your dependencies w/o going "whole hog" and converting everything to M2.

Yes, this is a somewhat twisted attempt to convince you to endure the same pain I went through. The best and worst part of Maven 2 is its transitive dependencies. If they can all be updated to be accurate by the project owner's - the problem will be solved. But how do you convince project owner's to do that? I wonder how good Ivy's metadata is?

Why is this whole debate important to you? Because Ant 1.7 is (supposedly) going to have a dependency download mechanism. It's likely you'll use it because it is a nice convenience. Steve Loughran is one of Ant's primary developers and he has this to say:

I do find the m2 tasks and repository hard to work with, and am debating a quick investigation of Ivy. Maybe focusing on one thing -library management- has let them do a better job than trying to be all of a next generation build tool.

The "best dependency downloading tool" debate is heating up. I wonder which one will win Ant Developers over? If it's M2, I can see the Apache folks smiling. However, if it's Ivy - at least we'll know it's not a political decision. It's because it simply does a better job. May the best tool win.

NOTE: I've yet to try Ivy, and don't know if I will. Especially now that I've fixed all the POMs I use at ibiblio.

Posted in Java at Jan 05 2006, 08:12:43 PM MST 9 Comments
Comments:

I'd certainly like to take the opportunity to thank you for bearing with the early grief and driving a lot of the improvements, especially in some of the more popular and problematic projects. It was a great help.

For Ivy, I can repeat what I commented on Steve's site: "As for Ivy, focusing on library management does make them strong in that suit, and we've had discussions with them in the past. They still very much rely on the existence of the Maven repository to function.

"Maven is still with [Ivy] feature for feature, and I found similar usability problems using Ivy when I had to build WebWork. I'd be interested to hear your experiences with it. As far as the repo goes - they have very few transitive dependencies centralised (about 40), so they obviously work well if you can find what you need, because they are hand crafted, but I'm not sure that it scales to large numbers of artifacts, or letting projects do it themselves."

I'd add that one area Ivy probably helps right now is that they utilise configurations to give you multiple views over a dependency's dependencies. This gives you more flexibility, but I'm unconvinced this would scale to a larger number of projects.

We can actually achieve the same thing with Maven profiles, but to this point we haven't taken advantage of it. I think we can make that a bit easier to do in the 2.1 release to ease that particular pain point.

Posted by Brett Porter on January 06, 2006 at 03:42 AM MST #

28 issues? Very nice! You already know it, but I will say it again, you are a great guy.

Posted by Eduardo Rocha on January 06, 2006 at 05:04 AM MST #

<p class="quote"> Because Ant 1.7 is (supposedly) going to have a dependency download mechanism.

No, it won't. Steve started to implement one but realized the Maven 2 tasks where at least half way where he wanted to go. He decided to stop his efforts and focus on improving the existing solutions.

So over in Ant land we collectively decided against implementing yet another dependency download mechanism but instead encourage our users to give the Maven2 tasks, Ivy or any of the other alternatives a try (dpml.net's Depot for example).

Posted by Stefan Bodewig on January 06, 2006 at 10:19 AM MST #

Thanks for the clarification Stefan - much appreciated.

Posted by Matt Raible on January 06, 2006 at 02:12 PM MST #

I'm using Ivy for several projects, and I love it. The public repositories (Ivy and Maven) leave a lot to be desired, but I've found it works extremely well when I set up my own repositories. I get a lot more control, and I feel more secure downloading from my own server. Ivy's "configuration" feature is excellent for doing deployment-specific builds. It creates nicely organized library directories for my customized web deployments For example, I have one configuration set up for deploying with a SQL logger; only that configuration contains the p6spy libraries.

Posted by Aaron Longwell on January 06, 2006 at 06:05 PM MST #

Just to be clear, Ivy doesn't depend on the Maven repository. We use Ivy at work with an internal repository that's driven from a version control system. WebWork uses Ivy and, I believe, the dependencies are all driven from the OS repo. I like Ivy because it does transitive dependencies very well (which Maven lagged on, I'm not sure if M2 fully caught up or not) and it stays out of your way. Maybe the M2 ant tasks do this as well, but it's too late for me, 'cause I've got Ivy working... Plus, the dependency report from Ivy is excellent.

Posted by Jason Carreira on January 06, 2006 at 07:06 PM MST #

Ivy... Maven... it makes no difference to me as long as someone deals with the dependency repository problem. We should treat sites like ibiblio a bit like wikipedia: let the public sort things out and allow privileged users (project owners, admins, etc) lock certain jars down. Right now, ibiblio is some sort of unknown place that only people well connected to the Maven team or lurkers on irc.codehaus.org know how to update. Until that happens, I am happy to use Ivy and my own local repositories with the ibiblio site as a backup (which you can do in Ivy).

Posted by Patrick Lightbody on January 07, 2006 at 01:32 AM MST #

I haven't used ivy but the m2 folks are just a swell group of persons building a really slick platform. It's true, the repo is a bit problematic but with delegation of the packages through a web of trust and with more and more people turning towards maven2 it'll become very reliable. In the end what m2 is all about is empowering projects and that's just so much broader issue then just transative dependencies, plus, m2 and it's plugins are getting better all the time. I've started my own little project and I'm already seeing all the great effort that has went into m2 and it's having a positive effect on me acquiring new technologies faster, my coding making my code better and my project management as a whole. Perhaps a maven-ivy-plugin could be made that would help transition between ivy and maven2 projects and vice versa? I just don't see any good that would come out of a build tool war and the risks involved would be to slow down all the enthusiasm that's on the j2ee and java scene. I mean we might be very slow moving lot and seem "old" compared to the Rails and Asp.net guys but what I like about this community is that we do things that last, with vision and architectually sound. I prefer my house on solid foundations, thank you very much (I personally program in C# as well, it's only weakness is that it lacks the community and open source frameworks but the platform as a whole is very competitive and mature).

Posted by Srgjan Srepfler on January 07, 2006 at 02:40 AM MST #

I am currently using Ivy, like it a lot. We're not using ibiblio, instead i've setup our own internal jar repository. I've played a bit with maven 2.0 but decided not to use it. The reason for this is that i think ivy is easier to integrate into our IDE (jdeveloper). The ivy task in my build file copies all required jars to a lib directory in my project. So it's very straightforward to tell the IDE to look into this lib directory for dependencies. As far as i know maven doesn't copy the required jars into one directory. Maven integrates with IDE's by generating project files (.jpr, jpx, etc). I don't think this kind of maven integration for jdeveloper is currently available. Also, i actually prefer the solution where i tell my ide to look in one directory, so i don't have to regenerate the project description file.

Posted by Andrej on January 08, 2006 at 09:17 AM MST #

Post a Comment:
  • HTML Syntax: Allowed