You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2021/02/08 17:13:30 UTC

[ignite] branch master updated: IGNITE-10073 .NET: Document how to exclude jar files from build output

This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new a03313e  IGNITE-10073 .NET: Document how to exclude jar files from build output
a03313e is described below

commit a03313e1dd546b5d5a638e2a7e4b859f3f82f220
Author: Pavel Tupitsyn <pt...@apache.org>
AuthorDate: Mon Feb 8 20:13:02 2021 +0300

    IGNITE-10073 .NET: Document how to exclude jar files from build output
    
    * Update NuGet specifics
    * Document how to exclude jar files from build output with `<ExcludeAssets>build</ExcludeAssets>`
---
 .../_docs/net-specific/net-deployment-options.adoc | 40 ++++++++++++++--------
 1 file changed, 26 insertions(+), 14 deletions(-)

diff --git a/docs/_docs/net-specific/net-deployment-options.adoc b/docs/_docs/net-specific/net-deployment-options.adoc
index 752a78d..9a16852 100644
--- a/docs/_docs/net-specific/net-deployment-options.adoc
+++ b/docs/_docs/net-specific/net-deployment-options.adoc
@@ -17,35 +17,47 @@
 == Overview
 
 Apache Ignite.NET consists of .NET assemblies and Java jar files. The .NET assemblies are referenced by your project and
-are copied to an output folder during the build automatically. The JAR files should be copied manually.
+are copied to an output folder during the build automatically. The JAR files can be handled automatically or manually, depending on the approach.
 Ignite.NET discovers them via the `IgniteHome` or `JvmClasspath` settings.
 
 This page introduces several most-commonly used deployment options of Ignite.NET nodes.
 
-== Full Binary Package Deployment
-
-* Copy the https://ignite.apache.org[whole Ignite distribution package, window=_blank] along with your application
-* Set the `IGNITE_HOME` environment variable or `IgniteConfiguration.IgniteHome` setting to point to that folder
-
 == NuGet Deployment
 
-The post-build event is updated automatically during the Ignite.NET NuGet package installation to copy jar files to
-`Libs` folder in the output directory (see link:quick-start/dotnet[Getting Started]).
-Make sure to include that `Libs` folder when distributing your binaries.
+`Apache.Ignite` NuGet package includes a `lib` folder with all the required jar files. This folder has 
+the `<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>` build action, and is copied automatically to the output directory
+during the build or publish process.
 
 Make sure `IGNITE_HOME` is not set globally. Normally you don't need to set `IGNITE_HOME` with NuGet, except for
 ASP.NET deployments (see below).
 
+To disable this default build action, add the `<ExcludeAssets>build</ExcludeAssets>` https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets[property] to the corresponding `<PackageReference>` in your `.csproj` file.
+This can be useful for thin client use cases and custom deployments.
+
 [tabs]
 --
-tab:Post-Build Event[]
-[source,shell]
+tab:MyApp.csproj[]
+[source,xml]
 ----
-if not exist "$(TargetDir)Libs" md "$(TargetDir)Libs"
-xcopy /s /y "$(SolutionDir)packages\Apache.Ignite.1.6.0\Libs\*.*" "$(TargetDir)Libs"
+<Project Sdk="Microsoft.NET.Sdk">
+    ...
+
+    <ItemGroup>
+      <PackageReference Include="Apache.Ignite" Version="2.9.1">
+          <ExcludeAssets>build</ExcludeAssets>
+      </PackageReference>
+    </ItemGroup>
+
+</Project>
 ----
 --
 
+
+== Full Binary Package Deployment
+
+* Copy the https://ignite.apache.org/download.cgi#binaries[whole Ignite distribution package, window=_blank] along with your application
+* Set the `IGNITE_HOME` environment variable or `IgniteConfiguration.IgniteHome` setting to point to that folder
+
 == Custom Deployment
 
 The JAR files are located in the `libs` folder of the binary distribution and NuGet package.
@@ -58,7 +70,7 @@ The minimum set of jars for Ignite.NET is:
 
 === Deploying JARs to a default location:
 
-* Copy the JAR files to the `Libs` folder next to Apache.Ignite.Core.dll
+* Copy the JAR files to the `libs` folder next to Apache.Ignite.Core.dll
 * Do not set the `IgniteConfiguration.JvmClasspath`, `IgniteConfiguration.IgniteHome` properties and `IGNITE_HOME` environment variable
 
 === Deploying jar files to an arbitrary location: