code: public static String getLongMessage(AbstractWisdomMojo mojo, Object exception) {
          try {
              return (String) exception.getClass().getMethod("getLongMessage").invoke(exception);
          } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
              mojo.getLog().error("Cannot extract the long message from the Compilation Failure Exception "
                      + exception, e);
          }
          return null;
      }
docs: We can't access the {@link org.apache.maven.plugin.compiler.CompilationFailureException} directly,
  because the mojo is loaded in another classloader. So, we have to use this method to retrieve the 'compilation
  failures'.
  
  @param mojo      the mojo
  @param exception the exception that must be a {@link org.apache.maven.plugin.compile.CompilationFailureException}
  @return the long message, {@literal null} if it can't be extracted from the exception