UpdateSiteGenerator { public void generateDownloads(String target) throws Exception { File targetFile = new File(target); if (targetFile.isDirectory()) { if (new File(targetFile, "content.jar").isFile()) { File archiveFile = getArchiveFile(target); if (!archiveFile.exists()) { createArchive(target); } if (!getDigestFile(archiveFile.getPath(), "SHA-256").isFile()) { createDigest(archiveFile, "SHA-256"); } if (!getDigestFile(archiveFile.getPath(), "SHA-512").isFile()) { createDigest(archiveFile, "SHA-512"); } } else { for (File child : targetFile.listFiles()) { if (child.isDirectory()) { generateDownloads(child.getPath()); } } } } }  String getPromoteUpdateSiteDestination(String buildType, String name); File promoteUpdateSite(final String source, final String buildType, String buildTimestamp); File mirrorUpdateSite(final String source, final String buildType); String getVersion(String targetRepository); RepositoryAnalyzer getRepositoryAnalyzer(List<String> repositories); String getCompositeUpdateSiteDestination(String buildType, boolean latest); String composeUpdateSites(List<String> sources, final String buildType, final boolean latest); static URI createURI(String path); static URI createURI(File file); void generateIndex(String target); void generateDownloads(String target); static void sort(List<String> repositories); static String getCanonicalPath(File file); static File getArchiveFile(String repository); static File createArchive(String repository); static File getDigestFile(String target, String algorithm); static final int RETAINED_NIGHTLY_BUILDS; static final List<String> BUILD_TYPES; static final List<String> BUILD_TYPE_QUALIFIERS; static final String DOWNLOAD_ECLIPSE_ORG_FOLDER; static final String DOWLOAD_ROOT_FOLDER; static final String BUILDS_ROOT_FOLDER; }
@Test public void step06GenerateDownloads() throws Exception { Assume.assumeTrue("true".equals(System.getProperty("publish.repository"))); UpdateSiteGenerator updateSiteGenerator = new UpdateSiteGenerator(); updateSiteGenerator.generateDownloads(UpdateSiteGenerator.BUILDS_ROOT_FOLDER); }