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.

RE: Which new laptop would you buy?

Thanks to all who left comments about my (possible) new laptop purchase. I did some more tests today, and I'm going to have to go with a Windows machine, especially since I hope to replicate the performance I get from my machine at work (Dell Optiplex GX260: 2 GHz, 512 MB RAM, Windows 2000 SP4):

  • Opening Photoshop (7.0): 3 seconds
  • Starting Eclipse (3.0 M2): 6 seconds
  • Running "ant clean package-web" on AppFuse: 18 seconds
  • Running "ant rebuild" on Roller: 36 seconds

Yep, that's right, my (work) desktop is twice as fast when opening Eclipse and 4 times faster opening Photoshop (than the Powerbook). So if I get a 3 GHz laptop with 1 GB RAM, it should be even faster than that right?

Hibersonic Aviator ZX7 Alienware Area-51m

Right now, I'm looking at the Alienware Area-51m or the Hibersonic Aviator ZX7. At first glance, I'm leaning towards Area-51m, although the Bluetooth USB Adapter (vs. integrated Bluetooth) is disappointing. The Hibersonice has a 17" screen, but that doesn't seem to be that big of deal (after hearing y'all speak up). Also the Hibersonic has a 802.11b NIC, where the Alienware one has a 802.11g.

Posted in General at Jul 22 2003, 09:11:05 AM MDT 5 Comments

HowTo: Upgrade your app to JSP 2.0

I did some more playing with Tomcat 5.0.4 today - and converted appfuse to a JSP 2.0 application. After accomplishing this task, I created a "jsp-2" task that can (optionally) be run at build time, and whalla, you've got a Servlet 2.4/JSP 2.0 application. I learned a number of things in the process.

1. The expression language in JSP 2.0 replaces in JSTL is <c:out>, that's it. I was under the impression that I could use <c:if> or <c:forEach> tags without declaring the tag library URI, etc. I was wrong, if you want to use JSTL tags, you must import the declare the taglibs, just like you do now in Tomcat 4.x.

