One of the main reasons for creating a docker image for your application is to provide an artifact that people can run without installing and managing external software dependencies (for example, an application server to run a war file).
From the point of view of the container user, it does not matter whether you pack your code in a bank or military file or as a fortran binary. All they do is launch a container image.
On your part, building and configuring the Docker, packing the jar file and copying it will be a simpler solution than trying to configure and configure the application server for packaging, and then deploy each version to the application server. See Ohmens Answers for some additional technical components of the java assembly.