You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary of the steps required. See sections below for more detailed steps
6
+
7
+
*NOTE:* The use of gradlew is required
8
+
9
+
1. Create standalone deployer zip
10
+
```
11
+
./gradlew makeOfflineZip
12
+
```
13
+
2. Copy zip (build/distributions/offline.zip) to desired location / server and unzip
14
+
15
+
3. Run disconnected tasks from unzip location
16
+
```
17
+
./gradlew mlDeploy -Pdisconnected=true
18
+
```
19
+
20
+
21
+
## Overview
22
+
23
+
An example of how to create a completely self-contained deployer zip that contains -
24
+
1. All of the plugin / depencencies required to run the deployment (including ml-gradle)
25
+
2. The gradle distribution
26
+
27
+
Once the zip has been created, you only need Java to run the deployment tasks
28
+
29
+
This approach is useful when you need to create a package that does not require any external ressources (e.g. maven/gradle repositories) to perform deployment operations.
30
+
31
+
## Requirements
32
+
33
+
* Java 8/9
34
+
* Internet connection (for creation of zip only)
35
+
36
+
37
+
## How it works
38
+
39
+
This project will -
40
+
* Download all of the required dependencies (including plugins) into the 'build/offline/maven-repo' directory in the project.
41
+
* Download the gradle binary distribution (zip) into the 'build/offline/gradle/wrapper' directory in the project
42
+
* Create an offline.zip in build/distributions that contains
43
+
* the gradle project itsself
44
+
* all of the required depenencies
45
+
* the gradle distribution that works with the gradlew executable
46
+
47
+
48
+
## Usage
49
+
50
+
*NOTE:* It is important to use the gradlew executable as it will download the gradle distribution that will be encorporated into the self-contained deployer zip
51
+
52
+
## 1. Create the self-contained deployer zip
53
+
54
+
*NOTE:* This needs to be executed from a machine with access to the internet. It will create the zip at the location build/distributions/offline.zip
55
+
56
+
#### Linux / Mac
57
+
58
+
```
59
+
./gradlew makeOfflineZip
60
+
```
61
+
62
+
#### Windows
63
+
64
+
```
65
+
gradlew makeOfflineZip
66
+
```
67
+
68
+
69
+
## 2. Unzip the distribution
70
+
71
+
Copy the created offline.zip to the desired location and unzip
72
+
73
+
```
74
+
unzip offline.zip
75
+
```
76
+
77
+
## 3. Execute disconnected the gradle tasks
78
+
79
+
From the directory that you have unzipped the offline.zip file into
80
+
81
+
```
82
+
./gradlew mlDeploy -Pdisconnected=true
83
+
```
84
+
85
+
This will use the jars that you have already downloaded to 'build/offline/maven-repo'
86
+
87
+
## Customise
88
+
89
+
**IMPORTANT**: If you want to include dependencies for a configuration (e.g. compile, runtime, mlcp etc), then you need to modify the 'downloadToProjectMavenRepo' task to include the relevant configuration. E.g. by adding 'configurations.compile.files' to the beginning of the task, all of the dependencies for the 'compile' task will be downloaded.
90
+
91
+
E.g. (assuming you are using the java plugin), the configuration below will download all the compile and runtime dependencies that you have defined
0 commit comments