dazraf / vertx-hot

A Maven plugin for hot-deploy of Vert.x projects
47 stars 9 forks source link

Could you add a config option to add to the path list to be watched #27

Closed alexlehm closed 8 years ago

alexlehm commented 8 years ago

I am using a custom ssl cert for testing that I have to change occasionally during development. I think it would be possible to use the redeploy feature for that if the dir that contains the cert would be watched in addition to the normal dirs. I assume there is no config option for that, could you add one?

dazraf commented 8 years ago

Hi @alexlehm You're right, that's not an option right now. Will implement it. regards Fuzz

dazraf commented 8 years ago

Just to clarify:

  1. I'm thinking of the additional paths as logically, additonal resource paths. By default a trigger in the additional paths will cause a browser refresh - the verticle is not compiled nor redeployed. Setting buildResources to true will cause a compile and reload. Do we need a third option to redeploy the verticle without compilation?
  2. Also, the additional paths will not be on the classpath of the verticle (unless the project pom references them - in which case the plugin configuration won't need custom paths).
  3. The path is either fully qualified, or relative to the project root.

Do these make sense? regards

alexlehm commented 8 years ago

I think compile and reload is ok when the resources change, at least it would be for my usecase.

The additional paths will probably contain things that are parsed once on startup (like the keystore on a server, I have not found an option to reload that, maybe that is possible inside vert.x as well).

I think mostly relative paths are necessary, not sure if absolute paths are needed as well, maybe something like a config file in a homedir.

dazraf commented 8 years ago

Hi @alexlehm,

I've pushed an implementation for this to branch: https://github.com/dazraf/vertx-hot/tree/feature/27-add-path-list-to-config

It's general purpose. Paths will by default redeploy. But they can also be configure to recompile or refresh(the browser). Paths can be relative from the project root The readme has been updated to show how it can be used. example1/pom.xml contains a sample setup.

Also, this branch upgrades maven-invoker to 2.2.

Could you review and comment? Thanks very much Fuzz.

dazraf commented 8 years ago

Paths can also be absolute

alexlehm commented 8 years ago

That covers the requirements I have quite nicely, thanks

dazraf commented 8 years ago

Ok. Will merge later tonight test further and deploy snapshot.

dazraf commented 8 years ago

Ok. Released to central. v2.1.0.