Repository: quarkusio/quarkus
Issue: NullPointerException in UnixPath.normalizeAndCheck()

Zulip thread: https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/mvn.20quarkus.3Adev.20NPE

```
[INFO] --- quarkus-maven-plugin:1.7.0.Final:dev (default-cli) @ optaplanner-quarkus-school-timetabling-quickstart ---
Listening for transport dt_socket at address: 5005
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:150)
        at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:135)
        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:85)
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:144)
        ... 1 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:374)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:51)
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:132)
        ... 3 more
Caused by: java.lang.NullPointerException
        at java.base/sun.nio.fs.UnixPath.normalizeAndCheck(UnixPath.java:75)
        at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
        at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
        at java.base/java.nio.file.Path.of(Path.java:147)
        at java.base/java.nio.file.Paths.get(Paths.java:69)
        at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.checkForFileChange(RuntimeUpdatesProcessor.java:396)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:346)
        ... 5 more
```

To reproduce

```
git clone git@github.com:kiegroup/optaplanner.git
cd optaplanner
git checkout 7.43.1.Final
cd optaplanner-quickstarts/quarkus-school-timetabling-quickstart
// Adjust pom.xml to use quarkus 1.8.1.Final
mvn clean compile quarkus:dev
```

Changed files:
devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java

diff --git a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
index 81aaf0341b2..7722c8e98de 100644
--- a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
+++ b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
@@ -520,7 +520,7 @@ private String getSourceEncoding() {
         return null;
     }
 
-    private void addProject(DevModeContext devModeContext, LocalProject localProject, boolean root) {
+    private void addProject(DevModeContext devModeContext, LocalProject localProject, boolean root) throws Exception {
 
         String projectDirectory = null;
         Set<String> sourcePaths = null;
@@ -557,6 +557,11 @@ private void addProject(DevModeContext devModeContext, LocalProject localProject
             resourcePath = resourcesSourcesDir.toAbsolutePath().toString();
         }
 
+        if (classesPath == null && (!sourcePaths.isEmpty() || resourcePath != null)) {
+            throw new MojoExecutionException("Hot reloadable dependency " + localProject.getAppArtifact()
+                    + " has not been compiled yet (the classes directory " + classesDir + " does not exist)");
+        }
+
         Path targetDir = Paths.get(project.getBuild().getDirectory());
 
         DevModeContext.ModuleInfo moduleInfo = new DevModeContext.ModuleInfo(localProject.getKey(),