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 "ant". 338 entries found.

You can also try this same search on Google.

Java Development with Ant, The Application

Ant Book If you've been fortunate enough to read Erik Hatcher's Java Development with Ant, you know that there's tons of good tips in it. I read it and I've been recommending it every since. Erik has been continuing development of the sample app for the book ever since it was released. I got many tips from Erik in developing AppFuse and I have to say, it really is a nice example. Maybe I'll get some more stuff now that it appears to have jumped from version 0.4 to 0.9! Here's a message Erik sent about the latest release.

All -

I'm proud (and worried about the support e-mails! :) to announce the 
near-final release of a project demonstrating Ant, XDoclet, Struts, 
JUnit, Cactus, and Lucene.  Its called JavaDevWithAnt as it was written 
for the book Steve and I co-authored and has been refined during 
several presentations I've been giving on Ant, XDoclet and Struts.

The documentation is in draft stage, and my primary goal is to collect 
feedback on polishing the documentation (and the application if there 
are any bugs that surface).  The site where I'm hosting the 
distribution and documentation is:

	http://www.ehatchersolutions.com/JavaDevWithAnt/

Please let me know if you try it out and have suggestions for 
improvement, or just to let me know you tried it and hate it or love 
it, etc.  Feedback more than welcome!  Direct feedback to me at 
[email protected]

	Erik

p.s. Since this e-mail is directed to the XDoclet, Lucene, and Cactus 
lists, here is a brief teaser for you:

XDoclet - its used extensively, even using a custom tag handler to 
generate starter JSP's from Struts form beans.

Lucene - my <index> Ant task is used to index text and HTML files, and 
Lucene's API is used at run-time to query the index.

Cactus - StrutsTestCase is used, although no direct Cactus tests.

Happy information-overload! There's a lot there, but if I could figure it out - I'm sure you can. Erik - finally on Jaguar eh? What took you so long ;-)

Posted in Java at Dec 27 2002, 07:25:45 PM MST 1 Comment

Ant won't delete a file - any ideas?

I've been experiencing this problem for the last couple of days. Basically, when I run "ant clean" on my project, I get the following error:

file:d:/source/appfuse/build.xml:746: 
  Unable to delete file D:\source\appfuse\dist\appfuse-common.jar

I can delete the "dist" directory in Explorer, and also using "rm -r dist" in Cygwin. Any ideas why Ant is choking on this all of a sudden?

Posted in Java at Dec 26 2002, 05:05:32 PM MST 18 Comments

How I fixed Ant running in Eclipse

I was able to fix my Ant problem this week. In the latest release of Eclipse (2.1 - M4), it allows you to specify an ANT_HOME, rather than the internal one. So I did that and it still didn't work. I ended up having to add tools.jar as a external jar and now everything works [screenshot]. Cool!

Posted in General at Dec 24 2002, 04:58:02 AM MST 1 Comment

iTerm, StrutsForm Generation and the Work Life

I found iTerm via a quick scan of posts on java.blogs. Very cool - I'll have to download it tonight.

I'm still working like a banshee as you might be able to tell from my lack of posting. I was up until 4 in the morning on Sunday trying to complete my struts-resume app for my Wrox Chapter (still not done). I've backed off from my attempts at generating Struts Forms and Hibernate classes from the same POJO. It just doesn't seem likes it's worth the effort. I'd still like to generate the initial stubs for these classes form a database, but I've come to realize that it's not practical to have these classes generated each time. It's just too much of a nightmare to mix and match what goes to Struts and what goes to a Hibernate class. I am going to give it one last college try though. I hope to use a POJO with XDoclet tags, and then modify the XDoclet code for StrutsForms so they can be produced from a POJO. Of course, if I were smart, I'd just finish the damn application the hard way and be done by tonight. Wrox would be much happier I'm sure. I'll try for 2 hours and if I can't get it, I'm done. I think that I'll end up generating the initial struts form and then stuffing it into the source tree for later manipulation. I've found that it's nice to add getter/setters to the form (that never make it to the backend), so this is probably the best way.

Things at the office are going well. I spent most of the day installing Tomcat, MySQL, VeryQuickWiki and Scarab on a Sun box. It was fun doing the ol' command line thing all day and OS X makes it a real pleasure to interact with Unix systems. Transmit2 makes it super easy to transfer files and even allows you to edit with BBEdit. It's worth the purchase for sure at $25.

I've decided (once again) that OS X is not the development environment for me. Eclipse is too flaky (I'm running 2.1 M4) and takes forever to do anything. Ant runs slow as hell, and Tomcat does too. I'm also addicted to Windows Exploder and OS X's Finder does nothing for me. So I told my boss that they were losing money if I didn't get a faster box, and Windows would probably be best. They said it didn't look good, so I volunteered to bring in my own machine (Dell 8100 P1.5, 768 MB RAM) if they could get me a new hard drive. By getting a hard drive, I don't have to blow out my Red Hat 8.0 installation and I can transfer the hard drive to the new machine when they finally get me one. So they found a 20 Gig hard drive and I'm building the machine as I hammer out struts-resume.

Posted in General at Dec 23 2002, 03:12:13 PM MST 1 Comment

Ant's jspc task - doesn't work on Tomcat 4.1.18

I'm trying to use Ant's JSPC task to pre-compile my JSPs. I've used Erik Hatcher's example from Java Development with Ant. It works great when using a 4.0.x version of Tomcat, and the following jasper.classpath:

<path id="jasper.classpath">
    <fileset dir="${tomcat.home}/lib">
        <include name="jasper-*.jar"/>
    </fileset>
    <fileset dir="${tomcat.home}/common/lib">
        <include name="servlet.jar"/>
    </fileset>
</path>

However, it doesn't work on Tomcat 4.1.17. I had to change the jasper.classpath to find the appropriate jars (they're in different directories now), plus I had to include ant.jar or I got java.lang.NoClassDefFoundError: org/apache/tools/ant/AntClassLoader. Where everything works on the older Tomcat version, now it fails - what gives?

compile-jsp:
     [jspc] Compiling 8 source filesD:\source\appfuse\build\jspc\java
  [jasperc] 2002-12-21 11:15:51 - uriRoot implicitly set to 
            "D:\Tools\tomcat-4.1.17\webapps\appfuse"
  [jasperc] error:/common/footer.jsp(0,0) null
  [jasperc] 2002-12-21 11:15:53 - ERROR-the file '\common\footer.jsp' 
            generated the following general exception: org.apache.jasper.JasperException: 
            /common/footer.jsp(0,0) null

Posted in Java at Dec 21 2002, 05:23:49 PM MST 3 Comments

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

The First Day

The first day at the new job was good. The three developers on the team (myself included) had a 3 hour meeting getting our arms around the project and figuring out how to do everything. It's an interesting approach we're using - where an Excel speadsheet is e-mailed to a mailbox. It's then picked up, processed, and if it meets certain criteria, it's entered into an Oracle database. Then we're going to use a web front-end and Struts to grab the data and render it to the user so they can correct it. I wonder if I can use the Struts Validator on the way out? It'll be interesting to find out.

The only unfortunate part of the day was the machine I found myself in front of. It's a Dell GX110, and has 128MB RAM and a 733MHz processor. Ughhh, try running Ant, Eclipse and Tomcat at the same time on that sucker! I faired better than the other developer though - he got an NT 4 box - at least mine's 2000! They said they'd try to get us better machines, but I hope to just use the ol' Powerbook. The dual 21" monitors is helping to reduce the pain.

Posted in General at Dec 18 2002, 02:59:57 PM MST Add a Comment

Erik Hatcher's Blog

I saw it a couple weeks ago, but now Erik appears to be updating it regularly. Just in case you didn't know - you can find it here. Erik is an Ant Guru and has written many cool Struts extensions (i.e. LookupDispatchAction, XDoclet integration). He's made my life a lot easier with his Ant wisdom and Struts goodies - thanks Erik.

Posted in Java at Dec 18 2002, 01:17:30 AM MST 1 Comment

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

Tomcat Deployment App

On of my clients has asked me to setup a deployment app. Basically, we have seven instances of tomcat setup through one Apache webserver. Apache proxies to each instance based on different domain name. They want the ability to upgrade each instance with the click of a button. Here's my idea:

  • Create a Struts-based app that allows file upload, where they can upload a war file.
  • Part of the file-upload process is selecting which servers they'd like to upgrade.
  • Based on the server names, the war file is copied and expanded in the tomcat/webapps/appname directory for each server.

Will this work, and can I do this through a webapp? It'd be cool to do steps 1 and 2 with a webapp and have step 3 run by Ant. Is it possible for a webapp to call Ant? The second piece that they're probably going to want is the ability to setup these virtual slices on the fly, from a web page as well. That might be a little tougher, as it would involve: editing http.conf/workers.properties, creating a new user for the slice, copying/expanding a base Tomcat install, editing the server.xml for new ports, creating a new MySQL instance for the slice, and finally, creating startup scripts. Yeah, I might have to pass on creating that app - probably not logical to do it from a webapp. Especially when it only takes about 10 minutes to setup right now.

Posted in Java at Dec 15 2002, 07:17:58 AM MST 4 Comments