执行”Maven Clean”时出现错误,错误消息为”文件夹不能是文件”
环境
-
- Eclipse Pleiades 4.7
-
- Maven 3.3.9 (Eclipse pleiadesに組み込まれていたもの. EMBEDDED)
-
- Java8
- Spring Boot 1.5.7
发生问题
执行「Maven Clean」时出现以下错误。
1,Conrad Treasury Place,William & George Streets,4001
2017-12-31 21:50:37.227 INFO 16216 --- [ restartedMain] sample.DemoApplication : Started DemoApplication in 3.816 seconds (JVM running for 4.333)
2017-12-31 21:50:44.601 INFO 16216 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2017-12-31 21:50:44.601 INFO 16216 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2017-12-31 21:50:44.617 INFO 16216 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 16 ms
Exception in thread "File Watcher" java.lang.IllegalArgumentException: Folder must not be a file
at org.springframework.util.Assert.isTrue(Assert.java:92)
at org.springframework.boot.devtools.filewatch.FolderSnapshot.<init>(FolderSnapshot.java:55)
at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.getCurrentSnapshots(FileSystemWatcher.java:281)
at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.scan(FileSystemWatcher.java:254)
at org.springframework.boot.devtools.filewatch.FileSystemWatcher$Watcher.run(FileSystemWatcher.java:239)
at java.lang.Thread.run(Thread.java:748)
造成这个结果的原因是什么?
在Spring Boot已经启动的情况下,执行了”Maven Clean”操作导致了错误的发生。这是正常的吗?
解决方案 cè àn)
毋庸置疑,在停止Spring Boot之后,执行”Maven Clean”命令。
可以参考的网站
StackTrace with Spring DevTools and Maven clean command
下記のコメントで、Spring Bootが起動していることに気づきました。
>Are you running mvn clean while the application is running?