diff --git a/src/main/java/rife/bld/BldCache.java b/src/main/java/rife/bld/BldCache.java index 2fe02d8..f2c0c26 100644 --- a/src/main/java/rife/bld/BldCache.java +++ b/src/main/java/rife/bld/BldCache.java @@ -22,18 +22,23 @@ import java.util.Properties; /** + * Provides functionalities related to dependency hashing and caching. * * @author Geert Bevin (gbevin[remove] at uwyn dot com) * @since 2.0 */ public class BldCache { + /** + * Represents the name of a cache file used by bld. + * @since 2.0 + */ public static final String BLD_CACHE = "bld.cache"; private static final String PROPERTY_SUFFIX_HASH = ".hash"; private static final String PROPERTY_SUFFIX_LOCAL = ".local"; - public static final String WRAPPER_PROPERTIES_HASH = Wrapper.WRAPPER_PROPERTIES + PROPERTY_SUFFIX_HASH; - public static final String BLD_BUILD_HASH = "bld-build" + PROPERTY_SUFFIX_HASH; + private static final String WRAPPER_PROPERTIES_HASH = Wrapper.WRAPPER_PROPERTIES + PROPERTY_SUFFIX_HASH; + private static final String BLD_BUILD_HASH = "bld-build" + PROPERTY_SUFFIX_HASH; private static final String PROPERTY_EXTENSIONS_PREFIX = "bld.extensions"; private static final String PROPERTY_EXTENSIONS_HASH = PROPERTY_EXTENSIONS_PREFIX + PROPERTY_SUFFIX_HASH; diff --git a/src/main/java/rife/bld/BuildExecutor.java b/src/main/java/rife/bld/BuildExecutor.java index 2c65ef2..cda33b1 100644 --- a/src/main/java/rife/bld/BuildExecutor.java +++ b/src/main/java/rife/bld/BuildExecutor.java @@ -439,7 +439,6 @@ public boolean executeCommand(String command) // try to find a match for the provided command amongst // the ones that are known - var matched = false; if (definition == null) { // try to find starting matching options var matches = new ArrayList<>(buildCommands().keySet().stream() @@ -464,7 +463,7 @@ public boolean executeCommand(String command) // only proceed if exactly one match was found if (matches.size() == 1) { matched_command = matches.get(0); - matched = true; + System.out.println("Executing matched command: " + matched_command); definition = buildCommands().get(matched_command); } } @@ -474,13 +473,6 @@ public boolean executeCommand(String command) currentCommandName_.set(matched_command); currentCommandDefinition_.set(definition); try { - if (matched) { - System.out.println("Executing matched command: " + matched_command); - } - else { - System.out.println("Executing command: " + currentCommandName_); - } - definition.execute(); } catch (ExitStatusException e) { exitStatus(e.getExitStatus());