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
Copy file name to clipboardExpand all lines: INSTALL
+27-4Lines changed: 27 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,33 @@ Project Structure
30
30
------------------------------
31
31
The source of Grails is a multi-project Gradle build that uses composite multi-project builds via Gradle's includeBuild feature. The main project is `grails-core`, which contains the core framework code and all libraries that an end user would use in their application. The `grails-gradle` project contains code meant to run on the gradle build classpath. `grails-forge` contains tooling related to App Generation.
32
32
33
+
Building a Release Version
34
+
------------------------------
35
+
The source distribution will always be a release version of Grails - this means the version number will not contain the suffix `SNAPSHOT` and the release requirements will apply by default. One of those requirements is jar file signing. In order for forge to always correctly pull the `grails-core` project, a local publishing strategy is used - the jar files are published to a directory inside of the build directory of `grails-core`. This publishing means building the jar files will always trigger the signing process. To successfully build the source distribution, either signing must be disabled or signing must be correctly configured.
36
+
37
+
Disabling Signing
38
+
------------------------------
39
+
To disable signing, set the environment variable `GRAILS_PUBLISH_RELEASE` to `false`. This can be done by running the following command in the terminal:
40
+
41
+
export GRAILS_PUBLISH_RELEASE=false
42
+
43
+
Enabling Signing
44
+
------------------------------
45
+
Grails makes use of the Grails Publish Gradle plugin to handle publishing artifacts. This plugin supports signing either via native tooling or via java libraries.
46
+
47
+
To configure the native tooling, gpg must be installed with a key imported. Then the following must be specified:
Please note: if no GPG Key passphrase is set, then simply leave the environment variable `SIGNING_PASSPHRASE` unset.
59
+
33
60
Building grails-core
34
61
------------------------------
35
62
To build the libraries a Grails Application would use, run the following command at the source root:
@@ -58,10 +85,6 @@ To use the built libraries in a Grails Application, libraries must be published
58
85
./gradlew build publishToMavenLocal -PskipTests
59
86
cd grails-forge && ./gradlew build publishToMavenLocal -PskipTests
60
87
61
-
Please note that this will require signing with the GPG command since releases are mandated to be signed. To disable signing, set the environment variable to disable release detection:
62
-
63
-
export GRAILS_PUBLISH_RELEASE=false
64
-
65
88
Creating an Application
66
89
------------------------------
67
90
By default, the Grails CLI uses standard maven repos to retrieve upstream Grails libraries. However, it's possible to "override" this behavior by setting the environment variable `GRAILS_REPO_URL` to an alternative location. When wanting to use the libraries generated by a source distribution, set it to your local Maven repository, which is typically `~/.m2/repository`. This can be done by running the following command in the terminal:
Copy file name to clipboardExpand all lines: RELEASE.md
+24-18Lines changed: 24 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -73,11 +73,13 @@ For Example:
73
73
verify.sh v7.0.0-M4 /tmp/grails-verify
74
74
```
75
75
76
-
### Download the Staged Artifacts
76
+
Otherwise, you may follow the subsequent steps in this section to verify each step individually.
77
+
78
+
### Manual Verification: Download the Staged Artifacts
77
79
78
80
Use `etc/bin/download-release-artifacts.sh` to download the staged artifacts. This script will download the source distribution, wrapper binary distribution, and sdkman binary distribution. The distribution should come from [https://dist.apache.org/repos/dist/dev/incubator/grails/core/version](https://dist.apache.org/repos/dist/dev/incubator/grails/core).
79
81
80
-
### Source Distribution Verification
82
+
### Manual Verification: Source Distribution Verification
81
83
82
84
The following are the source distribution artifacts:
83
85
*`apache-grails-<version>-incubating-src.zip` - the source distribution
@@ -102,7 +104,7 @@ Extracts the zip file and verifies the contents:
102
104
* Ensure the `PUBLISHED_ARTIFACTS` file is present so we know how to pull the various jar files.
103
105
* Ensure the `CHECKSUMS` file is present so we can ensure those checksums match the staged artifacts.
104
106
105
-
### Jar file Signature Verification (Nexus Staging Repositories)
107
+
### Manual Verification: Jar file Signature Verification (Nexus Staging Repositories)
106
108
107
109
As part of uploading to repository.apache.org the signatures are verified to match a KEY that has been distributed, but RAO does not verify that the jar files are built with a key trusted by the Grails project.
After all jar files are verified to be signed by a valid Grails key, we need to build a local copy to ensure the file was built with the right code base. The `very-reproducible.sh` script handles this check, but if the bootstrap needs to be manually bootstrapped, perform the following step:
118
120
119
121
gradle -p gradle bootstrap
@@ -124,13 +126,17 @@ If there are any jar file differences, confirm they are relevant by following th
124
126
1. Extract the differing jar file using the `etc/bin/extract-build-artifact.sh <jarfilepath from diff.txt>`
125
127
2. In IntelliJ, under `etc/bin/results` there will now be a `firstArtifact` & `secondArtifact` folder. Select them both, right click, and select `Compared Directories`
126
128
127
-
### Binary Distribution Verification
129
+
Please note that Grails is officially built on Linux so if there are differences they may be due to the OS platform.
130
+
There is a dockerfile checked into to assist building in an environment like GitHub actions. Please see the section
131
+
`Appendix: Verification from a Container` for more information.
132
+
133
+
### Manual Verification: Binary Distribution Verification
128
134
129
135
Grails has 2 binary distributions:
130
136
*`grailsw` - the Grails wrapper, which is a script that downloads the necessary jars to run Grails. This will exist inside of the generated applications, but can be optionally downloaded as a standalone binary distribution.
131
137
*`grails` - the delegating CLI, which is a script that delegates to the Grails Forge CLI. This is the `sdkman` distribution.
132
138
133
-
#### Verify Grails Wrapper Binary Distribution
139
+
#### Manual Verification: Verify Grails Wrapper Binary Distribution
134
140
135
141
The following are the Grails Wrapper distribution artifacts:
136
142
*`apache-grails-wrapper-<version>-incubating-bin.zip` - the wrapper distribution
@@ -152,7 +158,7 @@ Verifies the wrapper distribution signature via the command:
152
158
Extracts the zip file and verifies the contents:
153
159
* Ensure the `LICENSE` & `NOTICE` files are present to ensure license compliance.
154
160
155
-
#### Verify Grails Delegating CLI Binary Distribution
161
+
#### Manual Verification: Verify Grails Delegating CLI Binary Distribution
156
162
157
163
The following are the Grails distribution artifacts:
158
164
*`apache-grails-<version>-incubating-bin.zip` - the cli distribution that will be uploaded to sdkman
@@ -176,12 +182,17 @@ Extracts the zip file and verifies the contents:
176
182
177
183
## 3. Verifying the CLIs are Functional
178
184
179
-
The CLI distribution consists of various CLI's: `grailsw` (wrapper), `grails` (delegating), `grails-forge-cli`, and `grails-shell-cli`. Each CLI needs tested to ensure it's functional prior to release:
185
+
The CLI distribution consists of various CLI's: `grailsw` (wrapper), `grails` (delegating), `grails-forge-cli`, and
186
+
`grails-shell-cli`. Each CLI needs tested to ensure it's functional prior to release. The `verify.sh` script will output
187
+
example commands to perform this verification. However, it if manually verifying, these are the minimum suggested steps:
180
188
181
-
*testing`grailsw`:
189
+
*Testing`grailsw`:
182
190
* set GRAILS_REPO_URL to the staging repository (https://repository.apache.org/content/groups/staging)
183
191
* run `grailsw` and ensure it downloads the correct jars to `.grails` (verify the checksums of the jars)
184
-
* testing `grails-shell-cli`:
192
+
* Please note that the Grails Wrapper (`grailsw`) writes to the `.grails` directory in the user's home directory. If
193
+
not run in an isolated environment, it may attempt to use already downloaded artifacts. If the wrapper fails, try
194
+
removing the `.grails` directory to confirm it isn't a transient state issue.
195
+
* Testing `grails-shell-cli`:
185
196
* create a basic app:
186
197
```bash
187
198
grails-shell-cli create-app test
@@ -310,18 +321,13 @@ Setup the key for validity:
310
321
311
322
# Appendix: Verification from a Container
312
323
313
-
The Grails image is officially built on linux in a GitHub action using an Ubuntu container. To run a linux container locally, you can use the following command:
324
+
The Grails image is officially built on linux in a GitHub action using an Ubuntu container. To run a linux container
325
+
locally, you can use the following command (substitute `<git-tag-of-release` with the tag name):
Please note that the argument `-p 8080:8080` is used to expose the port 8080 of the container to the host machine's port 8080 (fromContainerPort:toHostPort). This allows you to access any running Grails application in the container from your host. If you have another application on port 8080, you can change the port mapping to avoid conflicts, e.g., `-p 8080:8081`.
Copy file name to clipboardExpand all lines: grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
0 commit comments