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

Commit

Permalink
Merge pull request #16 from blackducksoftware/IMC_20_fix
Browse files Browse the repository at this point in the history
add the artifactId string to use in the method
  • Loading branch information
psantos1113 committed Dec 19, 2016
2 parents 593622a + d37be31 commit c8f484b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ public ExternalIdentifier createExternalIdentifier(final Gav gav) {
public String createMavenId(final Gav gav) {
return String.format("mvn:%s/%s/%s", gav.getGroupId(), gav.getArtifactId(), gav.getVersion());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,24 @@
public class BdioDependencyWriter {
private final Logger logger = LoggerFactory.getLogger(BdioDependencyWriter.class);

public static String getFilename(String hubProjectName) {
return hubProjectName + Constants.BDIO_FILE_SUFFIX;
public static String getFilename(String artifactId) {
return artifactId + Constants.BDIO_FILE_SUFFIX;
}

public void write(final File outputDirectory, final String hubProjectName,
public void write(final File outputDirectory, final String artifactId, 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 = getFilename(hubProjectName);
final String filename = getFilename(artifactId);
final File file = new File(outputDirectory, filename);
logger.info(String.format("Generating file: %s", file.getCanonicalPath()));

try (final OutputStream outputStream = new FileOutputStream(file)) {
commonBomFormatter.writeProject(outputStream, hubProjectName, rootNode);
}
}

}

0 comments on commit c8f484b

Please sign in to comment.