@@ -0,0 +1,3105 @@
+package org.apache.maven.continuum.xmlrpc.client;%0A%0A/*%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing,%0A * software distributed under the License is distributed on an%0A * %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A * KIND, either express or implied.  See the License for the%0A * specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Aimport java.net.URL;%0Aimport java.util.List;%0Aimport java.util.Date;%0A%0Aimport org.apache.maven.continuum.xmlrpc.project.*;%0A%0A/**%0A * Utility class to purge old build results.%0A * %3Cp/%3E%0A * The easiest way to use it is to change the exec plugin config in the pom to execute this class instead of%0A * SampleClient, change RETENTION_DAYS if desired, and type 'mvn clean install exec:exec'%0A */%0Apublic class BuildResultsPurge %7B%0A%0A    private static ContinuumXmlRpcClient client;%0A%0A    private static long RETENTION_DAYS = 60;%0A%0A    private static long DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000;%0A%0A    public static void main(String%5B%5D args)%0A            throws Exception %7B%0A%0A        client = new ContinuumXmlRpcClient(new URL(args%5B0%5D), args%5B1%5D, args%5B2%5D);%0A%0A        long today = new Date().getTime();%0A%0A        System.out.println(%22Today is %22 + new Date(today));%0A%0A        long purgeDate = today - (RETENTION_DAYS * DAY_IN_MILLISECONDS);%0A        //long purgeDate = today - 1000;  // 1 second ago (for testing)%0A%0A        System.out.println(%22Purging build results older than %22 + new Date(purgeDate));%0A%0A        List%3CProjectGroupSummary%3E groups = client.getAllProjectGroups();%0A%0A        for (ProjectGroupSummary group : groups) %7B%0A%0A            System.out.println(%22Project Group %5B%22 + group.getId() + %22%5D %22 + group.getName());%0A%0A            List%3CProjectSummary%3E projects = client.getProjects(group.getId());%0A%0A            for (ProjectSummary project : projects) %7B%0A%0A%0A                System.out.println(%22 Project %5B%22 + project.getId() + %22%5D %22 + project.getName());%0A%0A                List%3CBuildResultSummary%3E results = client.getBuildResultsForProject(project.getId());%0A%0A                for (BuildResultSummary brs : results) %7B%0A%0A                    BuildResult br = client.getBuildResult(project.getId(), brs.getId());%0A%0A                    System.out.print(%22  Build Result %5B%22 + br.getId() + %22%5D ended %22 + new Date(br.getEndTime()));%0A%0A                    if (br.getEndTime() %3E 0 && br.getEndTime() %3C purgeDate) %7B%0A%0A                        client.removeBuildResult(br);%0A                        System.out.println(%22 ...removed.%22);%0A                    %7D else %7B%0A                        System.out.println(%22 ...retained.%22);%0A                    %7D%0A                %7D%0A            %7D%0A%0A        %7D%0A    %7D%0A%7D%0A

Add a utility class as a workaround to purge old build results from the database until it is possible through the scheduled purge.