final File buildLog = new File("$basedir/build.log")

assert buildLog.text.contains("[INFO] Verifying directory: $basedir/moduleTarGz/target/moduleTarGz-testing-test-distribution.tar.gz/webapp\n" +
        "[WARNING] No declarations provided for the module!\n" +
        "[ERROR] Undeclared files detected: [\n" +
        "\tconsole/js/index.js\n" +
        "]")

assert buildLog.text.contains("[INFO] Verifying directory: $basedir/moduleTarGz/target/moduleTarGz-testing-test-distribution.tar.gz/webapp/WEB-INF/classes/moduleObr-testing.obr/moduleObr-testing.jar\n" +
        "[ERROR] Undeclared files detected: [\n" +
        "\tindex-min.js,\n" +
        "\tindex2-min.js,\n" +
        "\tindex2.js\n" +
        "]")

assert buildLog.text.contains("[INFO] Verifying directory: $basedir/moduleTarGz/target/moduleTarGz-testing-test-distribution.tar.gz/webapp/WEB-INF/classes/bundled-plugins.zip/moduleJar-testing.jar\n" +
        "[WARNING] No declarations provided for the module!\n" +
        "[ERROR] Undeclared files detected: [\n" +
        "\tindex.js\n" +
        "]")

assert buildLog.text.contains("[INFO] Verifying directory: $basedir/moduleTarGz/target/moduleTarGz-testing-test-distribution.tar.gz/webapp/WEB-INF/classes/moduleObr-testing.obr/moduleObr-testing.jar/META-INF/lib/moduleJar-testing.jar\n" +
        "[WARNING] No declarations provided for the module!\n" +
        "[ERROR] Undeclared files detected: [\n" +
        "\tindex.js\n" +
        "]")

// There should info log about verifying directory but there should be no warnings or errors following it
assert buildLog.text.contains("[INFO] Verifying directory: $basedir/moduleTarGz/target/moduleTarGz-testing-test-distribution.tar.gz/webapp/WEB-INF/classes/bundled-plugins.zip/moduleJar2-testing.jar")
assert !buildLog.text.contains("[INFO] Verifying directory: $basedir/moduleTarGz/target/moduleTarGz-testing-test-distribution.tar.gz/webapp/WEB-INF/classes/bundled-plugins.zip/moduleJar2-testing.jar\n" +
        "[WARNING]")
assert !buildLog.text.contains("[INFO] Verifying directory: $basedir/moduleTarGz/target/moduleTarGz-testing-test-distribution.tar.gz/webapp/WEB-INF/classes/bundled-plugins.zip/moduleJar2-testing.jar\n" +
        "[ERROR]")