I have a Hudson CI server which is building a making a maven build. A parent project with two sub projects. One of maven subprojects creates a rather large .war (10MB) file which is stored for every build. I'd like to get rid of that .war file to save disk space, but I'd like to store everything else the Hudson build stores in history (test results, graphs etc.).
The .war file is stored under jobs/PROJECT_NAME/modules/PACKAGE_NAME$SUB_PROJECT_NAME/builds/2009-12-23_11-59-11/archive/PACKAGE_NAME/SUB_PROJECT_NAME/1.0/SUB_PROJECT_NAME-1.0.war
I have tried using job configuration according to this SO question namely Archive the artifacts and Discard all but the last successful/stable artifact to save disk space. But that actually does following:
- An additional copy is stored for two last build under
jobs/PROJECT_NAME/builds/2009-12-29_17-23-39/archive/PROJECT_NAME/web/target/PROJECT_NAME-web-1.0.war
. So it actually increases disk space consumption a bit. - Web page for this hudson jobs contains links to .war files in the two last builds.
My build just executes clean install
goals against parent pom.xml.
So how to configure Hudson server and/or Maven to remove build artifacts automatically from under jobs/PROJECT_NAME/modules
and leave them under jobs/PROJECT_NAME/builds
?