Package com.google.gwt.dev.util

Examples of com.google.gwt.dev.util.OutputFileSet


      IOException {
    StandardLinkerContext linkerContext = new StandardLinkerContext(logger,
        module, precompileOptions);
    ArtifactSet artifacts = doLink(logger, linkerContext, generatedArtifacts,
        resultFiles);
    OutputFileSet outFileSet = new OutputFileSetOnDirectory(outDir,
        module.getName() + "/");
    OutputFileSet extraFileSet = new OutputFileSetOnDirectory(outDir,
        module.getName() + "-aux/");
    doProduceOutput(logger, artifacts, linkerContext, outFileSet, extraFileSet);
  }
View Full Code Here


  public boolean run(TreeLogger logger) throws UnableToCompleteException {
    for (String moduleName : options.getModuleNames()) {
      ModuleDef module = ModuleDefLoader.loadFromClassPath(logger, moduleName);

      OutputFileSet outFileSet;
      OutputFileSet extraFileSet;
      try {
        if (options.getOutDir() == null) {
          outFileSet = chooseOutputFileSet(options.getWarDir(),
              module.getName() + "/");
          extraFileSet = chooseOutputFileSet(options.getExtraDir(),
View Full Code Here

        + module.getName() + "'");

    try {
      OutputFileSetOnDirectory outFileSet = new OutputFileSetOnDirectory(
          options.getWarDir(), module.getName() + "/");
      OutputFileSet extraFileSet = new NullOutputFileSet();
      if (options.getExtraDir() != null) {
        extraFileSet = new OutputFileSetOnDirectory(options.getExtraDir(),
            module.getName() + "/");
      }

      linkerStack.produceOutput(linkLogger, artifacts, false, outFileSet);
      linkerStack.produceOutput(linkLogger, artifacts, true, extraFileSet);

      outFileSet.close();
      extraFileSet.close();
    } catch (IOException e) {
      linkLogger.log(TreeLogger.ERROR, "I/O exception", e);
      throw new UnableToCompleteException();
    }
  }
View Full Code Here

    OutputFileSetOnDirectory outFileSet =
        new OutputFileSetOnDirectory(options.getModuleBaseDir(), module.getName() + "/");
    OutputFileSetOnDirectory deployFileSet =
        new OutputFileSetOnDirectory(options.getDeployDir(), module.getName() + "/");
    OutputFileSet extraFileSet = new NullOutputFileSet();
    if (options.getExtraDir() != null) {
      extraFileSet = new OutputFileSetOnDirectory(options.getExtraDir(), module.getName() + "/");
    }

    linkerStack.produceOutput(linkLogger, artifacts, Visibility.Public, outFileSet);
    linkerStack.produceOutput(linkLogger, artifacts, Visibility.Deploy, deployFileSet);
    linkerStack.produceOutput(linkLogger, artifacts, Visibility.Private, extraFileSet);

    outFileSet.close();
    deployFileSet.close();
    try {
      extraFileSet.close();
    } catch (IOException e) {
      linkLogger.log(TreeLogger.ERROR, "Error emiting extra files", e);
      throw new UnableToCompleteException();
    }
View Full Code Here

    // == create output filesets ==

    String destPrefix = module.getName() + "/";

    OutputFileSet outFileSet = chooseOutputFileSet(options.getWarDir(), destPrefix);
    OutputFileSet extraFileSet = chooseOutputFileSet(options.getExtraDir(), destPrefix);

    // allow -deploy and -extra to point to the same directory/jar
    OutputFileSet deployFileSet;
    if (options.getDeployDir().equals(options.getExtraDir())) {
      deployFileSet = extraFileSet;
    } else {
      deployFileSet = chooseOutputFileSet(options.getDeployDir(), destPrefix);
    }

    // == write the output ==

    linkerContext.produceOutput(logger, artifacts, Visibility.Public,
        outFileSet);
    linkerContext.produceOutput(logger, artifacts, Visibility.Deploy,
        deployFileSet);
    linkerContext.produceOutput(logger, artifacts, Visibility.Private,
        extraFileSet);

    if (saveSources) {
      // Assume that all source code is available in the compiler's classpath.
      // (This will have to be adjusted to work with Super Dev Mode.)
      ResourceLoader loader = ResourceLoaders.forClassLoader(Thread.currentThread());
      SourceSaver.save(logger, artifacts, loader, options, destPrefix, extraFileSet);
    }

    outFileSet.close();
    extraFileSet.close();
    if (deployFileSet != extraFileSet) {
      deployFileSet.close();
    }

    logger.log(TreeLogger.INFO, "Link succeeded");
  }
View Full Code Here

    }

    boolean saveInExtras = options.getSaveSourceOutput() == null ||
        options.getSaveSourceOutput().equals(options.getExtraDir());

    OutputFileSet out;
    if (saveInExtras) {
      out = extraFileSet;
      logger.log(Type.INFO, "Saving source with extras");
    } else {
      out = Link.chooseOutputFileSet(options.getSaveSourceOutput(), modulePrefix);
      logger.log(Type.INFO, "Saving source to " + options.getSaveSourceOutput());
    }

    try {
      copySources(logger, sourceMaps, genFiles, loader, out, "src/");
    } finally {
      if (!saveInExtras) {
        out.close();
      }
    }
  }
