I managed to follow some tutorial and setup a jetty webserver that runs with Maven in Intellij. It runs when I click into maven and do Jetty:run but does not run from my main class. My issue is when try and run the code to launch a webserver I get an error that says Cannot invoke "java.net.URL.toURI()" because "webAppDir" is null. I tried looking at different tutorials but they all use the same structure I set my project up with but they do not encounter this error.
I don't know why it's pointing to a null directory for me but it worked for them, so any help would be greatly appreciated.
Thank you!

You appear to be using Jetty 9.4.28.
Jetty 9.4.x is at End of Community Support
You should be upgrading your version of Jetty.
Looking at your code, you are attempting to get a resource by referencing a directory, not a file.
That's an unreliable technique to reference content in your classloader, as that API prefers that you reference a file, not a directory.
Try referencing a file in that directory, and then stripping it off to use it.
Example from embedded-jetty-cookbook
DefaultServletFileServer.java