Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
consolidating filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Kerwin committed Oct 18, 2016
1 parent 12c3ac6 commit a862ef2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.blackducksoftware.integration.build.Constants;
import com.blackducksoftware.integration.build.DependencyNode;
import com.blackducksoftware.integration.build.bdio.BdioConverter;
import com.blackducksoftware.integration.build.bdio.CommonBomFormatter;

public class BdioDependencyWriter {
private final Logger logger = LoggerFactory.getLogger(BdioDependencyWriter.class);

public void write(final File outputDirectory, final String filename, final String hubProjectName,
public void write(final File outputDirectory, final String hubProjectName,
final DependencyNode rootNode) throws IOException {
final BdioConverter bdioConverter = new BdioConverter();
final CommonBomFormatter commonBomFormatter = new CommonBomFormatter(bdioConverter);

// if the directory doesn't exist yet, let's create it
outputDirectory.mkdirs();

String filename = hubProjectName + Constants.BDIO_FILE_SUFFIX;
final File file = new File(outputDirectory, filename);
logger.info(String.format("Generating file: %s", file.getCanonicalPath()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.blackducksoftware.integration.build.Constants;
import com.blackducksoftware.integration.build.DependencyNode;

public class FlatDependencyListWriter {
private final Logger logger = LoggerFactory.getLogger(BdioDependencyWriter.class);

public void write(final File outputDirectory, final String filename, final DependencyNode rootNode)
public void write(final File outputDirectory, final String hubProjectName, final DependencyNode rootNode)
throws IOException {
final Set<String> gavStrings = new HashSet<>();
addAllGavs(gavStrings, rootNode);
Expand All @@ -29,6 +30,7 @@ public void write(final File outputDirectory, final String filename, final Depen
// if the directory doesn't exist yet, let's create it
outputDirectory.mkdirs();

String filename = hubProjectName + Constants.FLAT_FILE_SUFFIX;
final File file = new File(outputDirectory, filename);
logger.info(String.format("Generating file: %s", file.getCanonicalPath()));

Expand Down

0 comments on commit a862ef2

Please sign in to comment.