Matt RaibleMatt Raible is a writer with a passion for software. 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.
You searched this site for "maven". 270 entries found.

You can also try this same search on Google.

How do you sell good technology to average developers?

I received some interesting questions from someone who attended my talks at the Spring Forward conference last week. Below are the questions and my responses:

One of the things I'm working through in our hidebound stick-in-the-mud biggish company is: if you concoct a brilliant framework around the really right technology, how do you make it usable by mere mortals, that is average to below average developers?

Document, document, document. Assume nothing when you write the documentation (on a wiki or whatnot). Newbies love step-by-step tutorials. If your kick-ass framework is any good, you should be able to automate and hide complex pieces so they never need to know about them until they're interested.

I think AppFuse really helps in this regard, but I'm dealing with people who most naturally will use ColdFusion or ASP with no separation of concerns whatsover. They are are pretty blown away by lightweight J2EE and thus tend to reject it out of hand as being hippies' wet dreams.

I had a class a couple weeks back that was 1/2 PHP developers. They didn't like the idea of Java either - mainly because they're used to doing UI development and such. PHP, CF and ASP developers are UI developers that would prefer not to compile/deploy code. So you need to do things that make their job easier and allow them to be UI developers. Create a Generic DAO and Manager using Generics that allows them to CRUD any object - so they won't need to write backend code. Heck, you might even separate responsibilities so they're doing mostly web development. Of course, with web development, you'll still need to write Controllers and such. If you can use something like Maven 2 + the Jetty Plugin, there's no deploy cycle. Save, refresh your browser and voila - change is there. That's what these folks are used to and that's what they want to see when developing Java. Getting rid of the deploy cycle is an excellent idea IMO.

What do you think? How do you make Java development easier for developers of a company "switching to Java"? I've had a fair amount of clients in recent months switching from .NET or PHP to Java. It's a rare case that developers are actually happy about the move. Of course, when I'm done telling them about all the great frameworks and tools they can use, they're even more petrified. There's just too many for them to keep track of, especially if they're new to the stuff. AppFuse definitely simplifies things, but I doubt it makes development as simple as plain 'ol PHP or .NET. Then again, after you learn how to use the frameworks in AppFuse, it can be extremely productive to develop with (and scalable to boot!).

Posted in Java at Oct 06 2006, 07:31:27 AM MDT 3 Comments

Spring 2.0, AppFuse and Equinox

Spring 2.0 was released today. I hope to do an AppFuse 1.9.4 and Equinox 1.7 release in the near future - both containing the latest and greatest stuff from Spring 2.0. Hopefully the 2.0 release shows up in the Maven repo (here or here) in the near future.

Thanks to Interface21 and all the Spring Developers for such a stellar product.

Update: More Spring-related releases - Spring Web Flow 1.0 RC4 and Acegi Security 1.0.2.

Posted in Java at Oct 03 2006, 10:14:00 AM MDT 8 Comments

New weather.com site built using AppFuse

From Jeff C (a Sr Developer for forgetaway.com, a new unit of weather.com) in Lightweight Java Development with Webwork, Spring, and iBatis:

Our new site, ForGetaway.com, launched 2 weeks ago, and its built on WebWork, Spring, and iBatis. Using those 3 frameworks as the backbone of the site was a great experience. I think that combination of frameworks can be considered lightweight, especially from a development standpoint.
...
Even the development/testing process is quick. Thanks to Matt Raible's AppFuse (which was used to get this app started), we have a sweet build.xml file that allows us (on our dev machines) to reload our app by having the build script talk to tomcat. So, even when a properties file or java class or static field changes, its just a matter of running the reload task in the build.xml file and tomcat reloads the app with all changes in under 5 seconds. Yeah, rails is probably quicker, but i can spare 5 seconds of my time to let my changes get reloaded by tomcat.

Reloading your application in Tomcat to see your changes sucks. However, AppFuse 2.0 will allow you to use the Maven 2 Jetty Plugin, which aims to eliminate the whole deploy cycle. This plugin is powered by Jetty 6, which has been rewritten for Continuations, NIO, Servlet 2.5. Hopefully we'll start to see more appserver plugins written for Maven 2.

