Skip to content

Commit 4eb9d4b

Browse files
committed
Updates to various documentation that will be included in an source only release
1 parent d8c31d0 commit 4eb9d4b

File tree

9 files changed

+161
-85
lines changed

9 files changed

+161
-85
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
name: "Java CI"
16+
name: "CI"
1717
on:
1818
push:
1919
branches:

CODE_OF_CONDUCT.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Code of Conduct
2+
3+
Apache Grails (Incubating) follows the ASF [Code of
4+
Conduct](https://www.apache.org/foundation/policies/conduct).
5+
6+
If you observe behavior that violates those rules please follow the
7+
[ASF reporting
8+
guidelines](https://www.apache.org/foundation/policies/conduct#reporting-guidelines).

CONTRIBUTING.md

Lines changed: 58 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ All types of contributions are encouraged and valued. See the [Table of Contents
2525

2626
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
2727
> - Star the project
28-
> - Tweet about it
28+
> - Talk about it on Social Media
2929
> - Refer to this project in your project's readme
3030
> - Mention the project at local meetups and tell your friends/colleagues
31-
> - [Donate](https://opencollective.com/friends-of-grails) to the Friends of Grails initiative so others can work on the project.
3231
3332
<!-- omit in toc -->
3433
## Table of Contents
@@ -68,7 +67,8 @@ If you then still feel the need to ask a question and need clarification, we rec
6867
## I Want to Contribute
6968

7069
> ### Legal Notice <!-- omit in toc -->
71-
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. All committers must sign the project's CLA. More detailed requirements are available in the project's [CLA](https://cla-assistant.io/apache/grails-core).
70+
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the
71+
> necessary rights to the content and that the content you contribute may be provided under the project license.
7272
7373
### Reporting Bugs
7474

@@ -142,23 +142,44 @@ One of the benefits of [GitHub](http://github.com) is the way that you can easil
142142
If you're interested in contributing fixes and features to any part of grails, you will have to learn how to get hold of the project's source, build it and test it with your own applications. Before you start, make sure you have:
143143

144144
* A git client
145-
* An Editor such as [IntelliJ](https://www.jetbrains.com/idea/).
145+
* An Editor such as [IntelliJ](https://www.jetbrains.com/idea/)
146+
* A JDK (17 or higher)
147+
* A container runtime
146148

147-
Once you have the pre-requisite packages installed, the next step is to download the Grails source code, which is hosted at [GitHub](http://github.com) in several repositories owned by the ["grails" GitHub user](http://github.com/grails). This is a simple case of cloning the repository you're interested in. For example, to get the core framework run:
149+
Once you have the pre-requisite packages installed, the next step is to download the Apache Grails source code, which is
150+
hosted at [GitHub](http://github.com/apache/grails-core). This is a simple case of cloning the repository you're
151+
interested in. For example, to get the core framework run:
148152

149153
git clone http://github.com/apache/grails-core.git
150154

151-
This will create a `grails-core` directory in your current working directory containing all the project source files. The next step is setting up the JDK to use. Grails makes use of [SDKMAN!](https://sdkman.io/) for easy JDK setup. Each Grails project should have a `.sdkmanrc` in it's root directory. Change to the `grails-core` directory and install the preferred JDK by issuing the command:
155+
This will create a `grails-core` directory in your current working directory containing all the project source files.
156+
The next step is setting up the JDK to use. Grails makes use of [SDKMAN!](https://sdkman.io/) for easy JDK setup. Each
157+
Grails project should have a `.sdkmanrc` in it's root directory. Change to the `grails-core` directory and install the
158+
preferred JDK by issuing the command:
152159

153160
sdk env .
154161

162+
##### 3. Building the Code
163+
164+
To build the code, without tests, simply run:
165+
166+
./gradlew build -PskipTests
167+
168+
If you encounter out of memory errors when trying to run the build, try adjusting Gradle build settings. For example:
169+
170+
export GRADLE_OPTS="-Xmx2G -Xms2G -XX:NewSize=512m -XX:MaxNewSize=512m"
171+
172+
Please note that a valid container runtime is required to run Grails Tests. The example above omits the tests so the
173+
build will pass.
174+
155175
<!-- omit in toc -->
156176
#### Testing Your Change
157-
Grails has both local test coverage in the form of `unit` and `integration` tests.
158177

159-
To run the full suite of tests in `grails-core` execute:
178+
Grails has test coverage in the form of `unit`, `integration`, and `functional` tests.
160179

161-
./gradlew check
180+
To force a full run of the full suite of tests in `grails-core` execute:
181+
182+
./gradlew build --rerun-tasks
162183

163184
Check the test results & verify that the build completes successfully.
164185

@@ -170,10 +191,13 @@ Sometimes it's useful to debug your local application to see what's going wrong.
170191
By default, Grails forks a JVM to run the application. The `-debug-jvm` argument causes the debugger to be associated with the forked JVM. You can then attach your debugger as proceed as normal.
171192

172193
### Improving The Documentation
173-
There are many aspects to [Grail's documentation](https://grails.org/documentation.html):
194+
195+
There are many aspects to [Grail's documentation](https://docs.grails.org/)
174196
- [API](https://docs.grails.org/latest/api/) documentation in the code itself via javadoc & groovydoc.
175-
- [The Grails User Guide](https://docs.grails.org/6.2.1/guide/single.html) from the [grails-doc](https://github.com/apache/grails-doc) project.
176-
- Various how-to [Guides](https://guides.grails.org/index.html) from the [grails-guides](https://github.com/grails/grails-guides) project.
197+
- [The Grails User Guide](https://docs.grails.org/latest/guide/single.html) from the `grails-doc` project in this
198+
repository.
199+
- Various how-to [Guides](https://guides.grails.org/index.html) from
200+
the [grails-guides](https://github.com/grails-guides) Organization.
177201

178202
<!-- omit in toc -->
179203
#### <u>Improving the User Guide</u>
@@ -183,12 +207,10 @@ This will link to the GitHub edit screen where you can make changes, preview the
183207

184208
<!-- omit in toc -->
185209
#### <u>Building the Guide</u>
186-
If you want to make significant changes, such as changing the structure of the table of contents etc. then we recommend you build the user guide. To do that simply checkout the sources from GitHub:
187-
188-
$ git clone https://github.com/apache/grails-doc/
189-
$ cd grails-doc
190210

191-
The source files can be found in the `src/en/guide` directory. Whilst the Table of Contents (TOC) is defined in the `src/en/guide/toc.yml` file.
211+
If you want to make significant changes, such as changing the structure of the table of contents etc. then we recommend
212+
you build the user guide. The source files can be found in the `grails-doc/src/en/guide` directory. Whilst the Table of
213+
Contents (TOC) is defined in the `grails-doc/src/en/guide/toc.yml` file.
192214

193215
Each YAML key points to a Asciidoc template. For example consider the following YAML:
194216

@@ -198,27 +220,39 @@ Each YAML key points to a Asciidoc template. For example consider the following
198220
title: What's new in Grails 3.2?
199221
...
200222

201-
The `introduction` key points to `src/en/guide/introduction.adoc`. The `title` key defines the title that is dislayed in the TOC. Because `whatsNew` key is nested underneath the `introduction` key it points to `src/en/guide/introduction/whatsNew.adoc`, which is nested in a directory called `introduction`.
223+
The `introduction` key points to `grails-doc/src/en/guide/introduction.adoc`. The `title` key defines the title that is
224+
dislayed in the TOC. Because `whatsNew` key is nested underneath the `introduction` key it points to
225+
`grails-doc/src/en/guide/introduction/whatsNew.adoc`, which is nested in a directory called `introduction`.
202226

203227
Essentially, using the `toc.yml` file and the directory structure you can manipulate the structure of the user guide.
204228

205-
To generate the documentation run the `publishGuide` task:
229+
To generate the documentation run the `publishGuide` in the `grails-doc` task:
206230

207-
./gradlew publishGuide -x apiDocs
231+
./gradlew :grails-doc:publishGuide -x aggregateGroovydoc
208232

209-
NOTE: In the above example we skip the `apiDocs` task to speed up building of the guide, otherwise all Groovydoc documentation will be built too!
233+
NOTE: In the above example we skip the `aggregateGroovydoc` task to speed up building of the guide, otherwise all
234+
Groovydoc documentation will be built too!
210235

211-
Once the guide is built simply open the `build/docs/index.html` file in a browser to review your changes.
236+
Once the guide is built simply open the `grails-doc/build/original-guide/index.html` file in a browser to review your
237+
changes.
212238

213239
## Code Style
214240

215241
Grails code style mostly mirrors the Spring Framework's [Style Guide](https://github.com/spring-projects/spring-framework/blob/main/CONTRIBUTING.md#source-code-style). We are currently working on a more detailed proposal under ticket [#13754](https://github.com/apache/grails-core/issues/13754).
216242

217243
### Commit Messages
218-
Grails makes use of [Release Drafter](https://github.com/release-drafter/release-drafter) to draft its release notes so commit messages are important. They should follow the project's rules. While a change can be incrementally made under many commits, pull requests should be squashed into a single, meaningful commit message.
244+
245+
Grails makes use of [Release Drafter](https://github.com/release-drafter/release-drafter) to draft its release notes so
246+
commit messages are important. They should follow the project's rules. While a change can be incrementally made under
247+
many commits, pull requests should be squashed into a single, meaningful commit message.
219248

220249
### Change Review Process
221-
The Grails project uses different review processes based on the change being made. We use both a `Review then Commit` policy and a `Commit then Review` policy. These policies only apply to what we consider `protected` branches - where a `protected` branch is a branch that will result in published code or tracks a Grails release version (i.e. 7.0.x is for the Grails 7 release). Development will often occur in side branches without review and the review will be performed at the time of merging those changes into a `protected` branch.
250+
251+
The Apache Grails project uses different review processes based on the change being made. We use both a
252+
`Review then Commit` policy and a `Commit then Review` policy. These policies only apply to what we consider `protected`
253+
branches - where a `protected` branch is a branch that will result in published code or tracks an Apache Grails release
254+
version (i.e. 7.0.x is for the Apache Grails 7 release). Development will often occur in side branches without review
255+
and the review will be performed at the time of merging those changes into a `protected` branch.
222256

223257
Concerning when a review is required for a `protected` branch:
224258
* Build Related Changes - `Commit then Review`

README.md

Lines changed: 81 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,102 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
1616

17-
# Grails
18-
[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.grails.org/scans)
19-
[![Java CI](https://github.com/apache/grails-core/actions/workflows/gradle.yml/badge.svg?event=push)](https://github.com/apache/grails-core/actions/workflows/gradle.yml)
17+
# Apache Grails (Incubating)
18+
19+
[![Documentation](https://img.shields.io/badge/Documentation-595959)](https://docs.grails.org)
20+
[![Develocity](https://img.shields.io/badge/Develocity-06A0CE?logo=Gradle&labelColor=06A0CE)](https://ge.grails.org/scans)
21+
[![CI](https://github.com/apache/grails-core/actions/workflows/gradle.yml/badge.svg?event=push)](https://github.com/apache/grails-core/actions/workflows/gradle.yml)
2022
[![Groovy Joint Validation Build](https://github.com/apache/grails-core/actions/workflows/groovy-joint-workflow.yml/badge.svg?event=push)](https://github.com/apache/grails-core/actions/workflows/groovy-joint-workflow.yml)
23+
[![Mailing List](https://img.shields.io/badge/Join_Mailing_List-feb571)](https://lists.apache.org/[email protected])
24+
[![Slack](https://img.shields.io/badge/Join_Slack-e01d5a)](https://slack.grails.org/)
25+
[![GitHub Discussions](https://img.shields.io/github/discussions/apache/grails-core)](https://github.com/apache/grails-core/discussions)
26+
27+
## Introduction
28+
29+
[Apache Grails](https://grails.org/) is a framework used to build web applications with
30+
the [Apache Groovy](https://groovy-lang.org/) programming language. Releases prior to 7.0.0 were outside of the Apache
31+
Software Foundation. The core framework is very extensible and there are numerous [plugins](https://plugins.grails.org/)
32+
available that provide easy integration of add-on features. To assist in getting started, various Application generators
33+
exist and are provided by the Apache Grails team.
34+
35+
## Getting help
36+
37+
Ask questions on the [Grails User Mailing List](https://lists.apache.org/[email protected])
38+
Join the discussions on [Slack](https://slack.grails.org/)
39+
Check the [Documentation](https://docs.grails.org/) for your preferred Apache Grails version.
40+
Check for a [Grails Guide](https://github.com/grails-guides/).
41+
42+
## Application Generation
43+
44+
The only requirement for Apache Grails is the Java Development Kit (JDK). Once a JDK is installed there are many ways to
45+
get started. The preferred way to get started is to use [Grails Forge](https://start.grails.org). Alternatively, offline
46+
CLI applications exist to assist in Application generation. Instructions for them follow.
47+
48+
### Wrapper
49+
50+
The Apache Grails Wrapper is a tiny distribution (25KB) that can manage larger sized CLIs for Grails. It consists of a
51+
`grailsw` shell script, a `grailsw.bat` batch script, and the jar file `grails-wrapper.jar`. It can be downloaded from
52+
the latest [Github Release](https://github.com/apache/grails-core/releases) page starting with 7.0.0-M4 & it is included
53+
in any created project. The wrapper is used to either create an Apache Grails Application or to run commands in an
54+
existing Grails Application directory. The wrapper is generally meant to be forward compatible and downloads the Apache
55+
Grails CLIs to the directory `$HOME/.grails/wrapper`.
56+
57+
#### Wrapper - Creating a Apache Grails Application
58+
59+
To create an Apache Grails Application with the wrapper follow these steps:
2160

22-
### Getting help
23-
Join the discussions on [Slack](https://slack.grails.org/)
24-
Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/grails)
61+
1. Extract the wrapper to your preferred location.
62+
2. Set the environment variable `PREFERRED_GRAILS_VERSION` to the preferred version.
63+
3. Run the wrapper command `grailsw -t forge create-app` to create a new Apache Grails Application.
2564

26-
## What is Grails?
27-
[Grails](https://grails.org/) is a framework used to build web applications with the [Groovy](https://groovy-lang.org/) programming language. The core framework is very extensible and there are numerous [plugins](https://plugins.grails.org/) available that provide easy integration of add-on features.
65+
Please note, that the wrapper supports either the legacy `Apache Grails Shell` or the newer `Apache Grails Forge` CLI.
66+
For more detailed information about it, see the [documentation](https://docs.grails.org/snapshot/index.html).
2867

29-
[Commercial support](https://grails.org/support.html) options are available.
68+
#### Wrapper - Running Commands inside a Apache Grails Project
3069

31-
## Getting Started
70+
For running commands, the Grails Wrapper will always pull the Apache Grails version from `gradle.properties` and ignore
71+
any environment variables. Type `grailsw -t shell help` to see the available commands. For more detailed information
72+
about it, see the [documentation](https://docs.grails.org/snapshot/index.html).
3273

33-
You need a Java Development Kit (JDK) installed, but it is not necessary to install Groovy because it's bundled with the Grails distribution.
74+
### grails-shell-cli
3475

35-
It's recommended to use the [SDKMAN!](https://sdkman.io/) tool to install & manage multiple Grails version.
36-
Alternatively, visit https://grails.org/download.html for other install options. If downloading the binary, the only
37-
requirement is it be added to your path.
76+
The legacy Apache Grails CLI is the command line interface that IntelliJ uses to interact with existing Apache Grails
77+
Applications. It can be used to generate applications or it can be used to interact with existing ones. To use it,
78+
download it to your preferred location from the [grails-forge](https://github.com/apache/grails-forge/releases) release
79+
page. You can use the command `./grails-shell-cli help` to see what's possible.
3880

39-
To create your first Grails Application, you can use [Grails Forge](https://start.grails.org) or you can use the command
40-
line. For legacy reasons, there exists 2 ways to generate Grails applications. `Grails Forge` and `Grails Shell`. The
41-
grails binary allows you to use either to generate an app.
81+
### grails-forge-cli
4282

43-
For example purposes, using the legacy shell:
83+
The newer Apache Grails CLI is available from the [grails-forge](https://github.com/apache/grails-forge/releases)
84+
release page. You can use the command `./grails-forge-cli --help` to see what's possible.
4485

45-
grails create-app sampleapp
46-
cd sampleapp
47-
./gradlew bootRun
86+
### SDKMAN
4887

49-
To build Grails, clone this GitHub repository and execute the build Gradle target:
88+
If managing multiple, local copies of the Grails CLI, it is recommended to use [SDKMAN!](https://sdkman.io/). Assuming
89+
SDKMAN is installed, this command would install the 7.0.0-M4 version:
5090

51-
git clone https://github.com/apache/grails-core.git
52-
cd grails-core
53-
./gradlew build -PskipTests
91+
sdk install grails 7.0.0-M4
5492

55-
If you encounter out of memory errors when trying to run the build, try adjusting Gradle build settings. For example:
93+
Apache Grails versions installed via SDKMAN! include the following commands `grails`, `grails-shell-cli`, &
94+
`grails-forge-cli`. The grails command simply delegates to forge or the legacy shell. For further information on SDKMAN,
95+
please see their [website](https://sdkman.io/).
5696

57-
export GRADLE_OPTS="-Xmx2G -Xms2G -XX:NewSize=512m -XX:MaxNewSize=512m"
97+
## Starting your Grails Application
5898

59-
Please note that a valid container runtime is required to run Grails Tests. The example above omits the tests so the
60-
build will pass.
99+
Once your Apache Grails Application is created, you can start it with the command:
100+
101+
./gradlew bootRun
102+
103+
For further information, please consult the [documentation](https://docs.grails.org).
104+
105+
## Building Grails
106+
107+
For building Grails, please consult the [CONTRIBUTING.md](CONTRIBUTING.md) file.
108+
109+
## Licensing
110+
111+
Apache Grails is licensed under the Apache License, Version 2.0. For details, see
112+
the [LICENSE](./LICENSE).
61113

62114
## Performing a Release
63115

@@ -70,16 +122,3 @@ https://opencollective.com/friends-of-grails
70122

71123
This initiative is designed to complement the Apache project and the many contributions we get from our great community and supporters.
72124

73-
74-
## License
75-
76-
Grails and Groovy are licensed under the terms of the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).
77-
78-
***
79-
80-
YourKit is kindly supporting Grails open source projects with its full-featured Java Profiler.
81-
YourKit, LLC is the creator of innovative and intelligent tools for profiling
82-
Java and .NET applications. Take a look at YourKit's leading software products:
83-
[YourKit Java Profiler](https://www.yourkit.com/java/profiler/features/) and
84-
[YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/features/).
85-

grails-data-hibernate5/dbmigration/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
1616

17-
[![Java CI](https://github.com/grails/grails-database-migration/actions/workflows/gradle.yml/badge.svg)](https://github.com/grails/grails-database-migration/actions/workflows/gradle.yml)
18-
1917
# Grails Database Migration Plugin
2018

2119
## Branches

0 commit comments

Comments
 (0)