Examples of ExplodedArchive


Examples of org.springframework.boot.loader.archive.ExplodedArchive

  private static final AsciiBytes LIB = new AsciiBytes("lib/");

  public static ClassLoader createModuleClassLoader(Resource moduleLocation, ClassLoader parent) {
    try {
      File moduleFile = moduleLocation.getFile();
      Archive moduleArchive = moduleFile.isDirectory() ? new ExplodedArchive(moduleFile) : new JarFileArchive(moduleFile);
      List<Archive> nestedArchives = moduleArchive.getNestedArchives(new Archive.EntryFilter() {
        @Override
        public boolean matches(Archive.Entry entry) {
          return !entry.isDirectory() && entry.getName().startsWith(LIB);
        }
View Full Code Here

Examples of org.springframework.boot.loader.archive.ExplodedArchive

    File root = new File(path);
    if (!root.exists()) {
      throw new IllegalStateException(
          "Unable to determine code source archive from " + root);
    }
    return (root.isDirectory() ? new ExplodedArchive(root) : new JarFileArchive(root));
  }
View Full Code Here

Examples of org.springframework.boot.loader.archive.ExplodedArchive

    File webInfLib = new File(warRoot, "WEB-INF/lib");
    webInfLib.mkdirs();
    File webInfLibFoo = new File(webInfLib, "foo.jar");
    new JarOutputStream(new FileOutputStream(webInfLibFoo)).close();

    WarLauncher launcher = new WarLauncher(new ExplodedArchive(warRoot, true));
    List<Archive> archives = launcher.getClassPathArchives();
    assertEquals(2, archives.size());

    assertThat(
        getUrls(archives),
View Full Code Here

Examples of org.springframework.boot.loader.archive.ExplodedArchive

      return value;
    }

    try {
      // Prefer home dir for MANIFEST if there is one
      Manifest manifest = new ExplodedArchive(this.home, false).getManifest();
      if (manifest != null) {
        String value = manifest.getMainAttributes().getValue(manifestKey);
        this.logger.fine("Property '" + manifestKey
            + "' from home directory manifest: " + value);
        return value;
View Full Code Here

Examples of org.springframework.boot.loader.archive.ExplodedArchive

    if (!isAbsolutePath(root)) {
      file = new File(this.home, root);
    }
    if (file.isDirectory()) {
      this.logger.info("Adding classpath entries from " + file);
      Archive archive = new ExplodedArchive(file, false);
      lib.add(archive);
    }
    Archive archive = getArchive(file);
    if (archive != null) {
      this.logger.info("Adding classpath entries from archive " + archive.getUrl()
          + root);
      lib.add(archive);
    }
    Archive nested = getNestedArchive(root);
    if (nested != null) {
View Full Code Here

Examples of org.springframework.boot.loader.archive.ExplodedArchive

      else if (url.toString().endsWith("/*")) {
        String name = url.getFile();
        File dir = new File(name.substring(0, name.length() - 1));
        if (dir.exists()) {
          lib.add(0,
              new ExplodedArchive(new File(name.substring(0,
                  name.length() - 1)), false));
        }
      }
      else {
        String filename = URLDecoder.decode(url.getFile(), "UTF-8");
        lib.add(0, new ExplodedArchive(new File(filename)));
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.