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.

Will Maven jive with XDoclet?

I'm starting to wonder if Maven will even work for my project. I've been able to setup a lot of dependencies lately and the Maven team has been doing an awesome job of getting my requested jars into their repository. Thanks dIon! The real reason I want to use Maven is to produce a project website. As far as building and running tests, I'd actually prefer to use my Ant script - who I got courtesy of Erik Hatcher.

The problem I'm seeing is that Maven must compile my source to generate the website, and it also seems to be part of the maven java:jar task. And because several of my classes don't exist yet, the compilation fails. Is there any way to tell maven that it must run an Ant task (i.e. ejbdoclet) before it runs its compilation? I'd love to simply tell it to hook into my "package-web" task, rather than trying to compile classes that haven't been generated.

Better yet, is it possible to use Maven simply for downloading jars and generating the website? At this point, it almost seems easier to checkin my 15MB worth of JARs into CVS and use a README file. Maven might be overkill...

Later: Hmmm, maybe XDoclet and Maven can work together. I just found a "maven plugin" in the XDoclet CVS tree. It's description is A Maven plugin to run XDoclet from within Maven. This is very interesting... -- now I need to figure out how to use the damn thing ;-)

Posted in Java at Dec 20 2002, 05:07:17 PM MST 1 Comment

Bailey's at 9:00 a.m.

I was up until 3:00 a.m. last night as a friend was passing through town and stopped by to say hi. He (and his dad) didn't get to our place until 12:30, so I didn't get to visit long, but it was worth the lack of sleep. I got up at 7:00 and went to work feeling like a zombie - only to find out that there was a Bailey's party at 9:00! That's right - one of the ladies made some home-made Baileys and brought it in for everyone to enjoy. I have to say, it's the first time I've had spiked coffee at work!

We just got home from dinner at a friend's house and I am beat. I do have a couple questions and news items though.

  • Is it possible to configure Java to use a proxy server to connect to the Internet. The only way to connect to the Internet at work is to setup your browser to use an Automatic Configuration URL. This means that Struts can't validate to it's DTDs (unless I change to use a System DTD) and I can't use Maven to download jars.
  • Can Hibernate generate classes and it's mapping files from an existing database?
  • Konstantin Priblouda has published a demo of using Hibernate, XDoclet and JBoss. You will need a current version of XDoclet from CVS to run it.

Posted in General at Dec 19 2002, 05:07:51 PM MST 2 Comments

Ant Sucks? Puleeze!

Markus Kohler seems to think that Ant sucks. Personally, I love Ant, so I guess you could say I'm biased ;) I'm posting this in hopes that Erik Hatcher will see it and offer a rebuttal. I don't know that there is one, but I figured it's worth a try.

Posted in Java at Dec 17 2002, 11:11:59 PM MST 4 Comments

Bloody Noses and Struts Chapter Progress

I've gotten three bloody noses in the last 36 hours - and I don't seem to recall ever having them before in my life! Yikes - is the stress getting to me?! Oh well, I'm sure I'll be fine. I read on a website today that bloody noses are way over-emphasized and they aren't a big deal at all.

I'm at 22 pages on the Struts chapter now, doing Exceptions and how Struts lets you declare exceptions in your struts-config.xml -- pretty cool stuff. The bad part is that I've never used them before, so it's kinda tough to write about them - at least in the context of Struts. I tried to use Strut's ApplicationException (now renamed ModuleException) last summer on a client's project - and it was too buggy to use. Now it seems to to work as I originally expected it to, and it's pretty sweet. I do feel like I'm building an application to show functionality though, rather than developing an application to fulfill some requirements, which is unfortunate. I'd rather build an application that employs KISS, and shows the easy way to do things. It's like using design patterns because your manager thinks they're a good idea, but you could get the project done in half the time without them. Sure, your app might not be extendable in the future, but if it doesn't live past 3 months, what's the point?! Of course, I think using the Validator and Tiles is easy, and many developers think that's the complicated part. If my learning curve was up to snuff, Exception and Modules (a.k.a sub-applications) would be easy. Soon they will be, though I still may never use them.

Tomorrow is my last day (for a while) as a full-time employee of Raible Designs. I've certainly enjoyed the last year, but I've missed the office comradery and face-to-face interaction. It'll be good to get back into an office, but I'm sure I'll miss coding in my living room within a week, and wish I was back here.

