Monday, 29 October 2007

Beatles reunion coming soon? W00t!



Noticed this ad while reading my mail today. Made me go "hmm...." a little bit, but hey, if they're selling tickets for it, then it must be true!

NOTE TO SELF: update html and make the image look biiiiger.

Wednesday, 3 October 2007

YouTube viewing session



Interesting what I ended up watching and how I got there. (Most recent is at the top, so go through the list from the bottom.)

It all started with me trying to educate my wife about Rage Against The Machine, and how the Sydney Entertainment Centre would have to be one of the worst places to see them, since no one in their right mind really wants to be seated when watching these guys. "WHAT? You don't know who they are? ZOMG! Watch this then... And feel the funk, y'all!"

I love Daft Punk. I really do. Okay, maybe just the first 2 albums. They became popular around the time these new-fangled things called "electronica" and "big beat" were making the rounds. That faded, and then we all started listening to Post-Rock, then New Rock, then that "angular post-punk proto-new wave sound". God knows what they call it this year. At least hip-hop doesn't suffer from the proliferation of labels like this. There may be strains of hip-hop, but no one ever goes and denies that it is hip-hop. But yeah, you say, all these labels just come from music critics, press releases and assorted musical wankers who blog. Fair enough. You never hear the actual artists themselves putting labels on their music. They just tend to say "rock and roll". Okay... so I've just shot down my assertion about rock music in the second sentence of this paragraph.

Anyway, back to Daft Punk. I just realised last night what an utter fool I was for not getting those tickets to their upcoming appearance here in Sydney. Bugger. Bollocks. Fikifikifiki. Woof woof to the doof doof. Aaaaaargh. I was looking up their live performances on YouTube and they're pretty awesome. Not life changing, but enough to make you dance so hard that you'd fall down. I remember actually dancing to Around The World in front of the stereo over and over again. Of course, only after checking that there was no one home!

I, for one, welcome our new (old) robot overlords.

Wednesday, 19 September 2007

Buildr: Using ruby to build java.. hmmm...

http://blog.labnotes.org/2007/05/03/buildr-or-when-ruby-is-faster-than-java/

http://buildr.rubyforge.org/

I've just started getting comfortable with using Maven, and
appreciating all the goodies that cam be used from it, then this comes
along... I wonder how much traction they'll get though, considering
the number of people already using Maven. I guess Ant didn't
disappear when Maven came along, so Maven probably won't disappear
with the appearance of Buildr.

Tuesday, 18 September 2007

Pardon the splatter, I just had my mind blown again...



DJ Sara (8 yrs old) and DJ Ryusei (5 yrs old) tearing it up on the turntable. I wonder if there's a DMC Junior competition somewhere.

Friday, 14 September 2007

Converting a DOS text file into Unix format

I was working on a config file in Ubuntu that had those nasty ^M
carriage returns at the end, and dos2unix doesn't seem to be around
anymore. So came across this info in Wikipedia:

http://en.wikipedia.org/wiki/Newline


The same tasks can be performed with sed, or in Perl if the platform
has a Perl interpreter:

sed -e 's/$/\r/' inputfile > outputfile # UNIX to
DOS (adding CRs)

sed -e 's/\r$//' inputfile > outputfile # DOS to
UNIX (removing CRs)

perl -p -e 's/(\r\n|\n|\r)/\r\n/g' inputfile > outputfile # Convert to DOS

perl -p -e 's/(\r\n|\n|\r)/\n/g' inputfile > outputfile # Convert to UNIX

perl -p -e 's/(\r\n|\n|\r)/\r/g' inputfile > outputfile # Convert to old Mac


It's probably the first time I've used sed!

Fixed: Maven 2 plugin problems with Bamboo/ Hudson + Tomcat setup on Windows

I've been tasked with setting up a continuous integration system at
work, and I've been evaluating - or trying to at least run - these
packages:

- Continuum
- Hudson
- Bamboo


I've yet to try these out:

- Luntbuild
- Cruisecontrol

From the looks of things, I proably should have tried out other two
before the other ones, given the lack of success I've had so far. :(

After a few emails exchanged with Atlassian Support re: Bamboo, I've
fixed a problem I was having with Bamboo and Hudson on my PC. I was
running them under Tomcat, which was installed as a Windows service.
My Ant builds were working fine, but my Maven2 builds were failing,
and would constantly complain that the 'maven-clean-plugin' was
missing, with errors like this:

