コード例 #1
0
  protected File getOutputDirectory() {
    if (!outputDirectory.isAbsolute()) {
      outputDirectory = new File(getBasedir(), outputDirectory.getPath());
    }
    // Create the folder structure.
    if (!outputDirectory.exists()) {
      outputDirectory.mkdirs();
    }

    return outputDirectory.getAbsoluteFile();
  }
コード例 #2
0
  /**
   * This method will get an existing configuration file for doxygen or will create a new one with
   * the configured parameters.
   *
   * @return The configuration file.
   * @throws MavenReportException
   */
  public File buildConfigurationFile() throws MavenReportException {
    File ret = getConfigurationFile();

    if (ret == null) {
      ret = new File(getOutputDirectory(), "doxygen.config");
      buildConfigurationFile(ret);
    } else if (!ret.exists()) {
      buildConfigurationFile(ret);
    }

    return ret;
  }
コード例 #3
0
  /**
   * This will check if the given information for the doxygen executable is enough. If not than we
   * search on the path for doxygen executable.
   *
   * @return Path to the doxygen executable.
   */
  private String getExecutablePath() {
    File execFile = new File(executable);
    if (execFile.exists()) {
      getLog().debug("Toolchains are ignored, 'executable' parameter is set to " + executable);
      return execFile.getAbsolutePath();
    } else {
      Toolchain tc = getToolchain();

      // if the file doesn't exist & toolchain is null, the exec is probably in the PATH...
      // we should probably also test for isFile and canExecute, but the second one is only
      // available in SDK 6.
      if (tc != null) {
        getLog().info("Toolchain in doxygen plugin: " + tc);
        executable = tc.findTool(executable);
      }
    }

    return executable;
  }