Hi Arne,

personally I don't use the polling but this setup:

1. configure what the reloading recompile through reloadGoals:

<plugin>
  <groupId>org.apache.meecrowave</groupId>
  <artifactId>meecrowave-maven-plugin</artifactId>
  <version>1.2.9</version>
  <configuration>
    <reloadGoals>
      <reloadGoal>process-classes</reloadGoal>
    </reloadGoals>
  </configuration>
</plugin>

2. do the changes you want
3. go in the terminal meecrowave:bake/meecrowave:run is executed and type
"r" (or "reload" from memory)
4. test your changes

It just executes mvn <reload goals> and redeploy the app.

watcherBouncing was more about static resources (frontend) and should be
combined with <webResourceCached>false</webResourceCached>.

The watcher on his side watches the deployed folders (target/classes) and
reloads when it changes (which can be too early sometimes depending watcher
duration).
The issue you hit is that target/classes is in the classloader created once
for the runtime in the mojo (since you deploy classpath and not as a webapp
- <useClasspathDeployment>false</useClasspathDeployment>) so you actually
don't reload the classes with just the watcher by default.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 23 avr. 2020 à 11:50, Arne Limburg <[email protected]>
a écrit :

> Hi,
>
> I am fiddling around with the auto-reload feature in meecrowave.
>
> I have configured the maven plugin to set watcherBouncing to 1 and start
> meecrowave with the plugin.
>
> The log correctly states that target classes is scanned
>
> OpenWebBeans scanning:
> [...]
> [11:41:48.738][INFO ][cher-redeployer][ans.OWBTomcatWebScannerService]
> [...]/target/classes
>
>
> When I change a class in the deployment, the server correctly does a
> redeploy,
>
> but after the redeploy the content of the changed class seems not to have
> changed in the server.
>
> The class behaves like before.
>
> Is there some hidden class caching somewhere (in cxf or tomcat or so),
> which I have to turn of?
>
> Any ideas?
>
>
> Cheers,
>
> Arne
>
> *OPEN* KNOWLEDGE GmbH
> Poststraße 1, 26122 Oldenburg
> Mobil: +49 151 - 108 22 942
> Tel: +49 441 - 4082-154
> Fax: +49 441 - 4082-111
> [email protected]
> www.openknowledge.de
>
> Registergericht: Amtsgericht Oldenburg, HRB 4670
> Geschäftsführer: Lars Röwekamp, Jens Schumann
>
>
> *Treffen Sie uns auf kommenden Konferenzen und Workshops: *
> Zu unseren Events <https://www.openknowledge.de/event/>
>
>
>
>
>

Reply via email to