kbuntrock commented on code in PR #103: URL: https://github.com/apache/maven-build-cache-extension/pull/103#discussion_r1578481429
########## src/test/java/org/apache/maven/buildcache/util/LogFileUtils.java: ########## @@ -60,4 +61,32 @@ public static String findFirstLineContainingTextsInLogs(final Verifier verifier, return null; } + + /** + * Find lines matching all the strings given as parameter in the log file attached to a verifier + * @param verifier the maven verifier instance + * @param texts all the matching strings to find + * @return a list of matching strings + * @throws VerificationException + */ + public static List<String> findLinesContainingTextsInLogs(final Verifier verifier, final String... texts) + throws VerificationException { + List<String> lines = verifier.loadFile(verifier.getBasedir(), verifier.getLogFileName(), false); + List<String> result = new ArrayList<>(); + Iterator it = lines.iterator(); + + while (it.hasNext()) { + String line = verifier.stripAnsi((String) it.next()); + boolean matches = true; + Iterator<String> toMatchIterator = Arrays.stream(texts).iterator(); Review Comment: Done. Slightly changed you proposal since the goal is to test the presence of all strings. ########## src/main/java/org/apache/maven/buildcache/xml/CacheConfigImpl.java: ########## @@ -503,6 +503,11 @@ public String getAlwaysRunPlugins() { return getProperty(ALWAYS_RUN_PLUGINS, null); } + @Override + public boolean isMandatoryClean() { + return getConfiguration().isMandatoryClean(); Review Comment: Done :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org