I love hearing success stories like Jeff's. That's why I (and many others) work on AppFuse - to simplify Java web development. We know that it's more painful to develop web applications in Java than in scripting languages, but we continue to do it because tools like AppFuse make it enjoyable. Even though tools and languages are important for simplification, I believe that most project's success is determined by people. If you have good people, effective processes and a lack of politics - a project should have no problem being successful, regardless of the tools.

Did you know the new SourceBeat site is also powered by AppFuse? We chose the WebWork+Spring+Hibernate combination and were quite pleased at how easy it was to develop everything. We had 90% of the site done in the first two weeks of development.

In other AppFuse-related news, the demos have been running solid for 70 days straight. I'll admit that's not a very log time, but it does prove there's no memory or connection leaks in the software. ;-) The number of currently active sessions is as follows:

The default session timeout is set to 10 minutes in AppFuse.

Posted in Java at Sep 28 2006, 11:40:55 AM MDT 6 Comments

Maven, Cargo, Struts 2 and working outside

Life is pretty good today. I'm currently working outside - in a courtyard area near the 30th Street Station in Philadelphia. There's 4 restaurants in the courtyard, all with outside seating. It's 72°F and beautiful. I plan to work for a few hours, then hop on the 5:00 train to NYC.

The reason I'm writing this post is to point out a few useful tidbits I've picked up today. First of all, Andrew Glover has written a developerWorks article on Cargo titled In pursuit of code quality: Repeatable system tests. In this article, he shows how to use jWebUnit as well as DbUnit. While the article uses Ant, Andrew mentions that Cargo also works with Maven (and has a Java API too).

Equinox uses jWebUnit, Maven and Cargo, but it doesn't currently support running Cargo from Maven. The major reason for this is I tried to automate running jWebUnit tests from the antrun-plugin and couldn't get it to work (I only tried for 10 minutes). Does anyone have any insight for including jWebUnit tests alongside your regular tests, excluding them from Maven's "test" phase, and running them in the "integration-test" phase? The good news is AppFuse 2.0 uses Maven as well, and we have Cargo + Canoo WebTest working just fine. BTW, did you know that Mergere’s Maestro (a free product) includes Equinox? If you're looking to learn Continuum and you're familiar with Equinox, downloading Maestro is probably a good start.

Speaking of web testing, I've been playing with Selenium lately. I was able to easily integrate it into Thomas and I's Spring 2.0 Kickstart application thanks to these Maven and Selenium integration instructions. The only issues I've run into so far are specifying an initial URL that works in Selenium core as well as Selenium IDE and integrating Selenium with CruiseControl. If you're interested in learning more about Selenium checkout Catching up with Selenium on InfoQ.

Last, but certainly not least, Struts 2.0 was released today. I've already integrated this into the Struts version of AppFuse 2.0. If you like living on the bleeding, you could dig in and try it out today. Unfortunately, I haven't had a chance to put a whole lot of documentation together yet. I hope to install Confluence on appfuse.org sometime this week to start documenting how bad-ass AppFuse 2.0 will be ;-).

Speaking of 2.0 releases, wasn't Spring 2.0 Final supposed to be released yesterday?

Posted in Java at Sep 27 2006, 11:40:42 AM MDT 7 Comments

Lessons learned from using VMWare, Ubuntu and Maven 2 in a Training class

Last week I taught a Spring 2.0 training class in Milwaukee, Wisconsin. This class was different from previous classes because I made a VMWare image of Ubuntu for students to use when doing the labs. They also used Maven 2 and all the computers were without an internet or network connection (yikes!). Eclipse was used for the IDE and Maven's Jetty plugin was used for any web development activities. I'm pleased to say it worked out pretty well, but there were a couple of things I thought I'd write down for others trying this approach.

