Search in sources :

Example 11 with JarMetaLoader

use of org.graalvm.component.installer.jar.JarMetaLoader in project graal by oracle.

the class InstallerTest method setupComponentInstall.

private void setupComponentInstall(String relativePath) throws IOException {
    File f = dataFile(relativePath).toFile();
    JarFile jf = new JarFile(f);
    loader = new JarMetaLoader(jf, this);
    componentInfo = loader.createComponentInfo();
    componentJarFile = new JarArchive(jf);
    loader.loadPaths();
    installer = new Installer(fb(), fileOps, componentInfo, registry, registry, componentJarFile);
    installer.setInstallPath(targetPath);
    installer.setLicenseRelativePath(SystemUtils.fromCommonRelative(loader.getLicensePath()));
}
Also used : JarArchive(org.graalvm.component.installer.jar.JarArchive) JarFile(java.util.jar.JarFile) JarFile(java.util.jar.JarFile) File(java.io.File) JarMetaLoader(org.graalvm.component.installer.jar.JarMetaLoader)

Aggregations

JarFile (java.util.jar.JarFile)11 JarMetaLoader (org.graalvm.component.installer.jar.JarMetaLoader)11 File (java.io.File)6 ComponentPackageLoader (org.graalvm.component.installer.persist.ComponentPackageLoader)6 Test (org.junit.Test)3 IOException (java.io.IOException)2 URL (java.net.URL)2 Path (java.nio.file.Path)1 ArrayList (java.util.ArrayList)1 Attributes (java.util.jar.Attributes)1 Manifest (java.util.jar.Manifest)1 DependencyException (org.graalvm.component.installer.DependencyException)1 DownloadURLParam (org.graalvm.component.installer.DownloadURLIterable.DownloadURLParam)1 MetadataException (org.graalvm.component.installer.MetadataException)1 JarArchive (org.graalvm.component.installer.jar.JarArchive)1 ComponentInfo (org.graalvm.component.installer.model.ComponentInfo)1 CatalogItemParam (org.graalvm.component.installer.remote.CatalogIterable.CatalogItemParam)1 Before (org.junit.Before)1