Bamboo:

12-Sep-2007 16:48:01 [INFO]
----------------------------------------------------------------------------
12-Sep-2007 16:48:01 [INFO] Building AppFuse Core Application
12-Sep-2007 16:48:01 [INFO] task-segment: [clean, test]
12-Sep-2007 16:48:01 [INFO]
----------------------------------------------------------------------------
12-Sep-2007 16:48:01 [INFO] artifact
org.apache.maven.plugins:maven-clean-plugin: checking for updates from
appfuse
12-Sep-2007 16:48:02 [WARNING] repository metadata for: 'artifact
org.apache.maven.plugins:maven-clean-plugin' could not be retrieved
from repository: appfuse due to an error: Error transferring file
12-Sep-2007 16:48:02 [INFO] Repository 'appfuse' will be blacklisted
12-Sep-2007 16:48:03 [INFO]
------------------------------------------------------------------------
12-Sep-2007 16:48:03 [ERROR] BUILD ERROR
12-Sep-2007 16:48:03 [INFO]
------------------------------------------------------------------------
12-Sep-2007 16:48:03 [INFO] The plugin
'org.apache.maven.plugins:maven-clean-plugin' does not exist or no
valid version could be found
12-Sep-2007 16:48:03 [INFO]
------------------------------------------------------------------------
12-Sep-2007 16:48:03 [INFO] For more information, run Maven with the -e switch
12-Sep-2007 16:48:03 [INFO]
------------------------------------------------------------------------
12-Sep-2007 16:48:03 [INFO] Total time: 1 second
12-Sep-2007 16:48:03 [INFO] Finished at: Wed Sep 12 16:48:03 EST 2007
12-Sep-2007 16:48:03 [INFO] Final Memory: 1M/?4M
12-Sep-2007 16:48:03 [INFO]
------------------------------------------------------------------------

HUDSON:

[struts2-starter] $ C:\javatools\maven-2.0.6\bin\mvn.bat package
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Struts 2 Starter
[INFO] task-segment: [package]
[INFO] ----------------------------------------------------------------------------
[INFO] artifact org.apache.maven.plugins:maven-resources-plugin:
checking for updates from central
[WARNING] repository metadata for: 'artifact
org.apache.maven.plugins:maven-resources-plugin' could not be
retrieved from repository: central due to an error: Error transferring
file
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin'
does not exist or no valid version could be found


I had already come across an issue raised for Hudson concerning this,
but didn't completely figure out what it meant:

https://hudson.dev.java.net/issues/show_bug.cgi?id=470

"The current workaround is to have hudson run under a new user with
its own .m2 directory and have whichever profiles are necessary
activated by default. That way, the profiles are picked up as part of
the alignWithUserInstallation mechanism in the embedder."

Atlassian support was able to replicate the error I was getting by
running the Bamboo standalone running under the SYSTEM directory, and
asked me to check if Tomcat was running as SYSTEM, which it was, as I
that is the default when you install Tomcat as a Windows service.
Ah, of course! <lightbulb moment>

When these packages do their continous integration, Bamboo and Hudson
are calling outside the web application to an external batch file. So
when Maven gets run by Bamboo or Hudson, Maven will run as *that*
user, which in this case is the SYSTEM user. I guess SYSTEM user will
try to get its settings from C:\Documents and Settings\Default User\
and not my own user account with the correct maven settings.

So the solution was to go into Services, look for "Apache Tomcat" then
in the "Log On As" column, get it to run as a user with the correct
Maven settings.

Now I don't know if I would have gotten this problem if I was running
under Linux. I think I would still have, because if Tomcat was running
under the user "tomcat", but my maven settings were under a
"autobuild" directory, it would be the same scenario, and the fix
would be to run Tomcat - or whatever app server you're using - under
the "autobuild" account.

Friday, 7 September 2007

Unable to mount .dmg files in OS X - "Device not configured" error. How to fix it.

I had downloaded some DMG files to install some software and kept
getting these error messages:

Unable to attach "Foo.dmg" - Device not configured.

It was happening for more than one .dmg file, and I'm sure the
download was not corrupted.

