vaadin / copilot

0 stars 0 forks source link

[BUG] hotswap-agent.properties file ignored in non-Spring project #27

Open mvysny opened 1 week ago

mvysny commented 1 week ago

Description of the Bug

Trying to setup a full-blown hot-redeployment env on a non-Spring project. I went through all the steps Copilot mentioned and successfully installed the hotswap agent, however I'm stuck on the last step. I've created the src/main/resources/hotswap-agent.properties with the content pluginPackages=com.vaadin.hilla.devmode.hotswapagent; yet Copilot still shows that "Vaadin HotswapAgent plugin is not available".

Minimal Reproducible Example

  1. git-clone https://github.com/mvysny/vaadin-boot-example-maven
  2. Set up hot-redeployment dev env according to what Copilot says
  3. Observe that Copilot thinks that hotswap-agent.properties file is still missing

Screenshot 2024-07-03 at 10 00 48

The following is logged in stdout, indicating that the hotswap agent actually loads Hilla plugin:

HOTSWAP AGENT: 09:57:04.534 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.4.2-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 09:57:04.580 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [HillaPlugin]
HOTSWAP AGENT: 09:57:04.684 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [WatchResources, ClassInitPlugin, AnonymousClassPatch, Hotswapper, JdkPlugin, Hibernate, HibernateJakarta, Hibernate3, Hibernate3JPA, Spring, SpringBoot, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, OwbJakarta, Proxy, WebObjects, Weld, WeldJakarta, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Weblogic, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow, MyBatis, IBatis, JacksonPlugin, Idea, Thymeleaf, Velocity, Sponge]
Starting HotswapAgent '/home/parallels/.jdks/jbr-17.0.11/lib/hotswap/hotswap-agent.jar'
HOTSWAP AGENT: 09:57:04.705 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: []

However, interestingly, the following line is only logged to stdout in a Spring-Boot-based project, but missing in a non-Spring project:

HOTSWAP AGENT: 10:02:47.529 INFO (com.vaadin.hilla.devmode.hotswapagent.HillaPlugin) - Plugin {} initialized

Perhaps this could be a bug in the hotswap agent?

Versions