File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
devtools/maven/src/main/java/io/quarkus/maven Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 18
18
import java .util .Arrays ;
19
19
import java .util .HashMap ;
20
20
import java .util .List ;
21
+ import java .util .Locale ;
21
22
import java .util .Map ;
22
23
import java .util .Objects ;
23
24
import java .util .Set ;
58
59
@ Mojo (name = "create" , requiresProject = false )
59
60
public class CreateProjectMojo extends AbstractMojo {
60
61
62
+ final private static boolean IS_WINDOWS = System .getProperty ("os.name" ).toLowerCase (Locale .ROOT ).contains ("windows" );
63
+
61
64
private static String pluginKey ;
62
65
63
66
public static String getPluginKey () {
@@ -216,15 +219,16 @@ public void execute() throws MojoExecutionException {
216
219
217
220
private void createGradleWrapper (File projectDirectory ) {
218
221
try {
219
- ProcessBuilder pb = new ProcessBuilder ("gradle" , "wrapper" ,
222
+ String gradleName = IS_WINDOWS ? "gradle.bat" : "gradle" ;
223
+ ProcessBuilder pb = new ProcessBuilder (gradleName , "wrapper" ,
220
224
"--gradle-version=" + MojoUtils .getGradleWrapperVersion ()).directory (projectDirectory )
221
225
.inheritIO ();
222
226
Process x = pb .start ();
223
227
224
228
x .waitFor ();
225
229
226
230
if (x .exitValue () != 0 ) {
227
- getLog ().error ("Unable to install the Gradle wrapper (./gradlew) in project. See log for details." );
231
+ getLog ().warn ("Unable to install the Gradle wrapper (./gradlew) in project. See log for details." );
228
232
}
229
233
230
234
} catch (InterruptedException | IOException e ) {
You can’t perform that action at this time.
0 commit comments