Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Improve swarmtool fraction output
Browse files Browse the repository at this point in the history
Don't show the required fractions, sort.
  • Loading branch information
tobias committed Oct 28, 2015
1 parent 75783a9 commit c24181e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions swarmtool/src/main/java/org/wildfly/swarm/swarmtool/Build.java
Expand Up @@ -41,10 +41,13 @@
import java.util.zip.ZipFile;

public class Build {
final static Set<String> REQUIRED_FRACTIONS = new HashSet<String>() {{
add("bootstrap");
add("container");
}};

public Build() {
swarmDependencies.add("bootstrap");
swarmDependencies.add("container");
swarmDependencies.addAll(REQUIRED_FRACTIONS);
}

public Build source(final File source) {
Expand Down Expand Up @@ -157,7 +160,12 @@ public void run() throws Exception {
System.err.println(String.format("Building %s/%s-swarm.jar with fractions: %s",
outDir,
jarName,
String.join(", ", this.swarmDependencies)));
String.join(", ",
this.swarmDependencies
.stream()
.filter(d -> !REQUIRED_FRACTIONS.contains(d))
.sorted()
.collect(Collectors.toList()))));

tool.build(jarName, Paths.get(outDir));
}
Expand Down

0 comments on commit c24181e

Please sign in to comment.