I'm going to get my mugshot tomorrow for the Wrox book - I've convinced Abbie and Julie to go with me so we can get some good family photos - should be fun. After that, I'm going to fill out the paperwork - W2's - for the new gig, and then off to a project kick-off party! Sounds like my kind of project already!! It's got a good name too - Project Fiji. One of the things I'm looking forward to is implementing Struts and Hibernate (if they'll let me) using XDoclet. I've done it in my sample project and AppFuse (expect a new release in a week), but it'll be awesome to cut our development time in half right away! Especially when the first deliverable is due January 15th!

If I'm good (and I can figure it out), I hope to use Maven on the project as well. It should be interesting to be the primary Java Developer on the project, along with a Web Developer and Oracle DBA. I've always been the web developer - but I've learned so much in the past year and a half (since I met Struts), that I feel more than comfortable being the Java guy. You know what the best part is - I feel like I've learned more from the java.blogs community than I have from studying for certifications, or from any conferences I've been to. Keep it up - learning is awesome!

You know what the better part is? Julie just said to me - "thanks for making all my dreams come true." Enough said, life is awesome - even with toilet paper stuffed up my nose and a chapter that seems like it'll never get done.

Posted in Java at Dec 16 2002, 03:56:38 PM MST 1 Comment

Maven and CVS Repositories

As I woke up this morning, I thought "Maven must have a way to checkout development builds from CVS." So I think I can still use it and get all my needed 3rd-party jars. They all have CVS Repositories and most are hosted by Jakarta or Sourceforge. Now I just have to figure out how to do that.

Posted in Java at Dec 14 2002, 01:08:41 AM MST 2 Comments

New Job, Struts, Testing Frameworks and Maven

I found out this afternoon that they want me for the job I interviewed for yesterday. I'm expecting to start on Wednesday. It's a small team of 3 folks and should be a lot of fun. I'm really looking forward to getting back into an office environment where I can converse with co-workers and such. After blogging for the last few months, I feel like the java.blogs guys are my co-workers, but it's still fun to talk and interact with folks. I never used to like it - I'd bring my lunch to work everyday, and hunker down like a code monkey the whole time - just trying to get my 8 hours in and get outa there. I'd get annoyed when people would stop to talk about their weekend or other random stuff. Now I'm going to be that guy - I'd better watch for the telltale signs of get the hell out of my cube! I wonder if we'll even have cubes? The floor where my interview was had just cleared out a bunch of folks - it was empty when I went in there. When I say cleared out, you know what I mean. Needless to say, there is plenty of space and plenty of computers available -- it'll be interesting to see what I get.

My last project had horrible machines - NT4 Gateways with 4MB video cards and about 700 Mhz. And this was last year!! I had just bought a brand new Dell 8100 P4 1.5 Ghz 2 weeks before I started the gig - so you can imagine my disappointment. And I was running XP at the time, albeit a beta version. But still, I felt like I was taking a huge step back in time. So I brought in my own Windows 2000 CD on my 8th day on the job. It all looked to be going pretty smooth (and the install was about to finish around 7 a.m. - I got there at 5) when everyone started rolling in. The video drivers weren't compatible and I was forced to humbly call tech support and tell that how I had violated all the rules. This place at least has Windows 2000, and I have my Powerbook, so all should be good. I just hope I can get a dual monitor setup - there's nothing quite so enjoyable.

This evening I did some minimal development on AppFuse. I spent most of the day writing the Struts Chapter. I'm on page 12 and expect to do 10-20 more pages. It was fun writing because I described tools that make developing Struts apps easier: Ant, XDoclet, JUnit, StrutsTestCase, and Cactus among others. I dug in a little to the Testing frameworks and played with them, but nothing too serious. I can waste many hours coding and I need to finish writing, then code later. I used 2 very cool tools today. The first is Canoo's WebTest. It basically is a framework built on top of HttpUnit that allows you to write all your tests as Ant tasks. It's fricken sweet as you don't have to really write any code, and it just worked for me. Check out this file (XML) to see how easy it is.

The 2nd tool was written by Erik Hatcher to generate JSPs and a resource bundle based on a Struts ActionForm. I hadn't tried it out until tonight and it just worked - my favorite feature in any software. The one area I think I might run into issues (in generating all this code), is when I have ArrayLists of beans on a form. I think Hibernate will allow this using Sets, Lists and other types of Collections, but I'm doubting that XDoclet's strutsform task will support it and I don't think Erik's too; generates nested tag libraries or anything like that. This is unfortunate because I'll probably get a wild hair up my you-know-what and want to create this functionality. And there goes my deadline, right out the window. Need.... to ... stay ... focused..!

Lastly, I made an attempt to mavenize AppFuse. It was pretty easy at first, as you're only required to alter this XML file to fit your project's needs. I realized I didn't have much as far as a CVS repository, mailing lists, etc., but I also realized that these would be almost essential to any project. And they'd certainly make things a lot simpler - even on a small team. When I got to the dependency section (which is what I really need), I sorta gave up. Here's my dependencies and their presence at the Maven Repository:

So while Maven looks great, it doesn't offer all the third-party jars I need. Is it possible to partially integrate? Also, I found the documentation to be a bit lacking on how exactly to configure each dependency. Is there a standard naming convention or versioning to rely on? It'd be great to have a list and possible versions - or even XML fragments you can copy/past. Can we, as developers, contribute nightly builds to the repository? I'd love to use both AppFuse and Maven at my new project, but I hate waiting on things to happen. If I can do anything to make the above modules/versions present in Maven, let me know.

Posted in Java at Dec 13 2002, 06:23:07 PM MST 1 Comment

What Maven Does

I, like Charles, was unsure of what Maven did. James has made it clear and I have seen the light - I think. In my AppFuse project, I have a lib directory that contains all the various third-party jars I'm using in my build process. Among these are XDoclet, Struts, Cactus, JSTL, Hibernate, JUnitDoclet, etc. The problem is that this directory is ~16MB and if I add it to CVS, I've got a monster project. The zipped up version of AppFuse's source is 14MB! That's enough to scare off folks right there.

It sounds to me that Maven can help me out in 2 ways. It can be used to download and install these jars as part of the build process. Slick if it can! Can it get me nightly builds from CVS? The 2nd feature seems to be building a project website for me. That's cool and definitely better than my simple readme file. However, can I make my site look like this (my site) rather than this (Maven site)? The good news I see is that the generated website does use XHTML and a DOCENGINE:

<!DOCENGINE html PUBLIC "-//CollabNet//DTD XHTML 1.0 Transitional//EN"
    "http://www.collabnet.com/dtds/collabnet_transitional_10.dtd">

The bad news is that it's not a standard DOCENGINE and even after I override the doctype and charset, it still does not validate. Of coure, this may not be a big deal, but if this were to be more "standard" it would be easier to convince folks like me to jump on the bandwagon. If there's templates I can modify, show me, and I'll dig like a miner that's struck gold.

Posted in Java at Dec 13 2002, 12:25:05 AM MST 2 Comments

Best OSS License?

I've gotten approval from Wrox to use struts-xdoclet as my sample app for my chapters on Security and Struts. I've also received committer rights from Ted Husted on the Struts project at SourceForge. I haven't checked anything in yet, because I still don't have a good name. While I think struts-xdoclet is a good descriptive name, it doesn't have the pizzazz I'm looking for. So the naming discussion continues. I'm thinking of actually leaving "Struts" out of the name as it seems to make other names more difficult when combined. I like the idea of kindling, which we use to start fires at the cabin, but I don't know if that makes a good app name.

Back to the point of this post, what are your recommendations for a good open source license? I don't really care how people use struts-xdoclet, so do I even need to license it? What happens if I don't include a license?

Posted in Java at Dec 04 2002, 08:29:12 AM MST 5 Comments

Should I use Maven for struts-xdoclet?

James Strachan has encouraged me to use Maven for my struts-xdoclet project. I should give Dave some credit too, as he has also suggested this through e-mail. Here's my delimma, it'll probably take me anywhere from 2-4 hours to figure it out and integrate it. Does it buy me that much functionality to make it worth it? And my biggest fear is that it seems to help you produce a "project website" - that has a Jakarta look to it. I'll end up spending hours and hours tweaking the look and feel of that sucker - which provides no real value at all. But I'll do it because that's how I am. So to answer your suggestion James, I'm afraid to integrate with Maven, as I'm scared to create too much more work for myself with my already tight deadlines. Volunteers are welcome ;-)

Posted in Java at Nov 29 2002, 11:41:11 AM MST Add a Comment

Struts-XDoclet 0.1

I did a bunch of work today to get struts-xdoclet off the ground. Basically, all that exists write now is the generation of struts-config.xml and web.xml from xml files in a merge directory. There are no .java files in this project yet.

I'm posting this to you in hopes of getting some validation of the directory structure and Ant-based build/deploy process. The deploy task originally worked as Erik Hatcher suggests in his book, but whenever I tried to redeploy, it would give me errors when trying to remove a .jar file - so I resorted back to a simple copy to $CATALINA_HOME/webapps. The build.xml file I put together is based on what I found in struts-blank.war (for 1.1), roller's build process, my own experience and good ideas from the Ant book.

I've also configured form-based authentication and I plan to add a bunch of optional modules (i.e. SSLExt for SSL Switching, password encryption) to the mix.

I'm still searching for a sample-app idea for the persistence layer (i.e. authors and books). I'd like to do something that folks can use, so I'd definitely like to include an admin section for administering user's and their properties. Maybe even offer features such as registration (might be a bit difficult using tomcat-users.xml, but not so bad with JDBCRealm or an LDAP server), and password recovery.

You can download the first cut of this - which should build and allow you to login - at http://www.raibledesigns.com/struts/.

Next steps include the security modules I mentioned above, and generating validation.xml and persistence classes from a POJO. I'm still undecided on using Castor or Hibernate for the persistence layer. Dave (Johnson) seems to think Hibernate has some great stuff, and he's used Castor for a while, so that's probably the direction I'm leaning towards. It would be great do be able to do both.

Posted in Java at Nov 25 2002, 05:45:04 PM MST 4 Comments