Bug: keepbrief is not called
Status: Resolved
Priority: Normal
Resolution: Fixed
Created: 16/Feb/23 10:24
Resolved: 13/Apr/23 14:37

Discovered in CASSANDRA-18179 

The keepbrief macro is never called in build.xml

And attempts to use it result in
{noformat}
Buildfile: /Users/mick/src/apache/cassandra/build.xml
    [javac] Compiling 5 source files to /Users/mick/src/apache/cassandra/build/test/classes
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:21: error: package org.apache.cassandra.io.util does not exist
    [javac] import org.apache.cassandra.io.util.File;
    [javac]                                    ^
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:23: error: package org.apache.commons.io does not exist
    [javac] import org.apache.commons.io.FilenameUtils;
    [javac]                             ^
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:26: error: package org.junit does not exist
    [javac] import org.junit.Test;
    [javac]                 ^
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:30: error: package org.reflections does not exist
    [javac] import org.reflections.Reflections;
    [javac]                       ^
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:31: error: package org.reflections.scanners does not exist
    [javac] import org.reflections.scanners.Scanners;
    [javac]                                ^
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:32: error: package org.reflections.util does not exist
    [javac] import org.reflections.util.ConfigurationBuilder;
    [javac]                            ^
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:38: error: cannot find symbol
    [javac]     private static final Reflections reflections = new Reflections(new ConfigurationBuilder()
    [javac]                          ^
    [javac]   symbol:   class Reflections
    [javac]   location: class TestNameCheckTask
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:38: error: cannot find symbol
    [javac]         echo.setFile(new File(".classpath").toJavaIOFile());
    [javac]                          ^
    [javac]   symbol:   class File
    [javac]   location: class EchoEclipseProjectLibs
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:52: error: cannot find symbol
    [javac]             String srcJar = FilenameUtils.getBaseName(jars[i]) + "-sources.jar";
    [javac]                             ^
    [javac]   symbol:   variable FilenameUtils
    [javac]   location: class EchoEclipseProjectLibs
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:53: error: cannot find symbol
    [javac]             String srcDir = FilenameUtils.concat(project.getProperty("build.test.dir"), "sources");
    [javac]                             ^
    [javac]   symbol:   variable FilenameUtils
    [javac]   location: class EchoEclipseProjectLibs
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:54: error: cannot find symbol
    [javac]             File srcFile = new File(FilenameUtils.concat(srcDir, srcJar));
    [javac]             ^
    [javac]   symbol:   class File
    [javac]   location: class EchoEclipseProjectLibs
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:54: error: cannot find symbol
    [javac]             File srcFile = new File(FilenameUtils.concat(srcDir, srcJar));
    [javac]                                ^
    [javac]   symbol:   class File
    [javac]   location: class EchoEclipseProjectLibs
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/EchoEclipseProjectLibs.java:54: error: cannot find symbol
    [javac]             File srcFile = new File(FilenameUtils.concat(srcDir, srcJar));
    [javac]                                     ^
    [javac]   symbol:   variable FilenameUtils
    [javac]   location: class EchoEclipseProjectLibs
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:38: error: cannot find symbol
    [javac]     private static final Reflections reflections = new Reflections(new ConfigurationBuilder()
    [javac]                                                        ^
    [javac]   symbol:   class Reflections
    [javac]   location: class TestNameCheckTask
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:40: error: cannot find symbol
    [javac]                                                                    .setScanners(Scanners.MethodsAnnotated, Scanners.SubTypes)
    [javac]                                                                                 ^
    [javac]   symbol:   variable Scanners
    [javac]   location: class TestNameCheckTask
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:40: error: cannot find symbol
    [javac]                                                                    .setScanners(Scanners.MethodsAnnotated, Scanners.SubTypes)
    [javac]                                                                                                            ^
    [javac]   symbol:   variable Scanners
    [javac]   location: class TestNameCheckTask
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:38: error: cannot find symbol
    [javac]     private static final Reflections reflections = new Reflections(new ConfigurationBuilder()
    [javac]                                                                        ^
    [javac]   symbol:   class ConfigurationBuilder
    [javac]   location: class TestNameCheckTask
    [javac] /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java:51: error: cannot find symbol
    [javac]         Set<Method> methodsAnnotatedWith = reflections.getMethodsAnnotatedWith(Test.class);
    [javac]                                                                                ^
    [javac]   symbol:   class Test
    [javac]   location: class TestNameCheckTask
    [javac] Note: /Users/mick/src/apache/cassandra/test/anttasks/org/apache/cassandra/anttasks/TestNameCheckTask.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 18 errors

BUILD FAILED
{noformat}