At first, I tried using the Disk Utility, thinking it was related to
disk permissions, but the option wasn't present when I selected the
DMG. Clicking on "Verify disk" didn't help either, and resulted in the
same error "Device not configured".

Tried the instructions below and they worked.

1. Go into terminal

2. type

su [username that has admin rights]

you will be asked for your admin password.

3. Then run these commands. (I don't know what they do but they worked)

sudo kextunload -c com.apple.AppleDiskImageController

sudo kextload -b com.apple.AppleDiskImageController

4. Now try to mount those .dmg files.

Addendum: It's still not fixed. Now I'm just getting a new error message - "no mountable file systems". Oh great.

Do I believe in Free Markets? Why Sure I do!

http://www.theonion.com/content/news/u_s_to_give_every_iraqi_3_544_91

Tuesday, 4 September 2007

Set up Tomcat to redirect HTTP requests to HTTPS

We had JIRA installed and using the built-in Tomcat app server,
accepting both HTTP and HTTPS requests. We wanted to restrict it so
that all JIRA access was only via SSL. The config changes were pretty
simple.
1. Change Tomcat's server.xml.
Edit the non-SSL <Connector> entry listening on port 80 and add or
edit the redirectPort atribute to point to the port on which the SSL
<Connector> is listening. By default, the redirectPort was pointing
to port 443.
Was:
<Connector port="80"
enableLookups="false" redirectPort="8443"
maxThreads="100" minSpareThreads="100" maxSpareThreads="100"/>

Changed to:
<Connector port="80"
enableLookups="false" redirectPort="443"
maxThreads="100" minSpareThreads="100" maxSpareThreads="100"/>
Because the SSL entry was:


2. In the Tomcat web.xml file the following <security-constraint> has
to be added within the <web-app> element. This new element must be
added after the <servlet-mapping> element:

<!-- SSL settings. only allow HTTPS access to JIRA -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

Friday, 31 August 2007

Why does Artifactory detect your Maven settings.xml

I've been given the job of setting up a build environment at work, and
one of the things I'm setting up is a local Maven repository, and to
have an easy way of maintaining it. I'm testing out Artifactory
(http://www.jfrog.org/sites/artifactory/latest/), and I've come across
what seems to be a bug. In the Config instructions, it only mentions
artifactory.config.xml. There is no mention of any config files
outside the Artifactory install directory.

It seems that if you install Artifactory on a machine that already has
Maven installed on it, it will use the settings.xml for that Maven
installation. This however means that if there are any errors in that
local settings.xml - ie, invalid XML, etc - then Artifactory will not
run.

A few of the things I tried that didn't work:

- delete [ARTIFACTORY_HOME]/data directory
- renamed old Artifactory directory and reinstalled from zip file
- cleaned out C:/Temp

In the console output I noticed this error:

Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: in comment
after two dashes (--) next character must be > not - (position: START_TAG seen .
..</nonProxyHosts>\r\n---... @15:4)
at org.codehaus.plexus.util.xml.pull.MXParser.parseComment(MXParser.java
:2334)
at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:117
4)
at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1090)
at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.parseSettings(Se
ttingsXpp3Reader.java:1325)
at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.read(SettingsXpp
3Reader.java:1637)
at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.read(SettingsXpp
3Reader.java:1648)

Which would indicate something wrong with an XML config file. I had
settings.xml open and I remembered I'd had this problem before with
XML files.

I removed the dashes in the XML comment, restarted Artifactory, and
w000t, it was working again.

Wednesday, 29 August 2007

Is it too much to expect examples to work as described?

Tried creating and running a sample app in AppFuse:

http://appfuse.org/display/APF/AppFuse+QuickStart


Yes, set up MySQL 5 on my PC, have Maven and the JDK installed.

Then created two examples:

mvn archetype:create -DarchetypeGroupId=org.appfuse
-DarchetypeArtifactId=appfuse-modular-struts
-DremoteRepositories=http://static.appfuse.org/repository
-DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app
-DartifactId=simplecrud


mvn archetype:create -DarchetypeGroupId=org.appfuse
-DarchetypeArtifactId=appfuse-modular-tapestry
-DremoteRepositories=http://static.appfuse.org/repository
-DarchetypeVersion=2.0-m5 -DgroupId=com.mycompany.app
-DartifactId=tapestry-mod-crud

