Often you are in a situation where need to convert a file://... URLs to java.io.File object. Doing this correctly is not trivial (and I still don't know what I'm writing here is the correct way.)
The first code I tried (which I saw somewhere a long time ago) is...
File f = new File(url.getPath());
This actually works for simple cases, like for file:/path/to/abc (which is actually a malformed...
on Apr 25, 2007
I just posted the Hudson 1.104 release. It's been a while since 1.103 — that is, 5 days — so this release contains a large number of changes.
A large portion of the work is related to the native maven2 integration.
For example, starting this version, Hudson automatically puts the build number and Hudson project name into the jar/war/ear files that are created in Maven. This is often...
on Apr 22, 2007
I use NetBeans. I like it. I encourage people to use it.
But I am not happy about their handling of "Open Project ..." Dialog. I have checked both NetBeans 5.5.1 RC1 and NetBeans 6.0 daily downloads.
The dialog looks like this (click to enlarge).
I have seen several developers double-click a project folder expecting it to just open the project and finding that it just opens the folder because...
on Apr 20, 2007
I set up the following mirrors for java.net maven repositories:
For the java.net m1 repo, use http://download.java.net/maven/1/
For the java.net m2 repo, use http://download.java.net/maven/2/
The mirror sites are synchronized with the masters. You can also browse them more easily unlike the master java.net m2 repository, mirrors are generally faster in my experience, plus mirrors are HTTP-...
on Apr 19, 2007
An interview, Meet Peter von der AhÃ©, Tech Lead for Javac at Sun Microsystems, I did with Peter, Sun's tech lead for javac, discusses the Kitchen Sink Language, the Java Compiler API, and new ways of thinking about generics, reification, type inference for local variables, and lots more. If you want to experiment with javac, check out the Kitchen Sink Language.
Peter has a lot to say:
on Apr 12, 2007
Hudson continues to keep me busy. So here are some of the recent developments.
First, I just hit the release 1.100, which is 101st release of Hudson. I think that's a lot of releases. Generally speaking, I think "release early, release often" is a good thing, but OTOH I also realize that taking time to shake off bugs while holding off (potentially de-stabilizing) new features have...
on Apr 11, 2007
Today, Geir Magnusson Jr., the Apache Software Foundation's VP of Java Community Process, issued an "Open Letter" to Sun Microsystems, addressed to Jonathan Schwartz. I put "Open Letter" in quotes because it reads like an ultimatum demanding a license they like to the Java SE 5 technology compatibility kit within thirty days (or else).
This request/ultimatum seems to have...
on Apr 10, 2007
Curious how much Java is a test-driven technology ?
Few words for a background.
The Java TM Compatibility Kit (JCK) is
a test suite, used to
verify if the Java standard is correctly implemented. The first JCK
came out together with the first JDK from SUN, now this effort evolved
into the industry-wide Java
The JavaTest TM harness is a test
monitor, used in first versions of JCK...
on Apr 9, 2007
Testing tools are starting to take up a sizable chunk of the Java Power Tools book, which is probably logical, as proper and efficient testing should play a sizable part in any development process worth its salt. I've added a new poll on web UI testing tools here - please take a look and let the world know your favorite web UI testing method!
on Apr 9, 2007
If you speak Russian, check the agenda
of Java ME sessions. 'Java ME Testing' session description is in the
end of the list, it concludes the Java ME track and Day 2.
Slides and description for it were first created in the native
of Internet and IT, that we use at work and call English by inertia. I
did a first pass of translation to Russian and found that for many...
on Mar 31, 2007
Installing Hudson is really as easy as it can get, where the only container-specific steps are:
How to deploy a war?
How to re-deploy a war for upgrade?
(Optional) How to set HUDSON_HOME environment variable, system property, or JNDI entry? (it only needs one of them, not all)
(Optional) How to set system property to increase the server heap size?
Yet the reports from users suggest that these...
on Mar 30, 2007
Matt Raible asked me to work on a FishEye plugin for Hudson in my recent Hudson-related blog entry. Incidentally, my colleague Rajiv has been also asking for this feature (of being able to link to SCM browsers like FishEye, ViewCVS, etc) — so much so that he filed the same RFE twice!
So I'm happy to announce that this long-standing RFE since August 2005 is finally implemented in the...
on Mar 26, 2007
It is true that the most popular test format supported by
many Java TM IDEs is JUnit and its
variations like TestNG
Interested to compare JavaTest
harness and JUnit ?
JavaTest is a test harness, JUnit is a test format. JavaTest
is created to manage test
suites written in many different formats, JUnit is a specific
format and API for test development. The comparison is invalid, it...
on Mar 26, 2007
The IDE you use can arguably play an important role in your productivity as a developer. Does your IDE blend into the background and become a natural extension of your brain? Or do you struggle endlessly with plugins and unintuitive menu options? If there's a subject that every Java developer has an opinion on, it's this one. I've added a new poll on the Java Power Tools website: what Java IDE...
on Mar 25, 2007
I've been following Brian Leonard's recent entries on JRuby/Ruby/Rails integration in the latest NetBeans milestone release. In my own tinkering to solidify what I've learned from Brian, I've found that there are a couple of showstoppers that will prevent me from using this suite for serious Rails development, for now at least.
You see, Brian's JRuby example was ported directly from the...
on Mar 20, 2007
It's been a while since the last time I blogged about Japex. Over the last year or so there have been many incremental improvements (resulting in 30 different releases) and with the recent addition of combined bar charts, I thought it was time to make this the official 1.1 release.
I won't talk about all the features that we have added during the last 12 months, instead I'll concentrate on the...
on Mar 15, 2007
One of the big selling points for Hudson has always been its ease of install. But recently it just keeps getting easier. The current installation procedure is what I claim "2 minute setup":
Download the Hudson war file from its Java.net Release page
Then run java -jar hudson.war
Head to the hudson dashboard
But then, human laziness is really infinite. Some folks can't even bother to...
on Mar 14, 2007
At the Java Posse Roundup last week we had some wonderful evening sessions called Lighting Talks. During these sessions each participant had 5 minutes to give their entire presentation. This necessitates, of course, brevity and clarity above all. And of course, since this was the evening, we were all sitting around munching on BBQ, drinking beer, and laughing away during the proceedings. So in...
on Mar 14, 2007
I've just added a poll on Load Testing on the Java Power Tools website. How do you load test your web applications? I'm a great fan of JMeter, but there are lots of other tools out there as well. Not to mention the heavy-weight commercial tools from the likes of IBM/Rational and Mercury. What tools do you use?
on Mar 13, 2007
Apache Lucene project is now apparently using Hudson for their nightly builds. While looking at how they are doing, I noticed that one of them suggested using Bamboo because of a nicer JIRA and Confluence integration.
So I decided to write a Hudson plugin for JIRA. It's famous enough, so I figured there are probably more Hudson users who'd enjoy such a plugin. JIRA has a SOAP interface, so it...
on Mar 12, 2007