Search in sources :

Example 1 with CatalogItemParam

use of org.graalvm.component.installer.remote.CatalogIterable.CatalogItemParam in project graal by oracle.

the class CommandTestBase method initRemoteComponent.

protected void initRemoteComponent(String relativeJar, String u, String disp, String spec) throws IOException {
    clu = getClass().getResource(relativeJar);
    url = new URL(u);
    Handler.bind(url.toString(), clu);
    File f = dataFile(relativeJar).toFile();
    JarFile jf = new JarFile(f, false);
    ComponentPackageLoader cpl = new JarMetaLoader(jf, this);
    info = cpl.getComponentInfo();
    // unknown in catalog metadata
    info.setLicensePath(null);
    info.setRemoteURL(url);
    param = rparam = new CatalogItemParam(this, info, disp, spec, this, false);
}
Also used : CatalogItemParam(org.graalvm.component.installer.remote.CatalogIterable.CatalogItemParam) JarFile(java.util.jar.JarFile) JarFile(java.util.jar.JarFile) File(java.io.File) URL(java.net.URL) ComponentPackageLoader(org.graalvm.component.installer.persist.ComponentPackageLoader) JarMetaLoader(org.graalvm.component.installer.jar.JarMetaLoader)

Aggregations

File (java.io.File)1 URL (java.net.URL)1 JarFile (java.util.jar.JarFile)1 JarMetaLoader (org.graalvm.component.installer.jar.JarMetaLoader)1 ComponentPackageLoader (org.graalvm.component.installer.persist.ComponentPackageLoader)1 CatalogItemParam (org.graalvm.component.installer.remote.CatalogIterable.CatalogItemParam)1