Repository: quarkusio/quarkus
Issue: NullPointerException in DevMojo when running mvn compile quarkus:dev

**Describe the bug**
Running `mvn compile quarkus:dev -rf web` in the root of https://github.com/fabric8-launcher/launcher-backend gives the following error when using the 999-SNAPSHOT version

```
Caused by: java.lang.NullPointerException
    at io.quarkus.maven.DevMojo.execute (DevMojo.java:248)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
```

**Expected behavior**
Quarkus should start appropriately. It works in 0.15.0
```
[INFO] --- quarkus-maven-plugin:0.15.0:dev (default-cli) @ launcher-app ---
Listening for transport dt_socket at address: 5005
2019-05-22 00:17:22,061 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
2019-05-22 00:17:24,021 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 1960ms
2019-05-22 00:17:25,505 WARN  [io.und.web.jsr] (main) UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2019-05-22 00:17:25,509 INFO  [io.und.web.jsr] (main) UT026003: Adding annotated server endpoint class io.fabric8.launcher.web.endpoints.websocket.MissionControlStatusEndpoint for path /status/{uuid}
2019-05-22 00:17:26,022 INFO  [io.fab.lau.boo.cat.AbstractBoosterCatalogService] (main) Using io.fabric8.launcher.booster.catalog.spi.NativeGitBoosterCatalogPathProvider
2019-05-22 00:17:26,023 INFO  [io.fab.lau.boo.cat.spi.NativeGitBoosterCatalogPathProvider] (pool-5-thread-1) Indexing contents from https://github.com/fabric8-launcher/launcher-booster-catalog.git using master ref
2019-05-22 00:17:26,025 INFO  [io.fab.lau.cor.imp.doc.BoosterDocumentationStoreImpl] (pool-5-thread-2) Indexing contents from https://github.com/fabric8-launcher/launcher-documentation.git using master ref
2019-05-22 00:17:26,026 INFO  [io.quarkus] (main) Quarkus 0.15.0 started in 4.199s. Listening on: http://[::]:8080
```

**Actual behavior**
Fails with NPE. 

**To Reproduce**
Steps to reproduce the behavior:
1. `git clone https://github.com/fabric8-launcher/launcher-backend`
2. `mvn clean install -DskipTests`
3. `mvn compile quarkus:dev -rf web`

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`: `Linux ggastald-laptop 5.0.13-300.fc30.x86_64 #1 SMP Mon May 6 00:39:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux`
 - Output of `java -version`: openjdk version "1.8.0_202"
 - GraalVM version (if different from Java):  not using it
 - Quarkus version or git rev: 999-SNAPSHOT (built from master)


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 46f6aaccdc3..99f65ff4900 100644
--- a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
+++ b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
@@ -34,6 +34,7 @@
 import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.jar.Attributes;
@@ -241,15 +242,25 @@ public void execute() throws MojoFailureException, MojoExecutionException {
                     AppArtifact appArtifact = project.getAppArtifact();
                     MavenProject mavenProject = projectMap.get(String.format("%s:%s:%s",
                             appArtifact.getGroupId(), appArtifact.getArtifactId(), appArtifact.getVersion()));
-                    String sourcePath = null;
+                    // no information about this project from Maven. Skip.
+
+                    String projectDirectory = null;
+                    List<String> sourcePaths = null;
                     String classesPath = null;
                     String resourcePath = null;
 
-                    List<String> sourcePaths = mavenProject.getCompileSourceRoots().stream()
-                            .map(Paths::get)
-                            .filter(Files::isDirectory)
-                            .map(src -> src.toAbsolutePath().toString())
-                            .collect(Collectors.toList());
+                    if (mavenProject == null) {
+                        projectDirectory = localProject.getDir().toAbsolutePath().toString();
+                        sourcePaths = Collections.singletonList(
+                                localProject.getSourcesSourcesDir().toAbsolutePath().toString());
+                    } else {
+                        projectDirectory = mavenProject.getBasedir().getPath();
+                        sourcePaths = mavenProject.getCompileSourceRoots().stream()
+                                .map(Paths::get)
+                                .filter(Files::isDirectory)
+                                .map(src -> src.toAbsolutePath().toString())
+                                .collect(Collectors.toList());
+                    }
 
                     Path classesDir = project.getClassesDir();
                     if (Files.isDirectory(classesDir)) {
@@ -261,7 +272,7 @@ public void execute() throws MojoFailureException, MojoExecutionException {
                     }
                     DevModeContext.ModuleInfo moduleInfo = new DevModeContext.ModuleInfo(
                             project.getArtifactId(),
-                            mavenProject.getBasedir().getPath(),
+                            projectDirectory,
                             sourcePaths,
                             classesPath,
                             resourcePath);