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.

Maven 2 Alpha - looking good!

I saw that the Maven 2 Alpha was released today and decided to give it a spin. The two features in Maven 2.0 that look compelling to me are 1) speed and 2) transitive dependencies. I've been using Maven 1.x on my current project since January and I still don't like it. Why? It's dog slow on my PowerBook (but tolerable on my Windows box) and you have to specify a shitload of dependencies when developing an app with Struts+Spring+Hibernate.

Maven 2 looks good, and it does seem to startup as fast as Ant (at least on Windows). Just typing "m2" completes in about a second, and so does typing "ant". Typing "maven" takes about 3 seconds (even though it reports it only took 1 second). I look forward to seeing Maven 2 evolve. I wonder if we should rewrite our POMs for Maven 2 (we current have 11 sub-projects)? We'd probably be a pretty good test-bed, but I don't think Maven 2 supports all the 1.x plugins - does it?

I doubt I'll use Maven 2 with Equinox or AppFuse this year - mostly b/c I don't expect it to be released until 2006. I do like the looks of Ivy and I've considered re-writing AppFuse's monstrous build.xml file using JAM. If I were to use Ivy, I think I'd still release with all JARs in a local "lib" directory. The nice thing about Ivy is it would give users the option of checking JARs into source control (currently, it's required).

Even after using Maven for several months, I still like local JARs better than downloading. It does make a lot of sense in a multi-project environment though.

As for JAM, I don't like it for two reasons: 1) it uses the non-transitive dependency listing like Maven 1.x and 2) it requires you install JAM and set a $JAM_HOME. I'd prefer to keep AppFuse to one build tool - Ant or Maven (or both).

I suggested a large refactoring of the build process (and collapsing of the source trees) for AppFuse 1.9, but it was rejected by users for the most part. Their opinion: the build process works great, we like it - work on other stuff that's more important (code generation, tools support, etc.). Another thing that's suprised me about AppFuse users is the relatively small number of folks that have requested support for appservers other than Tomcat. To date, I don't think I've had a single Resin or Orion request, but I've had plenty of WebLogic, WebSphere and Sun App Server requests. The most compelling reason to use JAM for building/deploying/testing AppFuse is for its server support, but if I don't need it, why add the complexity?

I guess some things just work, and there's no reason to fix them if they aren't broken. Maven 1.x is not one of those things IMO. It's good to see the improvements coming in Maven 2.

Posted in Java at Apr 08 2005, 01:52:10 PM MDT 4 Comments
Comments:

I haven't seen anyone that ever converted their builds to using Maven ever go back to using Ant. We have over two hundred projects that get built regularly so having a seperate build file for each one was never an option. Before Maven, we had an shared Ant file that each project used. Since switching to Maven, we have had very few issues with our build system. The best thing about Maven is that all of your existing Ant code can be used if you want.

Most of the complaints I have seen other people make about Maven revolve around 1) speed 2) Jelly 3)docs. The speed problem isn't too bad if you have a speedy machine, but it is nice to here that it is fixed in 2.0. I've never actually ran into any problems with Jelly either. We had to write a few Maven plugins to handle application deployment, but didn't run into any issues. All of the custom goals for Maven that come out of the box are written in Jelly and are in CVS, so you can use them as base examples to write custom plugins. I haven't looked into the new plugin architecture for Maven 2.0, but I know there are supposed to be other options.

I can see why some people would be concerned with taking the plunge to get started with Maven (the docs do not make it especially easy to pick up), but I really can't see the justification in writing Ant code for single projects that never gets reused.

Posted by Eric Hauser on April 08, 2005 at 08:37 PM MDT #

I agree with Eric Hauser. I read almost all posting on Mavenizing the Appfuse, and found no interest towards maven in Appfuse community, however, in a large scale enterprise application, Maven is the build tool.

Posted by Mike on April 08, 2005 at 08:53 PM MDT #

Thanks for your encouraging post Matt. Sorry Maven 1.0 gave you trouble, but I hope we're on the right track to get past all that with 2.0. You're right - very few Maven 1.x plugins are supported under Maven 2.0 yet (http://maven.apache.org/maven2/maven1.html#m1-plugins). We're happy to work with any early adopters to help them get the support they need, though. We also have a simple POM converter which we can publish for general use - so if you are ever interested in giving it a try, let us know. We will be releasing frequent updates, so if it is not there for you yet, take another look in a month.

Posted by Brett Porter on April 09, 2005 at 01:39 AM MDT #

Eric, I rolled back to Ant from Maven 1 both on our internal development and at a client's site. The issues surrounding multiproject and the rigidity of the project directory structure were the main causes.

However, I'm enthusiastically writing plugins for m2 and jumping on the early adopter bus for the reasons pointed out in this posting. Transitive dependencies is a must have and it doesn't hurt that the plugins are java centric now. So far, I've been using it for two weeks, have written three plugins and have been very impressed with the project's direction and activity.

Posted by Kris Bravo on July 16, 2005 at 07:05 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed