Please follow these steps from your IDE( IntelliJ IDEA):
File -> Project Structure -> Project Settings -> Artifacts -> Click on + (plus sign) -> Jar -> Select option 'From modules with dependencies...'
Select a Main Class (or Application class) if you need to make the jar runnable.
Select Extract to the target Jar
Click OK
Click Apply/OK
Now click on build menu from Menu bar and follow these steps:
Build -> Build Artifact -> Build