Package de.matrixweb.smaller.resource

Examples of de.matrixweb.smaller.resource.VFSResourceResolver


    try {
      final VFS vfs = new VFS();
      try {
        vfs.mount(vfs.find("/"), new ServletFile(getServletContext(), "/"));
        this.result = new Pipeline(processorFactory).execute(
            Version.getCurrentVersion(), vfs, new VFSResourceResolver(vfs),
            task);
      } finally {
        vfs.dispose();
      }
    } catch (final IOException e) {
View Full Code Here


      if (this.buildResult == null) {
        try {
          // Note: First create hash to not have generated files in VFS
          this.hash = hashGenerator.createVersionHash(vfs);
          this.pipeline.execute(Version.getCurrentVersion(), this.vfs,
              new VFSResourceResolver(this.vfs), null, this.processDescription);
          this.buildResult = VFSUtils.readToString(this.vfs
              .find(this.processDescription.getOutputFile()));
        } catch (SmallerException e) {
          LOGGER.error("Failed to create resource for '" + processDescription.getOutputFile() + "'", e);
        }
View Full Code Here

      final HttpServletResponse response, final OutputStream out)
      throws IOException {
    Context context = null;
    try {
      context = setUpContext(request.getInputStream());
      final ResourceResolver resolver = new VFSResourceResolver(context.vfs);
      if (!context.manifest.getProcessDescriptions().isEmpty()) {
        executeProcesses(context, resolver, request);
      } else {
        executeTasks(context, resolver, request);
      }
View Full Code Here

            }
          });
          try {
            getLog().info("MVN: Adding " + base + " to VFS");
            vfs.mount(vfs.find("/"), new JavaFile(base));
            final ResourceResolver resolver = new VFSResourceResolver(vfs);
            final Manifest manifest = Manifest.fromConfigFile(configFile);
            final Pipeline pipeline = new Pipeline(processorFactory);
            pipeline.execute(Version.getCurrentVersion(), vfs, resolver,
                manifest, target);
          } finally {
View Full Code Here

        final File source = FileUtils.toFile(this.getClass().getResource(
            "/" + file));
        final VFS vfs = new VFS();
        try {
          vfs.mount(vfs.find("/"), new JavaFile(source));
          final ResourceResolver resolver = new VFSResourceResolver(vfs);
          final Manifest manifest = getManifest(source);
          new Pipeline(processorFactory).execute(Version.getCurrentVersion(),
              vfs, resolver, manifest, target);
          callback.test(vfs, manifest);
        } finally {
View Full Code Here

        }

        final VFS vfs = new VFS();
        try {
          vfs.mount(vfs.find("/"), new JavaFile(temp));
          final ResourceResolver resolver = new VFSResourceResolver(vfs);

          final Manifest manifest = Manifest.fromConfigFile(configFile);
          final Pipeline pipeline = new Pipeline(processorFactory);
          pipeline.execute(Version.getCurrentVersion(), vfs, resolver,
              manifest, this.target);
View Full Code Here

TOP

Related Classes of de.matrixweb.smaller.resource.VFSResourceResolver

Copyright © 2018 www.massapicom. 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.