Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Commit

Permalink
Added logging on processing stages
Browse files Browse the repository at this point in the history
  • Loading branch information
pfistererm committed Oct 30, 2019
1 parent f925e76 commit 046c5ea
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public abstract class AbstractScanMojo extends AbstractMojo {
private LegalStatus[] cleanOutputLegalStates;

/**
* List of licenses that should be filtered out if cleanOutput is active, given by their SPDX identifier.
* List of licenses that should be filtered out if cleanOutput is active, given by their SPDX identifier.
*/
@Parameter(property = "cleanOutputLicenseSpdxIdentifiers", required = false)
private String[] cleanOutputLicenseSpdxIdentifiers;
Expand Down Expand Up @@ -188,6 +188,7 @@ public abstract class AbstractScanMojo extends AbstractMojo {
* Whether a skeleton archive XML file of all found archives should be written.
*
* <p>If enabled, the file is written to {@link #archiveXmlSkeletonFile}.</p>
*
* @see #archiveXmlSkeletonFile
*/
@Parameter(defaultValue = "false", property = "writeArchiveXmlSkeleton", required = false)
Expand Down Expand Up @@ -304,13 +305,15 @@ public void execute() throws MojoExecutionException {
logNpmExcludedDirectoryNames(log);
ArchiveType archiveType = getArchiveType();
final AbstractFinder finder = createFinder(licenseStoreData, log);
getLog().info("Starting scan on " + scanDirectory.getAbsolutePath() + "...");

try {
final FinderResult finderResult = finder.findLicenses();
if (finderResult == null) {
getLog().info("No finder results.");
return;
}
getLog().info("Evaluating licenses...");
LicenseUtil.evaluateLicenses(checkedArchives, finderResult.getArchiveFiles(), licenseStoreData);
filterGlobal(finderResult.getArchiveFiles(), globalFilters, log);

Expand All @@ -335,6 +338,7 @@ public void execute() throws MojoExecutionException {

/**
* Obtains the archive type handled by this MOJO.
*
* @return an archive type
*/
protected abstract ArchiveType getArchiveType();
Expand Down

0 comments on commit 046c5ea

Please sign in to comment.