Per Nyfelt created GROOVY-11658: ----------------------------------- Summary: Groovyc ant task is excessively verbose Key: GROOVY-11658 URL: https://issues.apache.org/jira/browse/GROOVY-11658 Project: Groovy Issue Type: Improvement Components: Ant integration Affects Versions: 4.0.26 Reporter: Per Nyfelt
The default logging when using the groovyc ant task prints debug type information. I think only the first line (info on how many files that will be compiled and where they will end up that is of INFO level. The compilation arguments should be on DEBUG level. Here is an example: {quote} [groovyc] Compiling 1 source file to /home/per/project/groovy-projects/uso/examples/publish/build/main [groovyc] Compilation arguments: [groovyc] --classpath [groovyc] /home/per/.m2/repository/se/alipsa/matrix/matrix-core/3.2.0/matrix-core-3.2.0.jar:/home/per/.m2/repository/se/alipsa/matrix/matrix-csv/2.1.0/matrix-csv-2.1.0.jar:/home/per/.m2/repository/org/apache/commons/commons-csv/1.14.0/commons-csv-1.14.0.jar:/home/per/.m2/repository/commons-io/commons-io/2.18.0/commons-io-2.18.0.jar:/home/per/.m2/repository/commons-codec/commons-codec/1.18.0/commons-codec-1.18.0.jar [groovyc] -d [groovyc] /home/per/project/groovy-projects/uso/examples/publish/build/main [groovyc] /home/per/project/groovy-projects/uso/examples/publish/src/main/groovy/se/alipsa/uso/examples/dependencies/MatrixExample.groovy {quote} I suggest that either # Compilation arguments are moved to DEBUG # a quiet parameter is added that removes the compiler args printout A workaround right now is to change the messageOutputLevel before groovyc is invoked, e.g. {quote}def ant = new AntBuilder() ant.taskdef(name: 'groovyc', classname: 'org.codehaus.groovy.ant.Groovyc') def listener = ant.getBuildListeners().firstElement() def oldLevel = listener.getMessageOutputLevel() ** listener.setMessageOutputLevel(1) ant.groovyc( srcdir: 'src/test/groovy', destdir: 'out/testClasses', classpath: 'testPath', targetBytecode: "21" ) listener.setMessageOutputLevel(oldLevel){quote} -- This message was sent by Atlassian Jira (v8.20.10#820010)