Then tried to run "mvn integration-test" on each of them.

Both are failing at this point:

[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[delete] Deleting: C:\work\tapestry-mod-crud\web\target\webtest-data\web-test
s-result.xml
[echo] Testing 'tapestry-mod-crud-webapp-1.0-SNAPSHOT' with locale 'en'

Login:
log4j:WARN No appenders could be found for logger (com.canoo.webtest.ant.TestSte
pSequence).
log4j:WARN Please initialize the log4j system properly.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
C:\work\tapestry-mod-crud\web\src\test\resources\web-tests.xml:27: Canoo Webtest
: R_1454.
Test failed.
Test step steps (C:\work\tapestry-mod-crud\web\src\test\resources\web-tests.xml:
29: ) null failed with message "Step[invoke "get Login Page" (1/6)]: HTTP error
502, at: invoke"
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39 seconds
[INFO] Finished at: Wed Aug 29 18:33:37 EST 2007
[INFO] Final Memory: 22M/44M
[INFO] ------------------------------------------------------------------------


AAARGH.

My co-worker seems to have a sample app set up and running correctly,
but most likely he's not going through the integration tests, or
didn't create the modular projects.

Interesting projects to write

Interesting scripts to write, just as an exercise. Write them in Ruby
then Python.

1. A script that goes through a directory of images and

- renames them, based on EXIF data with name format yyyymmdd-hhmmss.jpg
- creates directories for each distinct date

ie,

create

/20070828/
/20070829/

if the images in the directory are from 28 and 29 august

- (optional) if within the day there is a big gap in the batches of
images (ie, next image is 2 hrs later - have this gap specified in the
parameters), create a directory with " - [number]"

ie,

20070828 - 1

(because the next image timestamp is >=2 hrs later, this must be
another event, so better to have a separate directory)

20070828 - 2


2. The user types in a string and the program constructs an image or
web page with the message typed in "ransom note" format (ie, varying
font types per letter), with letter images fetched from Flickr


3. Go through all my entire Flickr photos and change licensing of all photos.

4. Go through all my mp3s and see if there are any podcasts that don't
have the "podcast" flag missing, then 'switch it on'

5. Get my bookmarks from del.icio.us, then upload to Google Bookmarks.

6. Go through all my photos and flag which ones
- are not readable
- have incomplete EXIF date info
- don't have thumbnails

7. Consolidate my del.icio.us tags. Right now I have some links tagged as "blog", and some are "blogs". Some are "book" and others are "books". Go through all the link tags, and based on which ones are in the majority, rename the tag with a smaller count to the one with the higher count.

Tuesday, 28 August 2007

Work research - build server, continuous integration, java+ruby+.Net

We're planning to use Ruby and Java and possibly a little .Net in our new project, so just keeping track of some notes and things I've been researching. This will probably look ugly and require formatting from me.

More SVN config TODO:

* set up SVN+SSSH - otherwise, how will automated builds connect to SVN?
* Web interface for Subversion
ViewVC - requires python, GNU diff
WebSVN - http://websvn.tigris.org
Polarion - http://www.polarion.org/index.php?page=overview&project=svnwebclient

Continuous Integration environments

Java:
Continuum
Hudson - https://hudson.dev.java.net/
- handles maven2
- plugins for Jira, Findbugs, Violations (checkstyle, pmd, cpd and findbugs), Clover

http://damagecontrol.codehaus.org/Continuous+Integration+Server+Feature+Matrix

Ruby -- http://cruisecontrolrb.thoughtworks.com/
Continuous Integration Automater. - http://dev.rubyonrails.org/file/tools/cia/trunk/README
Damage Control - http://damagecontrol.codehaus.org/
Cerberus CI tool for Rails - http://cerberus.rubyforge.org/
handles ALL:

Luntbuild
Cruisecontrol - also has .Net

* Code Coverage
Emma - http://emma.sourceforge.net/samples.html - NO MAVEN PLUGIN - DOES NOT WORK IN INTELLIJ ANYMORE - works in cmd-line and Ant
Cobertura - http://cobertura.sourceforge.net/ - open source - originally from same source code as Clover... has Maven and Ant tasks
Clover - http://www.atlassian.com/software/clover/ - should integrate easily with Jira - supported everywhere! $2200 for team of 10.
features: http://www.atlassian.com/software/clover/whats-new.jsp

Utils to install on server:
Unix utils for win32
http://unxutils.sourceforge.net/
Zip - http://www.info-zip.org/

Saturday, 18 August 2007

Ah, YouTube has yet again made my day

Nothing illustrates the quality of most user-generated content better
than YouTube comments such as this:

"sk8rat420: its spelled "nazis" and its the comunist group in germany
during world war 2"

LOL! OMG! He mispelt the word comunnist!

:P

Words simply fail me. I can't find it in me to even pick on him. I am
just in despair, at how many of his ilk are out there.

The comment was found on this video:

http://www.youtube.com/watch?v=N1ftKOQaGbU

Tuesday, 14 August 2007

File under: "should've used better encryption"

http://www.smh.com.au/news/national/reprisal-raids-man-guilty/2007/08/14/1186857497172.html

Man taped using Pig Latin to organise Cronulla riot reprisal attacks.


A 29-year-old man was taped using the code language Pig Latin to
organise reprisal gangs the day after the Cronulla riots, a Sydney
court heard today.

Jeffrey Ismail, from Greenacre, pleaded guilty in Bankstown court this
morning to two charges of using a mobile phone to menace, harass or
offend on the day after the riots, December 12, 2005.

Social Software is the new vendor lock-in

An intriguing post about how "social software is the new vendor
lock-in." - http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=69141977-7514-443d-800b-1f95c1ff8dbe

Monday, 30 July 2007

50% packet loss on my wireless network!

Now I've always had problems with my wireless router, but never this bad.

This is from 2 metres away:

Ping has started ...

PING 192.168.1.254 (192.168.1.254): 56 data bytes
64 bytes from 192.168.1.254: icmp_seq=1 ttl=128 time=35.500 ms
64 bytes from 192.168.1.254: icmp_seq=4 ttl=128 time=13.359 ms
64 bytes from 192.168.1.254: icmp_seq=7 ttl=128 time=83.702 ms
64 bytes from 192.168.1.254: icmp_seq=8 ttl=128 time=98.455 ms
64 bytes from 192.168.1.254: icmp_seq=9 ttl=128 time=60.282 ms

--- 192.168.1.254 ping statistics ---
10 packets transmitted, 5 packets received, 50% packet loss
round-trip min/avg/max/stddev = 13.359/58.260/98.455/30.988 ms


Ping has started ...

PING 192.168.1.254 (192.168.1.254): 56 data bytes
64 bytes from 192.168.1.254: icmp_seq=0 ttl=128 time=8480.132 ms
64 bytes from 192.168.1.254: icmp_seq=1 ttl=128 time=7493.772 ms
64 bytes from 192.168.1.254: icmp_seq=2 ttl=128 time=6494.477 ms
64 bytes from 192.168.1.254: icmp_seq=3 ttl=128 time=5491.412 ms
64 bytes from 192.168.1.254: icmp_seq=4 ttl=128 time=4490.754 ms
64 bytes from 192.168.1.254: icmp_seq=5 ttl=128 time=3491.359 ms
64 bytes from 192.168.1.254: icmp_seq=6 ttl=128 time=2491.809 ms
64 bytes from 192.168.1.254: icmp_seq=7 ttl=128 time=1496.600 ms
64 bytes from 192.168.1.254: icmp_seq=8 ttl=128 time=497.477 ms

--- 192.168.1.254 ping statistics ---
10 packets transmitted, 9 packets received, 10% packet loss
round-trip min/avg/max/stddev = 497.477/4491.977/8480.132/2578.873 ms


What the hell is going on?

I then turned the antenna on its side and I got these from Network
Utility (OS X):

Ping has started ...

PING 192.168.1.254 (192.168.1.254): 56 data bytes
64 bytes from 192.168.1.254: icmp_seq=0 ttl=128 time=2.717 ms
64 bytes from 192.168.1.254: icmp_seq=1 ttl=128 time=3.083 ms
64 bytes from 192.168.1.254: icmp_seq=2 ttl=128 time=2.876 ms
64 bytes from 192.168.1.254: icmp_seq=3 ttl=128 time=5.423 ms
64 bytes from 192.168.1.254: icmp_seq=4 ttl=128 time=6.824 ms
64 bytes from 192.168.1.254: icmp_seq=5 ttl=128 time=5.982 ms
64 bytes from 192.168.1.254: icmp_seq=6 ttl=128 time=3.871 ms
64 bytes from 192.168.1.254: icmp_seq=7 ttl=128 time=3.115 ms
64 bytes from 192.168.1.254: icmp_seq=8 ttl=128 time=2.946 ms
64 bytes from 192.168.1.254: icmp_seq=9 ttl=128 time=2.711 ms

--- 192.168.1.254 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.711/3.955/6.824/1.457 ms


Ping has started ...

PING 192.168.1.254 (192.168.1.254): 56 data bytes
64 bytes from 192.168.1.254: icmp_seq=0 ttl=128 time=4.986 ms
64 bytes from 192.168.1.254: icmp_seq=1 ttl=128 time=2.697 ms
64 bytes from 192.168.1.254: icmp_seq=2 ttl=128 time=2.659 ms
64 bytes from 192.168.1.254: icmp_seq=3 ttl=128 time=329.426 ms
64 bytes from 192.168.1.254: icmp_seq=4 ttl=128 time=3.694 ms
64 bytes from 192.168.1.254: icmp_seq=5 ttl=128 time=2.686 ms
64 bytes from 192.168.1.254: icmp_seq=6 ttl=128 time=6.140 ms
64 bytes from 192.168.1.254: icmp_seq=7 ttl=128 time=2.736 ms
64 bytes from 192.168.1.254: icmp_seq=8 ttl=128 time=3.012 ms
64 bytes from 192.168.1.254: icmp_seq=9 ttl=128 time=3.351 ms

--- 192.168.1.254 ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.659/36.139/329.426/97.769 ms

Solution:
Change the antenna position - make it horizontal instead of vertical.
The direction where it's pointing might make all the difference.

Sunday, 1 July 2007

Okay... now LinkedIn is starting to get scary.

I accepted an Invite from a former co-workeer in LinkedIn, and then on
the next page it showed a few names under "People you may know",
including an email friend that I have never worked with before, and
with whom I'm pretty sure I don't have any common connections. How it
found her, I have no idea. I didn't enter any friends emails in
LinkedIn to check if they were on the site, so other than that I can't
explain how the system ended up suggesting her name. Has LinkedIn
become part of the Google Skynet? :P

Saturday, 23 June 2007

Maven depgraph plugin: getting a better picture of your Maven dependencies

Dependency management has always been a beeyotch, and it's only gotten
worse over the years. This library needs that and that and that
library, and another jar needs that and that jar. Then you could get
one jar depending on an older version of another jar, and another
requiring a newer one. God knows this leads to simple webapps that
only have 4 classes but so many dependencies that they balloon to 14Mb
.war files!

Maven has been a big help in managing this, but the introduction of
transitive dependencies in Maven2 has also resulted in the developer
knowing even less about what libraries are being used. Granted, the
whole thing saves you from having to specify each and every one of
those dependencies, but the fact you had to do it also meant you at
least *knew* what was going in there. And if there were any errors due
to conflicting library versions, you didn't have to trawl through as
many directories to find out what the conflict was. In Maven2, this
pretty much means you have to go through the .pom files in your
repository, whereas in Maven 1 you just had to look in your project's
project.xml.

Anyway, I came across this blog post about a maven plugin that
generates a diagram showing your maven dependencies:

http://mult.ifario.us/articles/2007/03/07/ok-who-put-the-junit-jar-in-my-war

It uses the very useful GraphViz (http://www.graphviz.org/) to create
the images.

It should be as easy as running:

mvn depgraph:depgraph

Sadly, I couldn't get it to work on my PC. Looks like there's a
parameter you pass in so the plugin knows your local repository -
which is kinda strange, since shouldn't it be able to get this from
Maven, which obviously *would* already have this information? The
parameter "m_localRepository" is a required parameter but the plugin
site (http://el4j.sourceforge.net/plugins/maven-depgraph-plugin/depgraph-mojo.html)
lacks examples of the proper usage. I mucked around and *seemed* to
get it working with a call to:

mvn depgraph:depgraph -Dm_localRepository="C:\localrepository"

But again, that didn't work. One of these days I'll get it working,
but looming deadlines require my attention on more immediate things to
do.

.