Maven Repository Metadata Follies / when all else fails, purge your local repository
It seems that whenever I encounter any weird behavior while building with Maven, it is usually solved by purging my local repository. I previously had a build that for some unexplainable reason kept on complaining of a missing dependency. Checking my local repository proved otherwise as it was there. I was literally pulling my hair out trying to figure out why I kept getting the missing artifact error when it obviously was in my local repository.
Getting desperate, I deleted my local copy of the source and checked it out again from our subversion repository. It was all for naught as I got the same error message! Finally in frustration, I tried it in a different machine and it built fine! I was beginning to think that my laptop was cursed and I had to do a ritual to appease some Maven god to get it to work.
Then I had an epiphany. It occurred to me that the machine that I tested it on (the one that successfully built the project) had a fresh install of Maven, hence it’s local repository was essentially empty. I deleted my local repository and proceeded to build the project. And joys of joys, I was able to build it successfully! Later on I realized I could have just deleted the folder of the offending artifact and it would have worked as well.
Asking around, the two most popular explanations are corrupt artifact metadata and failing to sacrifice a virgin before attempting a build. The popular consensus is the corrupt files but I’m partial to the failure to sacrifice a virgin. What do you think?
Cebu…day 1 / foodgasm and sweltering humidity
I recently had an opportunity to go to Cebu (a city down south in the Philippines) to conduct training on Maven, Continuum and Archiva in our Exist office over there. We were booked the earliest flight (5 am!!!!) and I had to be in the airport at least 1 hour before the flight for the check in and all that security stuff that they impose on travelers nowadays. So, it was 2:30 am that I dragged myself out of bed and got ready for the trip. By 3:45 am, we (Nap Ramirez and I) were checked in and waiting for the flight.
The flight took less than an hour. By the time we climbed to the cruising altitude of 33000 feet, it was time for descent! The cab ride from the airport to the office was an experience. The driver seemed to be a frustrated rally driver (yep much worse than the ‘ordinary’ Manila jeepney and cab drivers). He weaved in and out of traffic (not that there was much traffic at that time) and came to a screeching stop in front of our Cebu office. Normally, it takes around 30 minutes to get from the airport to the office, it took him 15!
Anyway, on to more interesting things, food! Cebu is known for it’s food, mangoes, lechon (roasted whole pig), and seafood. During lunch, the guys from the office brought us to the Ayala Mall to eat the famous lechon from Cebu. We were around 6 in the group and they ordered 2 kilos of lechon (!) and rice wrapped in banana leaves in the form of a pyramid called pusó.
On our first night, we took a walk on the street that our hotel was on. We found out that we were fortunate enough to be on restaurant row. So we chose one that didn’t look too expensive. It was called Tsibogs (meaning Eats) and it was a very casual place. The place was basically a roof with tables beneath it. Ordering was done by choosing your meal on a display where they will grill it for you. On the table were varieties of seafood, marinating meat and barbecues (pork, chicken, chorizos). We picked a slab of tuna belly (maybe around 400 to 500 grams), 2 pork barbecue sticks and 2 chorizos. While our order was in queue to be grilled, we took a table and ordered rice and drinks. Finally, the waiter brought the grilled food to our table and we literally dug in. The tuna was fresh, just seasoned with a little salt and grilled perfectly. The barbecued pork was tender and the chorizos, tasty. All in all it was a very satisfying meal. We asked for the bill and was surprised that the entire dinner cost PhP280 (roughly US$6)! We would have paid almost twice that amount in Manila.
We paid our bill and walked back to our hotel, full and tired.

