Dev Bits Weekly Updates for 2009-05-31

  • A best thing about prefixing abstract classes “abstract” is that they are at the top of your package (Barring an AardvarkImpl of course). #
  • Correction: Windows *7* installs uncannily fast. #
  • DBSolo is an awesome tool. I am using it to debug problems caused by some schema changes. #

Dev Bits Weekly Updates for 2009-05-24

  • To make a game with Darkstar & built by maven, groupid=com.projectdarkstar.server and artifactId=sgs-server. Use java.net repos. #
  • The world’s most expensive calculator:
    “select 7869375748/3899864 from dual” #
  • AJUG looks like fun tonight. #
  • Just guiced up the Sun Darkstar tutiorial application. #
  • So Darkstar didn’t Guice the way I hoped. It still wanted ManagedReferences to even the injected stuff. #
  • Ivy in Netbeans doesn’t seem to be fetching dependencies of libraries. Seems like Maven is a bit more baked with Netbeans. #

Dev Bits Weekly Updates for 2009-05-17

  • I have just installed twitter tools to add content to my blog. #
  • Moving away from the HTC Fuze and back to the Blackberry may be the best thing ever. #
  • Spent some time yesterday working with AtUnit, Guice, and EasyMock at Outwrite. #
  • Buildr and Ivy + Ant look promising.
    I also need to do some work with my Java App Engine account. #
  • I just installed Chrome(ium) on my work PC.

    http://bit.ly/jED16 #

  • I now have Ivy looking at my Artifactory repo instead of ibiblio. #
  • I have migrated from Artifactory to Nexus. #

Ivy experiments

This week I have been trying to get back into one of my personal projects, Mooks.

I have chosen to experiment with Ivy + Ant over Maven for this project. While Maven is nice, I still feel more comfortable with Ant. Given that Ivy supports Maven 2 repositories, I feel that it strikes a nice middle ground. Plus I get to leverage my Artifactory repo as well.

I found Ivy surprisingly easy to set up. First, I followed their nice, if outdated, instructions for installation. Next, I added the following files to my project root.

ivy.xml
[sourcecode lang=”xml”]
< ?xml version="1.0" encoding="UTF-8"?>
<ivy -module version="2.0">
<info organisation="apache" module="hello-ivy">
<repository name="SagaRepo"
url="http://www.sagaoftherealms.net/artifactory/repo"/>
</info>
<dependencies>
<dependency org="junit" name="junit" rev="4.5"/>
<dependency org="org.apache.ant" name="ant-junit" rev="1.7.1"/>
<dependency org="atunit" name="atunit" rev="1.0"/>
</dependencies>
</ivy>
[/sourcecode]

ivysettings.xml

[sourcecode lang=”xml”]
< ?xml version="1.0" encoding="UTF-8"?>
<ivysettings>
<settings defaultResolver="default"/>
<resolvers>
<url name="public" m2compatible="true">
<artifact pattern="http://www.sagaoftherealms.net/artifactory/repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
<artifact pattern="http://www.sagaoftherealms.net/artifactory/repo/[organisation]/[module]/[revision]/[artifact].[ext]"
/>
</url>
</resolvers>

<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
</ivysettings>
[/sourcecode]

I run the resolve task and voila, Ivy downloads the three libraries from Artifactory and my project is one step closer to ready to go.

Now if only Netbeans 6.7 beta had Ivy support on par with its Maven support…