Source:
public FractionMetadata apply(FractionMetadata meta) throws MojoExecutionException { try { this.meta = meta; loadRewriteRules(); Set<String> requiredModules = new HashSet<>(); Set<String> availableModules = new HashSet<>(); walkProjectModules(requiredModules, availableModules); walkDependencyModules(availableModules); Map<String, File> potentialModules = new HashMap<>(); indexPotentialModules(potentialModules); if (requiredModules.isEmpty()) { return meta; } locateFillModules(potentialModules, requiredModules, availableModules); DecimalFormat fmt = new DecimalFormat("###0.00", new DecimalFormatSymbols(Locale.US)); double bytesInMegabyte = 1024.0 * 1024.0; long size = 0; boolean unknownSize = false; for (Artifact artifact : this.allArtifacts) { ArtifactRequest req = new ArtifactRequest(); req.setArtifact(artifact); String artifactSizeStr = "???"; try { ArtifactResult artifactResult = this.resolver.resolveArtifact(repositorySystemSession, req); if (artifactResult.isResolved()) { File file = artifactResult.getArtifact().getFile(); long artifactSize = Files.size(file.toPath()); size += artifactSize; artifactSizeStr = fmt.format(artifactSize / bytesInMegabyte); } else { unknownSize = true; } } catch (ArtifactResolutionException | IOException e) { unknownSize = true; } this.log.info(String.format("%100s %10s MB", toModuleArtifactName(artifact), artifactSizeStr)); } String sizeStr = fmt.format(size / bytesInMegabyte); this.log.info(this.project.getArtifactId() + ": total size: " + sizeStr + (unknownSize ? "+" : "") + " MB"); } catch (IOException e) { throw new MojoExecutionException("Failed collecting module dependencies of " + meta + ", check feature pack ZIPs", e); } return meta; }

Target:
public FractionMetadata apply(FractionMetadata meta) throws MojoExecutionException { try { this.meta = meta; loadRewriteRules(); Set<String> requiredModules = new HashSet<>(); Set<String> availableModules = new HashSet<>(); walkProjectModules(requiredModules, availableModules); walkDependencyModules(availableModules); Map<String, File> potentialModules = new HashMap<>(); indexPotentialModules(potentialModules); if (requiredModules.isEmpty()) { return meta; } locateFillModules(potentialModules, requiredModules, availableModules); DecimalFormat fmt = new DecimalFormat("###0.00", new DecimalFormatSymbols(Locale.US)); double bytesInMegabyte = 1024.0 * 1024.0; long size = 0; boolean unknownSize = false; for (Artifact artifact : this.allArtifacts) { ArtifactRequest req = new ArtifactRequest(); req.setArtifact(artifact); String artifactSizeStr = "???"; try { ArtifactResult artifactResult = this.resolver.resolveArtifact(repositorySystemSession, req); if (artifactResult.isResolved()) { File file = artifactResult.getArtifact().getFile(); long artifactSize = Files.size(file.toPath()); size += artifactSize; artifactSizeStr = fmt.format(artifactSize / bytesInMegabyte); } else { unknownSize = true; } } catch (ArtifactResolutionException | IOException e) { unknownSize = true; } this.log.info(String.format("%100s %10s MB", toModuleArtifactName(artifact), artifactSizeStr)); } String sizeStr; if (unknownSize && size == 0) { sizeStr = "unknown"; } else { sizeStr = fmt.format(size / bytesInMegabyte) + (unknownSize ? "+" : "") + " MB"; } this.log.info(this.project.getArtifactId() + ": total size: " + sizeStr); } catch (IOException e) { throw new MojoExecutionException("Failed collecting module dependencies of " + meta + ", check feature pack ZIPs", e); } return meta; }