First of all, this was my first experience using VMWare in a classroom setting. In the past, I've had students setup their own environments. I've also built machines at the training facilities - and had their staff ghost the image for students. I think having students setup their own environments is a good idea, but I've had mixed results. There's always some folks in class that have no interest in knowing how things are setup and would rather everything "just works". These folks are usually disappointed when they have to spend 20 minutes installing a bunch of software. There's always a couple who don't read the instructions thoroughly and install things in the wrong locations. And then you have the folks that want to work on their Linux or OS X laptops. I can generally work it all out b/c I know Windows, Linux and OS X - but this is generally not a good avenue for instructors unfamiliar with multiple operating systems.

The second method - building a machine at the training facility (or client site) and having it replicated - works very well. However, it's often difficult to get private courses (at client sites) to use this method, and students don't get to walk away with anything. The VMWare option, however, allows you to burn the image to a DVD and give students everything from the course, including the computer they worked on.

I've thought of using the VMWare earlier this year, but never seriously considered it until I spoke with Howard Lewis Ship at this year's OSCON. He said he'd used it for a couple classes, and it worked great. He gave me a sample DVD and I used it to start creating my DVD (thanks Howard!). The nicest thing about using this DVD was we were able to brand it for students, as well as setup all 18 machines in the classroom in less than an hour.

Here is a list of issues I found with using a VMWare setup in the classroom:

  • I downloaded the Ubuntu 5.10 image to begin with. After upgrading to 6.06 and installing all the standard Java development software (less than 100MB), my image was 8GB. I was able to shrink it to 4GB and zip it to 2GB, but it's still quite large. Maybe installing 6.06 from scratch would slim things down.
  • On my home machine (dual core AMD with 3GB RAM), the VMWare image ran very fast, with no noticeable performance issues. I used VMWare Server at home, and VMWare Player during the class because it didn't require a (free) serial number. I had it set to 768MB of RAM at both locations, but the machines were noticeably slower (and close to unusable) in the classroom. The classroom machines were 2.5GHz with 1.5GB of RAM.
  • Since I knew most developers would be Windows users, I gave students the option to have me build their Windows environment. One student took me up on the offer and the only painful part was getting the Maven repo to the students machines. I had the Windows setup software on the DVD, so I was able to use that, but then needed to copy my local Maven repo to a thumb drive to transfer that. In the future, I'll put the Maven repo (only 36.5 MB) on the DVD.

All in all, using VMWare in the classroom turned out to be a good experience. It's likely we'll use it for most of our classes, but we'll also fall back to setting up a Windows environment for those students who don't like Ubuntu. As far as using Maven 2, it's been working great too - most of the students didn't even know it was used b/c they did everything in their IDE.

Posted in Java at Sep 19 2006, 11:29:45 AM MDT 4 Comments

Integrating Hibernate Validator with Spring MVC

Remember when I wrote about Better client-side validation with Prototype back in May? Ted Bergeron responded to my post with the following comment:

Now that I am using Hibernate Annotations Validator, I stopped using commons validator. You can use the hibernate validator without using hibernate for persistence. I wrote some jsp 2.0 tag files to handle binding my form fields with spring mvc, and I use reflection to check for the validation annotations. This makes it no work to have a js calendar for all Date fields, or have class="required" added to all fields that have a @NotNull annotation. I'd be happy to send you the code for appfuse 2.0.

Ted followed up by sending me the code. I took a look at it, and reviewed a well-written PDF he'd written for his work. I told him he should publish it as an article, hooked him up with some folks at IBM developerWorks - and voila! Ted's article, titled Hibernate can meet your validation needs was published yesterday. Nice work Ted!

I'm looking forward to trying to leverage Hibernate Validation annotations for all the web frameworks in AppFuse. Should be interesting hacking into the cores of the frameworks to modify how their validation engines work.

Posted in Java at Sep 13 2006, 11:17:46 AM MDT 14 Comments

What's a good portable USB Drive?

After finding Mark's HOWTO Rip DVD Movies To Your iPod Using Free Software, I've started ripping some DVDs to my hard drive. On the list: Top Secret, Old School and Office Space. I imagine my hard drive will fill up pretty fast, so I'm in the market for a portable USB (or Firewire) Drive. Know of any good ones? I'll probably head down to the Apple Store tomorrow and pick one up.

