@@ -289,7 +289,7 @@ public void execute() throws MojoExecutionException {
289
289
}
290
290
291
291
File workdir = setupBuildEnvironment ();
292
-
292
+
293
293
Config c = new Config ();
294
294
295
295
c .setHeaderType (headerType );
@@ -451,10 +451,9 @@ private File unpackWorkDir(Artifact a) throws MojoExecutionException {
451
451
*/
452
452
private void setPermissions (File workdir ) {
453
453
if (!System .getProperty ("os.name" ).startsWith ("Windows" )) {
454
- Runtime r = Runtime .getRuntime ();
455
454
try {
456
- r . exec ("chmod 755 " + workdir + "/bin/ld" ).waitFor ();
457
- r . exec ("chmod 755 " + workdir + "/bin/windres" ).waitFor ();
455
+ new ProcessBuilder ("chmod" , " 755" , workdir + "/bin/ld" ). start ( ).waitFor ();
456
+ new ProcessBuilder ("chmod" , " 755" , workdir + "/bin/windres" ). start ( ).waitFor ();
458
457
} catch (InterruptedException e ) {
459
458
getLog ().warn ("Interrupted while chmodding platform-specific binaries" , e );
460
459
} catch (IOException e ) {
@@ -468,7 +467,7 @@ private void setPermissions(File workdir) {
468
467
*/
469
468
private List <String > relativizeAndCopy (File workdir , List <String > paths ) throws MojoExecutionException {
470
469
if (paths == null ) return null ;
471
-
470
+
472
471
List <String > result = new ArrayList <>();
473
472
for (String path : paths ) {
474
473
Path source = basedir .toPath ().resolve (path );
@@ -492,7 +491,7 @@ private List<String> relativizeAndCopy(File workdir, List<String> paths) throws
492
491
493
492
return result ;
494
493
}
495
-
494
+
496
495
/**
497
496
* Downloads the platform-specific parts, if necessary.
498
497
*/
0 commit comments