Tag Archives: ant

Hudson As A Service On Vista

I thought I’d setup a new continuous integration server at home tonight and had heard good things about Hudson lately so I gave it a try.  I downloaded the war and ran it as directed and got it configured pretty quickly to pull my source from my hosted subversion repository.  The build ran fine, my unit tests ran fine, it published my javadoc into the workspace and all was good in the world.  Then I tried to install it as a service on my system which just happens to run Vista (please, no comments regarding Vista).  Crap!  (well, I had worse thoughts but this is a relatively family friendly blog)

According to the docs it should work.  I am running as a user with administrator privileges and so forth.  Apparently creating a service in Vista requires you start the process as administrator (i.e. root).  That requires you to open up explorer, right click on the install batch service and click “run as administrator”.

You’re not done yet.  Then you have to go in and change the user you want the service to run as in the service configuration in the services control panel module.  It will then grant the user run as a service privileges and it will actually allow you to now start it as a service.

I also recommend changing the port it runs on by default since most of you probably run your JBoss or Tomcat instances on 8080 when you’re developing.

Overall I think Hudson is great so far but this is just a little gotcha you should be aware of when running it as a service on Vista.

Strange Ant Weirdness

I got a new desktop for home the other day and I was downloading all my development tools and something strange happened. I downloaded Ant 1.7.0 and unzipped it into my Java tools directory, set my ANT_HOME variable and added all this to my PATH and typed “ant” and it couldn’t find it. Weird.

I go to the Ant bin directory and there are only 3 .cmd files in the directory. None of which are the ant.bat file. The checksum on the zip file was fine as well. I check the Ant distribution zip file size and it’s 11,288,363. I figure I’ll just do a sanity check and download it again and the new download is 11,390,509. WTF? I haven’t modified either of the zip files since downloading.

The first download came from the http://apache.mirrors.timporter.net/ mirror. I originally downloaded the file on December 21st. I just downloaded it again and now it’s the same size as the distribution I downloaded earlier tonight that works fine. I’m not sure how a build fails like that and gets mirrored…just strange I guess. At least the problem on timporter.net has already been fixed.

Warning: Shameless plug! I’m still looking to hire some great Java developers. I just found one the other day but still have 3 open reqs (what can I say, we’re growing). If you’re in the San Francisco area, drop me a line. We have an amazing space (http://sfarmory.com) in the Mission district that we just moved into and a great group of people to work with. You also need to be okay working in the adult industry. One of the developers I work with has a great post about the jobs.

Why Maven Drives Me Crazy

Step 1. Create a maven project with war packaging

Step 2. Run mvn eclipse:eclipse

Step 3. Open Eclipse. It’s not a dynamic web project.

Step 4. Yell.

Step 5. Look things up on Google.

Step 6. Try some of the things you find on Google.

Step 7. Yell some more.

Step 8. Create a dynamic web project and configure all your libraries by hand.

Step 9. Run web app on server within Eclipse.

Step 10. Go back to Ant and get things done.

I mean seriously, I can’t believe it’s this hard to take a web project and have the eclipse:eclipse task build out an Eclipse project (Eclipse 3.3) that will deploy into a Server instance to make it easier to run/debug.

I’m sure some people have it running but if it’s not relatively simple or documented more clearly or findable on Google within the first page or two then I’m sure I’m not the only one that has thrown up their arms with Maven and use within Eclipse.

On top of all that, just try learning this thing and using it with a Hibernate based project and having to go out and hunt down all the plug-ins you need to make your project do what you want it to do. Any project that makes me do this much hunting around to get it to do relatively simple things that I can do in Ant really quickly is just not going to succeed. The sad thing is that most of the initial impression problems are solvable but no one that is a Maven fan seems to be doing anything about it. Just take the ten or so most popular open source projects, throw a cookbook style doc out there that tells you how to quickly integrate the plug-ins for those projects and do common tasks and you’ll get people that will spend more time trying to use it. As of now, virtually none of the developers I know will use Maven.

(note:  I wrote this up about a month ago and just got around to publishing it so maybe it’s been fixed, maybe it hasn’t but I’m tired of trying to make it work for other reasons as well)