code: protected static void setField(String fieldName, Object mojo, Object value) throws Exception {
          Field field = null;
          try {
              field = mojo.getClass().getDeclaredField(fieldName);
          } catch (NoSuchFieldException ex) {
              // Ignore exception and try superclass.
              field = mojo.getClass().getSuperclass().getDeclaredField(fieldName);
          }
          field.setAccessible(true);
          field.set(mojo, value);
      }
docs: Sets the given field to the given value. This is an alternative to
  invoking a set method.
  
  @param fieldName
  Name of the field to set
  @param mojo
  Mojo
  @param value
  New value for the field
  @throws Exception
  If setting the field using reflection goes wrong