As this is my first look inside Jenkins codebase I not sure it's correct
but perhaps artifacts for modulebuilds should be deleted just as logs
are deleted. see https://issues.jenkins-ci.org/browse/JENKINS-17508
I did not fully test it yet, all unit tests ran fine, but didn't succeed
to run jobs inside Jenkins, due to classloader issues while running
Jenkins in Jetty, to verify deletion
adds test that looks in jobs archive with 2 builds when LogRotator set as build discarder with settings to keep only 1 build with artifacts, test searches for jars in archive for build one and build two expecting no jars in build 1 and expecting jars in build 2
add documentation to testcase.
also testing the removal of build if LogRotator is configured to discard
old builds and not only artifacts (Not needed for the issue, but an
extra test is not a luxury )
JENKINS-17508 updated the test to use @Rule and no longer extend from the old HudsonTestCase (shouldn't that one be marked deprecated?), add @ Bug and @ For as jesse suggested
JENKINS-17508 removed usage of deprecated elements in test
changed the filepath#toUri call to #getRemote as per comment of @jglick
Merge pull request #759 from redlab/JENKINS-17508

[FIXED JENKINS-17508] Artifacts not being deleted by LogRotator