.NET: Fix build script to copy jars even if Java build is skipped

Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/da377204
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/da377204
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/da377204

Branch: refs/heads/ignite-5293
Commit: da37720449cff2cc5c2e1dd8c0015aab6ac6d5c6
Parents: 1ed088c
Author: Pavel Tupitsyn <[email protected]>
Authored: Mon Jun 5 16:06:10 2017 +0300
Committer: Pavel Tupitsyn <[email protected]>
Committed: Mon Jun 5 16:06:10 2017 +0300

----------------------------------------------------------------------
 modules/platforms/dotnet/build.ps1 | 36 ++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/da377204/modules/platforms/dotnet/build.ps1
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/build.ps1 
b/modules/platforms/dotnet/build.ps1
index 692959f..d9757ed 100644
--- a/modules/platforms/dotnet/build.ps1
+++ b/modules/platforms/dotnet/build.ps1
@@ -74,15 +74,15 @@ param (
  )
 
 # 1) Build Java (Maven)
-if (!$skipJava) {
-    # Detect Ignite root directory
-    cd $PSScriptRoot\..
+# Detect Ignite root directory
+cd $PSScriptRoot\..
 
-    while (!((Test-Path bin) -and (Test-Path examples) -and ((Test-Path 
modules) -or (Test-Path platforms))))
-    { cd .. }
+while (!((Test-Path bin) -and (Test-Path examples) -and ((Test-Path modules) 
-or (Test-Path platforms))))
+{ cd .. }
 
-    echo "Ignite home detected at '$pwd'."
+echo "Ignite home detected at '$pwd'."
 
+if (!$skipJava) {
     # Detect Maven
     $mv = "mvn"
     if ((Get-Command $mv -ErrorAction SilentlyContinue) -eq $null) { 
@@ -107,23 +107,23 @@ if (!$skipJava) {
     if ($LastExitCode -ne 0) {
         echo "Java (Maven) build failed."; exit -1
     }
-
-    # Copy (relevant) jars
-    $libsDir = "$PSScriptRoot\bin\Libs"
-    mkdir -Force $libsDir; del -Force $libsDir\*.*
-    
-    ls modules\indexing\target,modules\core\target,modules\spring\target *.jar 
-recurse `
-          -include 
"ignite-core*","ignite-indexing*","ignite-shmem*","ignite-spring*","lucene*","h2*","cache-api*","commons-*","spring*"
 `
-          -exclude "*-sources*","*-javadoc*","*-tests*" `
-          | % { copy -Force $_ $libsDir }
-
-    # Restore directory
-    cd $PSScriptRoot
 }
 else {
     echo "Java (Maven) build skipped."
 }
 
+# Copy (relevant) jars
+$libsDir = "$PSScriptRoot\bin\Libs"
+mkdir -Force $libsDir; del -Force $libsDir\*.*
+
+ls modules\indexing\target,modules\core\target,modules\spring\target *.jar 
-recurse `
+   -include 
"ignite-core*","ignite-indexing*","ignite-shmem*","ignite-spring*","lucene*","h2*","cache-api*","commons-*","spring*"
 `
+   -exclude "*-sources*","*-javadoc*","*-tests*" `
+   | % { copy -Force $_ $libsDir }
+
+# Restore directory
+cd $PSScriptRoot
+
 
 # 2) Build .NET
 # Detect MSBuild 4.0+

Reply via email to