Repository: quarkusio/quarkus
Issue: Doesn't install on Windows 10

I have installed successfully on my macs, but on a Windows Surface Laptop I get when running the first command:
mvn io.quarkus:quarkus-maven-plugin:0.15.0:create \\
>>     -DprojectGroupId=org.acme \\
>>     -DprojectArtifactId=getting-started \\
>>     -DclassName="org.acme.quickstart.GreetingResource" \\
>>     -Dpath="/hello"

….

[INFO] using-keycloak ..................................... SKIPPED
[INFO] quickstart-projects ................................ FAILURE [ 11.386 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.364 s
[INFO] Finished at: 2019-05-24T10:05:09+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.15.0:create (default-cli) on project quickstart-projects: Execution default-cli of goal io.quarkus:quarkus-maven-plugin:0.15.0:create failed.: NullPointerException -> [Help 1]
(Describe the problem clearly and concisely.)

**Expected behavior**
(Describe the expected behavior clearly and concisely.)


**Configuration**
Windows 10 Surface Laptop (gen 1) 16GB RAM
Windows 10 Pro v1803
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Latest Quarkus
(also tried with Java 1.12 same issue)



Changed files:
extensions/smallrye-context-propagation/deployment/src/test/java/io/quarkus/context/test/TransactionalBean.java
extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java
integration-tests/main/src/test/java/io/quarkus/it/main/ContextPropagationTestCase.java
devtools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java

diff --git a/devtools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java b/devtools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java
index d92a7207657..e485fae2c4f 100644
--- a/devtools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java
+++ b/devtools/common/src/main/java/io/quarkus/cli/commands/CreateProject.java
@@ -192,6 +192,7 @@ private void addNativeProfile(Model model) {
 
     private void addMainPluginConfig(Model model) {
         if (!hasPlugin(model)) {
+            Build build = createBuildSectionIfRequired(model);
             Plugin plugin = plugin(getPluginGroupId(), getPluginArtifactId(), QUARKUS_VERSION_PROPERTY);
             if (isParentPom(model)) {
                 addPluginManagementSection(model, plugin);
@@ -201,32 +202,31 @@ private void addMainPluginConfig(Model model) {
             PluginExecution pluginExec = new PluginExecution();
             pluginExec.addGoal("build");
             plugin.addExecution(pluginExec);
-            Build build = createBuildSectionIfRequired(model);
             build.getPlugins().add(plugin);
         }
     }
 
     private boolean hasPlugin(final Model model) {
         List<Plugin> plugins = null;
-        if (isParentPom(model)) {
-            final PluginManagement management = model.getBuild().getPluginManagement();
-            if (management != null) {
-                plugins = management.getPlugins();
-            }
-        } else {
-            final Build build = model.getBuild();
-            if (build != null) {
+        final Build build = model.getBuild();
+        if (build != null) {
+            if (isParentPom(model)) {
+                final PluginManagement management = build.getPluginManagement();
+                if (management != null) {
+                    plugins = management.getPlugins();
+                }
+            } else {
                 plugins = build.getPlugins();
             }
         }
-        return plugins != null && model.getBuild().getPlugins()
+        return plugins != null && build.getPlugins()
                 .stream()
                 .anyMatch(p -> p.getGroupId().equalsIgnoreCase(getPluginGroupId()) &&
                         p.getArtifactId().equalsIgnoreCase(getPluginArtifactId()));
     }
 
     private void addPluginManagementSection(Model model, Plugin plugin) {
-        if (model.getBuild().getPluginManagement() != null) {
+        if (model.getBuild() != null && model.getBuild().getPluginManagement() != null) {
             if (model.getBuild().getPluginManagement().getPlugins() == null) {
                 model.getBuild().getPluginManagement().setPlugins(new ArrayList<>());
             }
diff --git a/extensions/smallrye-context-propagation/deployment/src/test/java/io/quarkus/context/test/TransactionalBean.java b/extensions/smallrye-context-propagation/deployment/src/test/java/io/quarkus/context/test/TransactionalBean.java
index 976fe2d727d..9afb35a6073 100644
--- a/extensions/smallrye-context-propagation/deployment/src/test/java/io/quarkus/context/test/TransactionalBean.java
+++ b/extensions/smallrye-context-propagation/deployment/src/test/java/io/quarkus/context/test/TransactionalBean.java
@@ -2,16 +2,12 @@
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
-import javax.transaction.SystemException;
 import javax.transaction.TransactionManager;
 import javax.transaction.Transactional;
 import javax.transaction.Transactional.TxType;
 
-import org.eclipse.microprofile.reactive.streams.operators.ReactiveStreams;
 import org.junit.jupiter.api.Assertions;
-import org.reactivestreams.Publisher;
 
-import io.quarkus.hibernate.orm.panache.Panache;
 import io.reactivex.Flowable;
 import io.reactivex.Single;
 
diff --git a/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java b/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java
index b6a7f1e3d57..d6d4a48b668 100644
--- a/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java
+++ b/extensions/smallrye-context-propagation/runtime/src/main/java/io/quarkus/smallrye/context/runtime/SmallRyeContextPropagationTemplate.java
@@ -3,7 +3,6 @@
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 
-import org.eclipse.microprofile.context.spi.ContextManager;
 import org.eclipse.microprofile.context.spi.ContextManagerExtension;
 import org.eclipse.microprofile.context.spi.ContextManagerProvider;
 import org.eclipse.microprofile.context.spi.ThreadContextProvider;
diff --git a/integration-tests/main/src/test/java/io/quarkus/it/main/ContextPropagationTestCase.java b/integration-tests/main/src/test/java/io/quarkus/it/main/ContextPropagationTestCase.java
index 597c97c3d79..8536a6d4f92 100644
--- a/integration-tests/main/src/test/java/io/quarkus/it/main/ContextPropagationTestCase.java
+++ b/integration-tests/main/src/test/java/io/quarkus/it/main/ContextPropagationTestCase.java
@@ -18,16 +18,8 @@
 
 import static org.hamcrest.Matchers.is;
 
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import java.nio.charset.StandardCharsets;
-
-import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
-import io.quarkus.test.common.http.TestHTTPResource;
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;