@Override public String getURL() { return urlReference.getURL(); } }
@Override public String getURL() { return urlReference.getURL(); } }
@Override public String getURL() { return urlReference.getURL(); } }
@Override public String getURL() { return urlReference.getURL(); } }
public String getURL() { return urlReference.getURL(); }
public String getURL() { return urlReference.getURL(); }
/** * Adds the library from the URL to the WAR. The URL is assumed to reference a JAR. The JAR will * be downloaded if required and its contents will be copied to {@code WEB-INF/lib}. * * @param libraryUrl * URL referencing a library JAR * @return {@code this} for fluent syntax */ public WarProbeOption library(UrlReference libraryUrl) { libraries.add(libraryUrl.getURL()); return this; }
/** * Adds the library from the URL to the WAR. The URL is assumed to reference a JAR. The JAR will * be downloaded if required and its contents will be copied to {@code WEB-INF/lib}. * * @param libraryUrl * URL referencing a library JAR * @return {@code this} for fluent syntax */ public WarProbeOption library(UrlReference libraryUrl) { libraries.add(libraryUrl.getURL()); return this; }
/** * Adds an overlay from the given URL to the WAR. This is similar to the overlay concept of the * Maven WAR Plugin. The URL is assumed to reference an archive. The archive is downloaded if * required, and then its exploded contents are copied to the root of the WAR. All overlays are * copied in the given order. All overlay are copied before any libraries, classes or resources. * * @param overlayUrl * URL to overlay * @return {@code this} for fluent syntax */ public WarProbeOption overlay(UrlReference overlayUrl) { overlays.add(overlayUrl.getURL()); return this; }
/** * Adds an overlay from the given URL to the WAR. This is similar to the overlay concept of the * Maven WAR Plugin. The URL is assumed to reference an archive. The archive is downloaded if * required, and then its exploded contents are copied to the root of the WAR. All overlays are * copied in the given order. All overlay are copied before any libraries, classes or resources. * * @param overlayUrl * URL to overlay * @return {@code this} for fluent syntax */ public WarProbeOption overlay(UrlReference overlayUrl) { overlays.add(overlayUrl.getURL()); return this; }
@Override default InputStream createStream() throws IOException { return new URL(getURL()).openStream(); }
private void copyBootClasspathLibraries(File karafHome, ExamSystem subsystem) throws MalformedURLException, IOException { BootClasspathLibraryOption[] bootClasspathLibraryOptions = subsystem.getOptions(BootClasspathLibraryOption.class); for (BootClasspathLibraryOption bootClasspathLibraryOption : bootClasspathLibraryOptions) { UrlReference libraryUrl = bootClasspathLibraryOption.getLibraryUrl(); FileUtils.copyURLToFile( new URL(libraryUrl.getURL()), createFileNameWithRandomPrefixFromUrlAtTarget(libraryUrl.getURL(), new File(karafHome + "/lib"), new String[]{"jar"})); } }
/** * Copy jars specified as BootClasspathLibraryOption in system * to the karaf lib path to make them available in the boot classpath * * @throws IOException if copy fails */ public void copyBootClasspathLibraries() throws IOException { BootClasspathLibraryOption[] bootClasspathLibraryOptions = subsystem .getOptions(BootClasspathLibraryOption.class); for (BootClasspathLibraryOption bootClasspathLibraryOption : bootClasspathLibraryOptions) { UrlReference libraryUrl = bootClasspathLibraryOption.getLibraryUrl(); FileUtils.copyURLToFile( new URL(libraryUrl.getURL()), createUnique(libraryUrl.getURL(), new File( karafHome + "/lib"), new String[] { "jar" })); } }
/** * Copy jars specified as BootClasspathLibraryOption in system * to the karaf lib path to make them available in the boot classpath * * @throws IOException if copy fails */ public void copyBootClasspathLibraries() throws IOException { BootClasspathLibraryOption[] bootClasspathLibraryOptions = subsystem .getOptions(BootClasspathLibraryOption.class); for (BootClasspathLibraryOption bootClasspathLibraryOption : bootClasspathLibraryOptions) { UrlReference libraryUrl = bootClasspathLibraryOption.getLibraryUrl(); FileUtils.copyURLToFile( new URL(libraryUrl.getURL()), createUnique(libraryUrl.getURL(), new File( karafHome + "/lib"), new String[] { "jar" })); } }
/** * Converts boot classpath library options into corresponding arguments (--bcp/a, --bcp/p). * * @param libraries boot classpath libraries * * @return converted Pax Runner collection of arguments */ private Collection<String> extractArguments( final BootClasspathLibraryOption[] libraries ) { final List<String> arguments = new ArrayList<String>(); for( BootClasspathLibraryOption library : libraries ) { if( library.isBeforeFramework() ) { arguments.add( "--bcp/p=" + library.getLibraryUrl().getURL() ); } else { arguments.add( "--bcp/a=" + library.getLibraryUrl().getURL() ); } } return arguments; }
/** * Converts boot classpath library options into corresponding arguments (--bcp/a, --bcp/p). * * @param libraries boot classpath libraries * * @return converted Pax Runner collection of arguments */ private Collection<String> extractArguments( final BootClasspathLibraryOption[] libraries ) { final List<String> arguments = new ArrayList<String>(); for( BootClasspathLibraryOption library : libraries ) { if( library.isBeforeFramework() ) { arguments.add( "--bcp/p=" + library.getLibraryUrl().getURL() ); } else { arguments.add( "--bcp/a=" + library.getLibraryUrl().getURL() ); } } return arguments; }
public static UrlReference getArtemisMQKarafFeatureUrl() { String type = "xml/features"; UrlReference urlReference = mavenBundle().groupId("org.apache.activemq"). artifactId("artemis-features").versionAsInProject().type(type); LOG.info("FeatureURL: " + urlReference.getURL()); return urlReference; }
for (BootClasspathLibraryOption bootClasspathLibraryOption : bootClasspathLibraryOptions) { UrlReference libraryUrl = bootClasspathLibraryOption.getLibraryUrl(); String library = localize(libraryUrl.getURL());