-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip testing when packaging JAR #79
Comments
I don't see why adding the I'd also like to eliminate whatever problem you're encountering with the tests. Can you describe that in more detail or is it essentially what's reported in #78 ? |
The build process produces two JAR files. One is a "shaded" JAR-including-dependencies and the other contains only the code from datatools-server itself. The main-class is not set on the JAR-without-dependencies. Try running the other one (the larger one of almost 100MB). |
I've changed the project config to set the main-class attribute on the jar without dependencies, which is preserved in the jar-with-dependencies, so both of them have the main class set now. If you run the jar without dependencies, you'd need to copy in all the dependencies and run it with all those dependencies manually added to the classpath. Maven has commands to do that (copy the dependencies or even add them automatically to the classpath) but it's a lot easier to just run the shaded JAR-with-dependencies. |
I've tried the JAR with dependencies ( |
OK let us know how it goes. I know next to nothing about Docker but I believe there's a Docker container configuration that you'll have to create - please feel free to contribute it via a pull request once you've got one. |
Thanks for the help, I'll definitely share whatever I come up with. |
It makes it into the JAR-with-dependencies via the shade plugin (tested locally)
Is this possible? I've been trying to run the
mvn package
command on the code from a Docker container but kept running into MongoDB issues, so I've opted to build without testing. Unfortunately I now get a "no main manifest attribute" error when I try to run the built JAR file. Do the tests have to have been successfully run for the manifest file to be generated?The text was updated successfully, but these errors were encountered: