This is an automated email from the ASF dual-hosted git repository. skygo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-mavenutils-nbm-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push: new d875757 add harness executables first, then overwrite with executables found in binDirectory. new 1febef6 Merge pull request #5 from oyarzun/binDirectory d875757 is described below commit d875757a7282e56deb6def852b345d87f5881c7b Author: Christian Oyarzun <c...@oyarzun.net> AuthorDate: Mon Jan 6 14:37:05 2020 -0500 add harness executables first, then overwrite with executables found in binDirectory. --- .../apache/netbeans/nbm/CreateClusterAppMojo.java | 73 +++++++++++----------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java b/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java index 02ac0ac..126994d 100644 --- a/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java +++ b/src/main/java/org/apache/netbeans/nbm/CreateClusterAppMojo.java @@ -804,9 +804,44 @@ public class CreateClusterAppMojo File destExe64 = new File( destBinDir, brandingToken + "64.exe" ); File destSh = new File( destBinDir, brandingToken ); + + File harnessDir = new File( buildDir, "harness" ); + //we have org-netbeans-modules-apisupport-harness in target area, just use it's own launchers. + binDir = new File( + harnessDir.getAbsolutePath() + File.separator + "launchers" ); + if ( binDir.exists() ) + { + File exe = new File( binDir, "app.exe" ); + FileUtils.copyFile( exe, destExe ); + File exe64 = new File( binDir, "app64.exe" ); + if ( exe64.isFile() ) + { + FileUtils.copyFile( exe64, destExe64 ); + } + File exew = new File( binDir, "app_w.exe" ); + if ( exew.exists() ) //in 6.7 the _w.exe file is no more. + { + FileUtils.copyFile( exew, destExeW ); + } + File sh = new File( binDir, "app.sh" ); + FileUtils.copyFile( sh, destSh ); + } + else + { + File nbm = getHarnessNbm(); + try ( ZipFile zip = new ZipFile( nbm ) ) + { + getLog().debug( "Using fallback executables from downloaded org-netbeans-modules-apisupport-harness nbm file." ); + writeFromZip( zip, "netbeans/launchers/app.sh", destSh, true ); + writeFromZip( zip, "netbeans/launchers/app.exe", destExe, true ); + writeFromZip( zip, "netbeans/launchers/app64.exe", destExe64, false ); + writeFromZip( zip, "netbeans/launchers/app_w.exe", destExeW, false ); + } + } + if ( binDirectory != null ) { - //we have custom launchers. + //we have custom launchers, only overwrite the ones the user provided. binDir = binDirectory; File[] fls = binDir.listFiles(); if ( fls == null ) @@ -843,42 +878,6 @@ public class CreateClusterAppMojo } } } - else - { - File harnessDir = new File( buildDir, "harness" ); - //we have org-netbeans-modules-apisupport-harness in target area, just use it's own launchers. - binDir = new File( - harnessDir.getAbsolutePath() + File.separator + "launchers" ); - if ( binDir.exists() ) - { - File exe = new File( binDir, "app.exe" ); - FileUtils.copyFile( exe, destExe ); - File exe64 = new File( binDir, "app64.exe" ); - if ( exe64.isFile() ) - { - FileUtils.copyFile( exe64, destExe64 ); - } - File exew = new File( binDir, "app_w.exe" ); - if ( exew.exists() ) //in 6.7 the _w.exe file is no more. - { - FileUtils.copyFile( exew, destExeW ); - } - File sh = new File( binDir, "app.sh" ); - FileUtils.copyFile( sh, destSh ); - } - else - { - File nbm = getHarnessNbm(); - try ( ZipFile zip = new ZipFile( nbm ) ) - { - getLog().debug( "Using fallback executables from downloaded org-netbeans-modules-apisupport-harness nbm file." ); - writeFromZip( zip, "netbeans/launchers/app.sh", destSh, true ); - writeFromZip( zip, "netbeans/launchers/app.exe", destExe, true ); - writeFromZip( zip, "netbeans/launchers/app64.exe", destExe64, false ); - writeFromZip( zip, "netbeans/launchers/app_w.exe", destExeW, false ); - } - } - } Project antProject = antProject(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists