7272import org .apache .maven .api .services .DependencyResolver ;
7373import org .apache .maven .api .services .DependencyResolverRequest ;
7474import org .apache .maven .api .services .DependencyResolverResult ;
75+ import org .apache .maven .api .services .MavenException ;
7576import org .apache .maven .api .services .MessageBuilder ;
7677import org .apache .maven .api .services .MessageBuilderFactory ;
7778import org .apache .maven .api .services .ProjectManager ;
@@ -344,8 +345,8 @@ final Charset charset() {
344345 * @see <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#annotation-processing">javac Annotation Processing</a>
345346 * @since 3.5
346347 *
347- * @deprecated Replaced by ordinary dependencies with {@code <type>} element
348- * set to {@code proc }, {@code classpath-proc } or {@code modular-proc }.
348+ * @deprecated Replaced by ordinary dependencies with {@code <type>} element set to
349+ * {@code processor }, {@code classpath-processor } or {@code modular-processor }.
349350 */
350351 @ Parameter
351352 @ Deprecated (since = "4.0.0" )
@@ -1075,8 +1076,7 @@ public void execute() throws MojoException {
10751076 .builder ()
10761077 .strong ("COMPILATION ERROR: " )
10771078 .a (message );
1078- // Do not log stack trace for `CompilationFailureException` because they are not unexpected.
1079- logger .error (mb .toString (), e instanceof CompilationFailureException ? null : e );
1079+ logger .error (mb .toString (), verbose ? e : null );
10801080 if (tipForCommandLineCompilation != null ) {
10811081 logger .info (tipForCommandLineCompilation );
10821082 tipForCommandLineCompilation = null ;
@@ -1102,9 +1102,10 @@ public void execute() throws MojoException {
11021102 * provided that the {@link #logger} is thread-safe.
11031103 *
11041104 * @param listener where to send compilation warnings, or {@code null} for the Maven logger
1105- * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>
11061105 * @return the task to execute for compiling the project using the configuration in this <abbr>MOJO</abbr>
1106+ * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>
11071107 * @throws IOException if an error occurred while creating the output directory or scanning the source directories
1108+ * @throws MavenException if an error occurred while fetching dependencies
11081109 */
11091110 public ToolExecutor createExecutor (DiagnosticListener <? super JavaFileObject > listener ) throws IOException {
11101111 var executor = new ToolExecutor (this , listener );
@@ -1398,6 +1399,8 @@ final String parseModuleInfoName(Path source) throws IOException {
13981399 * any filename-based dependency and this MOJO is compiling the main code, then a warning will be logged.
13991400 *
14001401 * @param hasModuleDeclaration whether to allow placement of dependencies on the module-path.
1402+ * @throws IOException if an I/O error occurred while fetching dependencies
1403+ * @throws MavenException if an error occurred while fetching dependencies for a reason other than I/O.
14011404 */
14021405 final DependencyResolverResult resolveDependencies (boolean hasModuleDeclaration ) throws IOException {
14031406 DependencyResolver resolver = session .getService (DependencyResolver .class );
@@ -1460,8 +1463,8 @@ final DependencyResolverResult resolveDependencies(boolean hasModuleDeclaration)
14601463 * @param addTo the modifiable map and lists where to append more paths to annotation processor dependencies
14611464 * @throws MojoException if an error occurred while resolving the dependencies
14621465 *
1463- * @deprecated Replaced by ordinary dependencies with {@code <type>} element
1464- * set to {@code proc }, {@code classpath-proc } or {@code modular-proc }.
1466+ * @deprecated Replaced by ordinary dependencies with {@code <type>} element set to
1467+ * {@code processor }, {@code classpath-processor } or {@code modular-processor }.
14651468 */
14661469 @ Deprecated (since = "4.0.0" )
14671470 final void resolveProcessorPathEntries (Map <PathType , List <Path >> addTo ) throws MojoException {
0 commit comments