Usages of

de.flapdoodle.embed.process.distribution.IVersion.asInDownloadPath()
// #### Build a generic process starter @Test public void genericProcessStarter() throws IOException { IVersion version=new GenericVersion("2.1.1"); IRuntimeConfig config = new GenericRuntimeConfigBuilder() .name("phantomjs") //https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 .downloadPath("https://bitbucket.org/ariya/phantomjs/downloads/") .packageResolver() .files(Distribution.detectFor(version), FileSet.builder().addEntry(FileType.Executable, "phantomjs").build()) .archivePath(Distribution.detectFor(version), "phantomjs-"+version.asInDownloadPath()+"-linux-x86_64.tar.bz2") .archiveType(Distribution.detectFor(version), ArchiveType.TBZ2) .build() .build(); GenericStarter starter = new GenericStarter(config); GenericExecuteable executable = starter.prepare(new GenericProcessConfig(version, null)); GenericProcess process = executable.start(); process.stop(); executable.stop(); }
@SuppressWarnings("deprecation") private boolean shipThisVersion(Platform platform, IVersion version, BitSize bitsize) { // there is no osx 32bit version for v2.2.1 and above String currentVersion = version.asInDownloadPath(); if ((platform == Platform.OS_X) && (bitsize == BitSize.B32)) { if (currentVersion.equals(Version.V1_4_22.asInDownloadPath())) return true; // if // (currentVersion.equals(Version.V1_4_14.asInDownloadPath())) // return true; if (currentVersion.equals( Version.Main.PRODUCTION.asInDownloadPath())) return true; // if (currentVersion.equals(Version.Main.DEPRECATED // .asInDownloadPath())) // return true; } return false; }
@SuppressWarnings("deprecation") private boolean shipThisVersion(Platform platform, IVersion version, BitSize bitsize) { // there is no osx 32bit version for v2.2.1 and above String currentVersion = version.asInDownloadPath(); if ((platform == Platform.OS_X) && (bitsize == BitSize.B32)) { if (currentVersion.equals(Version.V2_8_13.asInDownloadPath())) return true; if (currentVersion.equals(Version.V2_6_14.asInDownloadPath())) return true; if (currentVersion.equals(Version.Main.PRODUCTION .asInDownloadPath())) return true; if (currentVersion.equals(Version.Main.PRODUCTION .asInDownloadPath())) return true; } return false; }
private final IVersion _latest; // code omitted ... @Override public String asInDownloadPath() { return _latest.asInDownloadPath(); }
protected static String getVersionPart(IVersion version) { return version.asInDownloadPath(); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes