Packaging Application As Jar File

I have to package my Vaadin Flow app as a jar file. It is connected to a MySQL Database. How should I go about doing this? While following IntelliJ’s documentation, I had the following error while running the app

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
    at java.base/sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:340)
    at java.base/sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:282)
    at java.base/java.util.jar.JarVerifier.processEntry(JarVerifier.java:320)```

Spring Boot app? mvn install -Pproduction from CLI would be the safest way to do it. You’ll need Spring Boot and Vaadin build plugins for or proper production packaging.

Or the same thing from the UI.

Thanks