michael-o commented on code in PR #157: URL: https://github.com/apache/maven-javadoc-plugin/pull/157#discussion_r957240456
########## src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java: ########## @@ -6144,6 +6171,23 @@ private boolean containsWarnings( String output ) } } + /** + * Determines whether the specified string is informational output of the Javadoc tool. + * + * @param str string to check + * @return true if informational output, false if not or cannot be determined + */ + private boolean isInfoOutput( String str ) + { + return str == null + || str.startsWith( "Loading source file " ) + || str.startsWith( "Generating " ) + || str.startsWith( "Constructing Javadoc information" ) + || str.startsWith( "Building index for " ) + || str.startsWith( "Building tree for " ) + || str.startsWith( "Standard Doclet version " ); + } Review Comment: Where do you have this information from? From JDK source? ########## src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java: ########## @@ -6081,7 +6081,25 @@ && isJavadocVMInitError( output ) ) msg.append( exitCode ); if ( StringUtils.isNotEmpty( err.getOutput() ) ) { - msg.append( " - " ).append( err.getOutput() ); + // parse stderr, log informational output, add all other to exception message + List<String> nonInfoLines = new ArrayList<>(); + for ( String str : err.getOutput().split( "\\R" ) ) + { + if ( isInfoOutput( str ) ) + { + getLog().debug( str ); Review Comment: Does it make sense to send info to debug? ########## src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java: ########## @@ -6081,7 +6081,25 @@ && isJavadocVMInitError( output ) ) msg.append( exitCode ); if ( StringUtils.isNotEmpty( err.getOutput() ) ) { - msg.append( " - " ).append( err.getOutput() ); + // parse stderr, log informational output, add all other to exception message + List<String> nonInfoLines = new ArrayList<>(); + for ( String str : err.getOutput().split( "\\R" ) ) Review Comment: I assume that `getOutput()` contains everything as a string? -- 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