0
votes

I'm able to run Dropwizard application on https on my local machine trough this commands.

mvn package java -jar target/dropwizard-example-1.2.0-SNAPSHOT.jar db migrate example.yml java -jar target/dropwizard-example-1.2.0-SNAPSHOT.jar server example.yml

Here is the example I am following dropwizard-example on github

Once we create package of Dropwizard application with Debian. it converts into single jar file.

Q1: How can I run the command ends with server example.yml? because this file is not going to found?

Q2: How can I run jar file of dropwizard application packaged through debian on windows machine?

Q3: On local machine it runs sucessfully on https port. How can it will be achieve after packaged through debian?

2

2 Answers

0
votes

You need to ship .yml file because it is a setting file JAR always looks for this file.

0
votes

Once we create package of Dropwizard application with Debian. it converts into single jar file.

All Dropwizard applications are a single jar file. That is what you are making on your local machine (when you do mvn package) and running on your local machine (when you do java -jar...), so you will run that single jar on whichever other machine you deploy your app to.

How can I run the command ends with server example.yml? because this file is not going to found?

The github project you cloned included the file example.yml. This needs to be on the machine you are going to run the application on. You can call it whatever you like, but you must pass its name to the jar as an arguemnt.

How can I run jar file of dropwizard application packaged through debian on windows machine?

The same as on debian, java -jar target/dropwizard-example-1.2.0-SNAPSHOT.jar server example.yml

On local machine it runs sucessfully on https port. How can it will be achieve after packaged through debian?

If you look in the example.yml you can see where this is configured:

applicationConnectors:
    - type: http
      port: 8080
    - type: https
      port: 8443
      keyStorePath: example.keystore
      keyStorePassword: example