2. The EL is turned off by default if you have a 2.3 DTD for your web.xml. If you have a 2.4 XSD in web.xml, the EL is turned on by default. This means that you can write ${param.foo} and it will be analyzed when the EL is on (when off, it's not analyzed).

3. You can replace <html:rewrite page=""/> with <c:url value=""/> and get the same effect. The only difference is that html:rewrite is context and module-sensitive, whereas c:url is only context-sensitive.

4. I had to replace the URI's for JSTL core and fmt with their run-time URIs - http://java.sun.com/jstl/core_rt vs. http://java.sun.com/jstl/core. Otherwise, I would get something similar to the the following error.

According to TLD or attribute directive in tag file, 
  attribute test does not accept any expressions

I figure upgrading to JSTL 1.1 might solve this issue, but since it hasn't been released, why bother? So to convert appfuse to be a JSP 2.0 webapp, here's what my Ant task does:

  • Replaces URIs with their run-time equivalent.
  • Removes <c:out> tags, leaving the value of the "value" attribute intact.
  • Replaces 2.3 DTD in web.xml with 2.4 XSD.

I did some (rough) benchmarking of running my JSP tests, here are the results on a Pentium IV (2 GHz, 512 MB RAM).

start Tomcat, run tests, stop Tomcat:
 Tomcat 4.1.24: 1 minute, 17 seconds
 Tomcat 5.0.4: 1 minute, 7 seconds
 Tomcat 5.0.4/JSP 2.0: 1 minute, 3 seconds

run tests, Tomcat already started:
 Tomcat 4.1.24: 33 seconds
 Tomcat 5.0.4: 22 seconds
 Tomcat 5.0.4/JSP 2.0: 22 seconds

According to these numbers, Tomcat 5 is quite a bit faster than 4.1.x.

Posted in Java at Jul 17 2003, 01:27:01 PM MDT 5 Comments

Upgrading to latest WebTest and Cactus

I attempted (and succeeded) in upgrading to the latest and greatest releases of Canoo's WebTest and Jakarta's Cactus this afternoon. It wasn't too bad. Both have revised their taskdef's to read from a properties file, and Cactus has simplified the process to include cactus-related JARs/mappings in your webapps. Now you can "cactify" your war with a little Ant-lovin:

<cactifywar srcfile="${webapp.dist}/${webapp.war}"
    destfile="${webapp.dist}/${webapp.name}-cactus.war">
    <lib dir="${strutstestcase.dir}" includes="*.jar"/>
    <lib dir="${cactus.dir}">
        <include name="*.jar"/>
    </lib>
</cactifywar>

Pretty slick IMO. Now if I could only figure out how to do form-based authentication with Cactus (I couldn't find it in the docs).

The other issue I've been banging my head against the wall over is running canoo/httpunit tests with a compression filter enabled. Yep, the problems still exist, despite the fact that I patched httpunit. So I've come up with a new fix that satisfies me and eases the pain in my noggin'. In my compression filter, I simply disabled compression when it's an httpunit test:

String userAgent = req.getHeader("User-Agent");
if (!isGzipSupported(req) || userAgent.startsWith("httpunit")) {
    // Invoke resource normally.
    chain.doFilter(req, res);
} else { 
    // gzip it
}

Posted in Java at Jul 15 2003, 07:05:36 PM MDT 2 Comments

Tomcat's Ant Tasks - why they don't work for me

I've written up a howto for implementing [Tomcat's Ant Tasks|TomcatAntTasks] and why they don't work for me. I've been requested by a few users to use them vs. my current <copy> method, but I don't see why I should. Please read the wiki page and help me out if you can.

Posted in Java at Jun 24 2003, 04:12:32 PM MDT Add a Comment

[ANNOUNCE] Hibernate 2.0.1 Released!

The Hibernate Team never stops producing. They've released 2.0.1, which fixes the following bugs:

Changes in version 2.0.1 (17.6.2003)
------------------------------------
* fixed some problems with new dialect-specific LIMIT clauses
* improved parsing of collection where attribute
* made one-to-many bags more efficient (they are really sets!)
* allowed type="calendar" for  properties
* fixed a bug with locking a versioned composite-id class
* refresh() may now take a transient instance
* added ProxoolConnectionProvider (Martin Crawford)
* fixed some minor JCA issues (Mike Mosiewicz)
* fixed a bug with FETCH and sorted associations
* improved performance of SchemaUpdate tool (Teodor Danciu)
* fixed a bug in Configuration.addFile(String) (Ken Geis)
* tidied up and documented hbm2ddl package (esp. Ant tasks)
* deprecated CounterGenerator in favor of IncrementGenerator
* improved logging during initialization

Posted in Java at Jun 17 2003, 07:14:37 AM MDT 2 Comments

[ANNOUNCE] AppFuse 0.8 Released!

Not much new in this sucker ~ the main reason for this release is to demonstrate self-registration (and auto-login) in a CMA (Container Managed Authentication) environment. I also upgraded most of the dependent packages (i.e. Struts, Hibernate) to their latest releases, and added a binary release as an optional download. [More, Download, Release Notes]

For those of you that might not know, AppFuse is a project I created in order to help me ramp up web development projects faster. I've found it takes a long time to start a project and get the directory structure, build files (incl. ant tasks for junit/cactus/canoo) and all that jazz in place - so I created appfuse. I created it for myself, I'm using it currently at Comcast, and it works great. You might say that "Maven already does this" - and you're right, but I wanted to do it the Erik Hatcher way (after reading his book). I may make an attempt to mavenize the project in the future, but I currently don't see the need.

Posted in Java at Jun 12 2003, 01:08:14 PM MDT 2 Comments

Is XDoclet the best thing since Ant?

I think XDoclet is the best thing since Ant but that's probably because I use it daily (and nightly on on other projects). If you're not using XDoclet now, chances are you soon will be - and then you'll wonder - What took me so long? Calvin Yu gives his take on JSR 175.

I'm very excited about the new Metadata feature that's going to be in 1.5. I'm usually in agreement with the view that adding new language features is just making Java more complex, but I think metadata is going to put a whole new emphasis in automating repetitive tasks. This should also bring xDoclet to the forefront as a necessary tool for Java development.

(emphasis mine) Let's just hope that Sun tries to use some of the goodness that the XDoclet team has put together. XDoclet rocks - if you don't believe me, you must like editing your web.xml and struts-config.xml (among other deployment descriptors) by hand. I did that for years - and my opinion is that using XDoclet is easier.

Posted in Java at Jun 12 2003, 10:41:22 AM MDT 1 Comment

JavaWorld Editor's Choice Awards - Winners

Here's a quick summary of winners of JavaWorld's 2002 Editors' Choice Awards. Winners are emphasized with bold. However, we all know that being a finalist is pretty huge too.

  • Best Java Data Access Tool: Oracle 9iAS TopLink, CocoBase Enterprise O/R 4.5, Hibernate 1.2.4
  • Best Java IDE: IntelliJ IDEA 3.0, Borland JBuilder 8.0, Eclipse 2.1
  • Best Java Performance Monitoring/Testing Tool: JUnit 3.8.1, JProbe 5.0, Optimizeit Suite 5
  • Best Java Application Server: BEA WebLogic Server 8.1, IBM WebSphere Application Server 5.0, JBoss 3.0
  • Best Java Device Application Development Tool: Java 2 Platform, Micro Edition (J2ME) Wireless Toolkit 2.0, IBM WebSphere Studio Device Developer 5.0, Sun ONE Studio 4 Update 1 Mobile Edition
  • Best Java-XML Tool: Xerces2 Java Parser 2.4, JAXB (Java Architecture for XML Binding), Xalan-Java 2.5
  • Best Java Installation Tool: Java Web Start 1.2, InstallAnywhere 5, InstallShield MultiPlatform 5
  • Best Java Book: Patterns of Enterprise Application Architecture (Martin Fowler et al.), Java Development with Ant (Erik Hatcher and Steve Loughran), Java Performance Tuning, Second Edition (Jack Shirazi)
  • Most Useful Java Community-Developed Technology: Apache Ant 1.5, Eclipse 2.1, Tomcat 4.1
  • Most Innovative Java Product or Technology: AspectJ 1.0.6, Eclipse 2.1, JavaServer Faces

Congrats to all.

Posted in Java at Jun 09 2003, 01:03:15 PM MDT Add a Comment

[ANNOUNCE] Hibernate 2.0 Released!

Sweet! The Hibernate Team has lived up to their promise and released Hibernate 2.0 Final! [Download, Release Notes]

Posted in Java at Jun 08 2003, 10:36:54 AM MDT 6 Comments

Out-of-the-Box - My Review

It figures, after bitching about the lack of ROI for Developers on Open Source projects, I get an e-mail from Rob Cope of Out-of-the-Box. The e-mail said that I could get a free version of Out-of-the-Box Enterprise Edition for my contribution to the open source community.

So I think, "wicked cool" - this software sounds great! I downloaded (500 MB) and installed it, and that was the end of my experience with OOTB. No instructions on what to do next. I perused around the filesystem it installed and tried to run ant in a few directories, but no luck. So OOTB just gives me a bunch of OSS projects on my hard-drive, but they aren't built. I don't want to know what I'm doing wrong - I want to know where the documentation is that tells me what to do. I'd dig it if it let me install them projects (i.e. Apache) where I wanted, and also allowed me to upgrade existing installations. If it could migrate my existing settings or customizations, that would be even better. That is what I want.

That being said, I don't think I have much use for OOTB. Why? Because it's not updated enough. I'm the type of upgrade-happy SOB that wants to download and use as soon as the release announcement goes out. I want to get the latest snapshot from CVS and see if it solves my problems. I want to patch my local copy and fix the bugs myself. I want to install some applications in $TOOLS_HOME, and some in $SDKS_HOME. Lastly, while it's nice that OOTB sets the environment variables for me ($JAVA_HOME and $ANT_HOME), I'd appreciate it if it didn't overwrite my existing ones. A simple prompt to see if I want to change them would be sufficient. Especially since I have a newer version of Ant (1.5.3-1 vs. 1.5.3) than OOTB. I don't mean to be too critical - I just want to voice my true feelings. ;-)

Posted in Java at Jun 06 2003, 04:07:21 PM MDT Add a Comment