mercredi 1 juillet 2015

mvn jetty:run not reflecting changes when run inside docker

I have a simple Tic-tac-toe Java web app http://ift.tt/1CIOMRA It is a Maven project. It uses Jetty to run the web app by doing mvn jetty:run While it is running locally, I can easily modify a JavaScript file and see the changes immediately when I refresh the browser. But, when I run it via Docker where I am mounting the source directory, similar change doesn't get reflected.

Note: I am mounting the source directory in docker-compose.yml file. And I see the change reflected in the file but jetty doesn't pick up the change.

Please Note: It needs JDK 7

To test on localhost:

  mvn clean install
  mvn jetty:run
  Open localhost:8080 to see the app.
  Add an alert(1); in `doInit` function in this JavaScript http://ift.tt/1C8q2aX
  Refresh the browser and you'll see an alert dialog

To test on Docker (using Docker compose):

    docker-compose up
    Add an alert(1); in `doInit` function in [this JavaScript][3]    
    ...Refresh browser, but the change is not reflected

What am I missing?

Aucun commentaire:

Enregistrer un commentaire