extracting diagram mojo logic to be usable without maven