Issue #785
This commit is contained in:
parent
c9842c7794
commit
6a17019235
|
@ -477,7 +477,7 @@ public class JettyRunMojo extends AbstractJettyMojo
|
|||
|
||||
scanner.watch(project.getFile().toPath());
|
||||
|
||||
if (webApp.getTestClasses() != null)
|
||||
if (webApp.getTestClasses() != null && webApp.getTestClasses().exists())
|
||||
{
|
||||
PathWatcher.Config config = new PathWatcher.Config(webApp.getTestClasses().toPath());
|
||||
config.setRecurseDepth(PathWatcher.Config.UNLIMITED_DEPTH);
|
||||
|
@ -491,7 +491,7 @@ public class JettyRunMojo extends AbstractJettyMojo
|
|||
scanner.watch(config);
|
||||
}
|
||||
|
||||
if (webApp.getClasses() != null)
|
||||
if (webApp.getClasses() != null && webApp.getClasses().exists())
|
||||
{
|
||||
PathWatcher.Config config = new PathWatcher.Config(webApp.getClasses().toPath());
|
||||
config.setRecurseDepth(PathWatcher.Config.UNLIMITED_DEPTH);
|
||||
|
|
|
@ -98,21 +98,31 @@ public class JettyRunWarExplodedMojo extends AbstractJettyMojo
|
|||
{
|
||||
scanner.watch(project.getFile().toPath());
|
||||
File webInfDir = new File(war,"WEB-INF");
|
||||
scanner.watch(new File(webInfDir, "web.xml").toPath());
|
||||
File webXml = new File(webInfDir, "web.xml");
|
||||
if (webXml.exists())
|
||||
scanner.watch(webXml.toPath());
|
||||
File jettyWebXmlFile = findJettyWebXmlFile(webInfDir);
|
||||
if (jettyWebXmlFile != null)
|
||||
scanner.watch(jettyWebXmlFile.toPath());
|
||||
File jettyEnvXmlFile = new File(webInfDir, "jetty-env.xml");
|
||||
if (jettyEnvXmlFile.exists())
|
||||
scanner.watch(jettyEnvXmlFile.toPath());
|
||||
|
||||
PathWatcher.Config classesConfig = new PathWatcher.Config(new File(webInfDir, "classes").toPath());
|
||||
classesConfig.setRecurseDepth(PathWatcher.Config.UNLIMITED_DEPTH);
|
||||
scanner.watch(classesConfig);
|
||||
|
||||
PathWatcher.Config libConfig = new PathWatcher.Config(new File(webInfDir, "lib").toPath());
|
||||
libConfig.setRecurseDepth(PathWatcher.Config.UNLIMITED_DEPTH);
|
||||
scanner.watch(libConfig);
|
||||
|
||||
File classes = new File(webInfDir, "classes");
|
||||
if (classes.exists())
|
||||
{
|
||||
PathWatcher.Config classesConfig = new PathWatcher.Config(classes.toPath());
|
||||
classesConfig.setRecurseDepth(PathWatcher.Config.UNLIMITED_DEPTH);
|
||||
scanner.watch(classesConfig);
|
||||
}
|
||||
|
||||
File lib = new File(webInfDir, "lib");
|
||||
if (lib.exists())
|
||||
{
|
||||
PathWatcher.Config libConfig = new PathWatcher.Config(lib.toPath());
|
||||
libConfig.setRecurseDepth(PathWatcher.Config.UNLIMITED_DEPTH);
|
||||
scanner.watch(libConfig);
|
||||
}
|
||||
|
||||
scanner.addListener(new PathWatcher.EventListListener()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue