Package de.matrixweb.smaller.common

Examples of de.matrixweb.smaller.common.Task


    final Set<String> resources = new ResourceScanner(getServletContext(),
        includes.split("[, ]"), excludes != null ? excludes.split("[, ]")
            : new String[] {}).getResources();
    final String options = getInitParameter("options");

    final Task task = new Task();
    task.setProcessor(processors);
    task.setIn(resources.toArray(new String[resources.size()]));
    task.setOut(new String[] { "output.js", "output.css" });
    task.setOptionsDefinition(options);
    final ProcessorFactory processorFactory = new JavaEEProcessorFactory();
    try {
      final VFS vfs = new VFS();
      try {
        vfs.mount(vfs.find("/"), new ServletFile(getServletContext(), "/"));
View Full Code Here


  @Deprecated
  private void executeTasks(final Context context,
      final ResourceResolver resolver, final HttpServletRequest request)
      throws IOException {
    Task task = context.manifest.getNext();
    while (task != null) {
      writeResults(context.vfs, this.pipeline.execute(
          Version.getVersion(request.getHeader(Version.HEADER)), context.vfs,
          resolver, task), context.targetDir, task);
      task = context.manifest.getNext();
View Full Code Here

  /** */
  @Test
  public void testOutputTypeExistOnlyOnce() {
    final VFS vfs = new VFS();
    try {
      final Task task = new Task();
      task.setIn(new String[] {});
      task.setOut(new String[] { "test.js", "test2.js" });

      this.pipeline.execute(Version._1_0_0, vfs, this.resourceResolver, task);
    } catch (final SmallerException e) {
      assertThat(e.getMessage(), is("Each output type must exist only once"));
    } finally {
View Full Code Here

TOP

Related Classes of de.matrixweb.smaller.common.Task

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.