Monday I'm heading out on a whirlwind trip to Milwaukee, followed by a weekend in Vegas. I'm teaching a class where we use Maven 2, so it might be a good idea to take the Maven repo with me. Especially since it's rumored the classroom won't have internet access. The good news is I have an Ubuntu VMWare image that already contains all the necessary JARs. Hopefully I can convince all the students to use it.

Update: In a perfect world, I could use my 60 GB iPod as a fat USB drive. However, it doesn't just "plugin and work" on a Windows box like thumb drives do. Rugged

Update 2: I ended up getting the LaCie Rugged All-Terrain Hard Drive. It was a little pricy, but it's tough to assign a value to a backup drive. With 120 GB, I should be able to use SuperDuper! to clone my hard drive and have plenty of room for movies.

rsync -v -t -l -r ftp.ibiblio.org::maven2 ~/.m2/repository

...is a wonderful thing. Looks like the Maven 2 repo is currently at 7.28 GB.

Posted in Mac OS X at Sep 09 2006, 05:16:48 PM MDT 11 Comments

Integrating Compass with AppFuse and the Display Tag

ChenRanHow has written up a detailed tutorial on how to integrate Compass with AppFuse and the Display Tag. From his mailing list post:

Thanks ChenRanHow!

Another great tutorial was recently written by Luciano Fiandesio. If you're looking to use Quartz, checkout Luciano's (well styled) AppFuse and Quartz tutorial.

In other AppFuse news, FanYang has started translating the documentation to Japanese, Mike McMahon has converted the appfuse-hibernate module to annotations, CruiseControl is continually testing, Mike Horwitz has solved most of the "Maven doesn't read a WARs dependencies" issue, and Scott Ryan is still hard at work on the code generation plugin. Even better - we've asked Scott to come aboard as a committer and he's accepted. Welcome aboard Scott - we appreciate all the work you're doing.

As far as progress on AppFuse 2.0, we're almost done with the Maven 2 conversion. The only thing left is figuring out how to get Mike's maven-warpath-plugin to hook into the Eclipse and IDEA plugins to they generate project files correctly. After that, it's time to start on documentation. I'm still torn on if we should use Confluence or DocBook. However, after looking at Spring's documentation for the past week, I think DocBook is probably the better choice. Then again, Stripes' Confluence Wiki looks nice and organized.

What do you think? What's the best way to write documentation for an open source project? Which system do you prefer to read? From experience, I prefer reading Spring's documentation over trying to find stuff in WebWork's wiki.

We've had great success with AppFuse users contributing to the documentation via a wiki, and I'd hate to create a documentation system that gets away from that. Maybe a DocBook/Confluence combination is the way to go? It looks like the CeltiXFire folks are having a similar debate.

Posted in Java at Sep 09 2006, 12:51:40 PM MDT 6 Comments

Continuum vs. CruiseControl for Maven 2

I spent some time this past weekend getting automated builds setup for AppFuse 2. Since the project now uses Maven 2, I figured I'd give Continuum a try. I pointed it at my pom.xml in SVN and expected everything to work out-of-the-box. No dice. It seems that Continuum reads the artifactIds instead of the module names for sub-project resolution. To workaround this issue, I'd basically have to rename all my sub-projects to have an "appfuse-" prefix. Doesn't that violate the whole DRY principle? Sure, there's projects that do this, but there's others that don't.

Since I didn't feel like renaming the modules/directories in SVN, I gave CruiseControl a try instead. It took a bit of elbow grease on my part, but I ended up with a config.xml file that works splendidly. It seems somewhat ironic to me that the CruiseControl works better with Maven 2 than Continuum does.

Posted in Java at Sep 05 2006, 03:29:04 PM MDT 28 Comments

AppFuse 2.0 Status

Last week I managed to get AppFuse to compile with Maven 2, this week I got all the tests passing. This week, I struggled with Maven's WAR dependencies and how AppFuse will be used by end-users. It was frustrating, but I think I got most everything figured out. Unfortunately, there's still many issues to be sorted out.[Read More]

Posted in Java at Aug 26 2006, 02:41:26 PM MDT 7 Comments