When compiling a maven project which is of maven-plugin packaging type, the maven-plugin-plugin-<version>.jar is not downloaded from an internal repo (archiva repo manager) at all.
I've noticed that the 'resource.getLastModified()' method call returns 0 which causes the following if statement to fail since timestamp is also 0:
if ( resource.getLastModified() > timestamp )
By replacing '>' with '>=' the problem goes away, but I am not sure if it's a valid fix.
BTW, this bug may be related to http://jira.codehaus.org/browse/WAGONHTTP-5.