View Full Code Here

      IOException {
    StandardLinkerContext linkerContext = new StandardLinkerContext(logger,
        module, precompileOptions);
    ArtifactSet artifacts = doSimulatedShardingLink(logger, module,
        linkerContext, generatedArtifacts, permutations, resultFiles);
    OutputFileSet outFileSet = chooseOutputFileSet(outDir, module.getName()
        + "/");
    OutputFileSet deployFileSet = chooseOutputFileSet(outDir, module.getName()
        + "-deploy/");
    OutputFileSet extraFileSet = chooseOutputFileSet(outDir, module.getName()
        + "-aux/");
    doProduceOutput(logger, artifacts, linkerContext, outFileSet, deployFileSet,
        extraFileSet);
  }
View Full Code Here

      throws UnableToCompleteException, IOException {
    StandardLinkerContext linkerContext = new StandardLinkerContext(logger,
        module, precompileOptions);
    ArtifactSet artifacts = doSimulatedShardingLink(logger, module,
        linkerContext, generatedArtifacts, permutations, resultFiles);
    OutputFileSet extrasFileSet = chooseOutputFileSet(extrasDir,
        module.getName() + "/");
    // allow -deploy and -extra to point to the same directory/jar
    OutputFileSet deployFileSet;
    if (deployDir.equals(extrasDir)) {
      deployFileSet = extrasFileSet;
    } else {
      deployFileSet = chooseOutputFileSet(deployDir, module.getName() + "/");
    }
View Full Code Here

        + module.getName());
    StandardLinkerContext linkerContext = new StandardLinkerContext(branch,
        module, precompileOptions);

    try {
      OutputFileSet outFileSet = chooseOutputFileSet(options.getWarDir(),
          module.getName() + "/");
      OutputFileSet extraFileSet = chooseOutputFileSet(options.getExtraDir(),
          module.getName() + "/");
      // allow -deploy and -extra to point to the same directory/jar
      OutputFileSet deployFileSet;
      if (options.getDeployDir().equals(options.getExtraDir())) {
        deployFileSet = extraFileSet;
      } else {
        deployFileSet = chooseOutputFileSet(options.getDeployDir(),
            module.getName() + "/");
View Full Code Here

    OutputFileSetOnDirectory outFileSet =
        new OutputFileSetOnDirectory(options.getWarDir(), module.getName() + "/");
    OutputFileSetOnDirectory deployFileSet =
        new OutputFileSetOnDirectory(options.getDeployDir(), module.getName() + "/");
    OutputFileSet extraFileSet = new NullOutputFileSet();
    if (options.getExtraDir() != null) {
      extraFileSet = new OutputFileSetOnDirectory(options.getExtraDir(), module.getName() + "/");
    }

    linkerStack.produceOutput(linkLogger, artifacts, Visibility.Public, outFileSet);
    linkerStack.produceOutput(linkLogger, artifacts, Visibility.Deploy, deployFileSet);
    linkerStack.produceOutput(linkLogger, artifacts, Visibility.Private, extraFileSet);

    outFileSet.close();
    deployFileSet.close();
    try {
      extraFileSet.close();
    } catch (IOException e) {
      linkLogger.log(TreeLogger.ERROR, "Error emiting extra files", e);
      throw new UnableToCompleteException();
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.util.OutputFileSet

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.