This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch wrapper-profiles-merge
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/wrapper-profiles-merge by this
push:
new b8a68c5be3 Integrate grails-wrapper into grails-core
b8a68c5be3 is described below
commit b8a68c5be38f23237f575f13905d318d843b905a
Author: James Daugherty <[email protected]>
AuthorDate: Tue Apr 29 21:00:57 2025 -0400
Integrate grails-wrapper into grails-core
---
build.gradle | 5 +
gradle/assemble-root-config.gradle | 5 +-
gradle/functional-test-config.gradle | 4 +-
gradle/publish-root-config.gradle | 5 +-
grails-bom/build.gradle | 2 +-
grails-wrapper-downloader/build.gradle | 39 +++++
.../main/java/grails/init/FindReleaseHandler.java | 0
.../src/main/java/grails/init/Start.java | 18 +--
.../proxy/SystemPropertiesAuthenticator.java | 0
grails-wrapper/README.md | 32 ----
grails-wrapper/build.gradle | 82 +++++-----
grails-wrapper/gradle.properties | 5 -
.../publishing/grailsCentralPublishing.gradle | 46 ------
grails-wrapper/settings.gradle | 29 ----
grails-wrapper/shell/grailsw.bat | 178 ++++++++++-----------
.../src/main/groovy/grails/init/RunCommand.groovy | 1 -
grails-wrapper/starter/build.gradle | 8 -
grails-wrapper/wrapper/build.gradle | 115 -------------
settings.gradle | 6 +-
19 files changed, 203 insertions(+), 377 deletions(-)
diff --git a/build.gradle b/build.gradle
index 68e3765598..cbf31aac7b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -48,6 +48,7 @@ ext {
]
testProjects = [ /* Will be populated by subprojects loop below */]
docProjects = [ /* Will be populated by subprojects loop below */]
+ cliProjects = [ /* Will be populated by subprojects loop below */]
}
allprojects {
@@ -72,6 +73,10 @@ subprojects {
rootProject.ext['docProjects'] << name
}
+ if (name.startsWith('grails-wrapper')) {
+ rootProject.ext['cliProjects'] << name
+ }
+
configurations.configureEach {
resolutionStrategy {
def cacheHours = isCiBuild ? 0 : 24
diff --git a/gradle/assemble-root-config.gradle
b/gradle/assemble-root-config.gradle
index e7283caf7d..0fe8de0726 100644
--- a/gradle/assemble-root-config.gradle
+++ b/gradle/assemble-root-config.gradle
@@ -99,7 +99,7 @@ class GrailsCreateStartScripts extends CreateStartScripts {
tasks.register('install').configure { task ->
dependsOn 'syncCliDependencies', 'grailsCreateStartScripts'
subprojects { Project subproject ->
- if (!(subproject.name in testProjects) && !(subproject.name in
docProjects)) {
+ if (!(subproject.name in testProjects) && !(subproject.name in
docProjects) && !(subproject.name in cliProjects)) {
task.dependsOn("$subproject.name:publishToMavenLocal")
}
}
@@ -128,6 +128,9 @@ tasks.register('assemble', Zip).configure {
testProjects.each { projectName ->
pathsToExclude <<
rootProject.projectDir.relativePath(project(projectName as String).projectDir)
}
+ cliProjects.each { projectName ->
+ pathsToExclude <<
rootProject.projectDir.relativePath(project(projectName as String).projectDir)
+ }
exclude pathsToExclude
}
from(homeDistDir) {
diff --git a/gradle/functional-test-config.gradle
b/gradle/functional-test-config.gradle
index 60fb0dd526..8cba5eeb68 100644
--- a/gradle/functional-test-config.gradle
+++ b/gradle/functional-test-config.gradle
@@ -18,7 +18,7 @@
*/
rootProject.subprojects
- .findAll { !(it.name in testProjects) && !(it.name in docProjects) }
+ .findAll { !(it.name in testProjects) && !(it.name in docProjects) &&
!(it.name in cliProjects) }
.each { project.evaluationDependsOn(it.path) }
configurations.configureEach {
@@ -26,7 +26,7 @@ configurations.configureEach {
// Test projects will often include dependencies from local projects.
This will ensure any dependencies
// included will be substituted with the local projects in this
repository instead of pulling upstream.
for (def possibleProject : rootProject.subprojects) {
- if (!(possibleProject.name in testProjects) &&
!(possibleProject.name in docProjects)) {
+ if (!(possibleProject.name in testProjects) &&
!(possibleProject.name in docProjects) && !(possibleProject.name in
cliProjects)) {
def artifactId = possibleProject.findProperty('pomArtifactId')
?: possibleProject.name
def substitutedArtifact = "$possibleProject.group:$artifactId"
//TODO: This does not handle libraries that are both test
fixtures & a libraries like grails-data-mongodb,
diff --git a/gradle/publish-root-config.gradle
b/gradle/publish-root-config.gradle
index 218a742c2c..f4989e67a7 100644
--- a/gradle/publish-root-config.gradle
+++ b/gradle/publish-root-config.gradle
@@ -115,7 +115,10 @@ def publishedProjects = [
'grails-data-mongodb-bson',
'grails-data-mongodb-ext',
'grails-data-mongodb',
- 'grails-data-mongodb-gson-templates'
+ 'grails-data-mongodb-gson-templates',
+ // wrapper
+ 'grails-wrapper-downloader',
+ 'grails-wrapper'
]
subprojects {
diff --git a/grails-bom/build.gradle b/grails-bom/build.gradle
index daed1ce27a..2d3fa5e756 100644
--- a/grails-bom/build.gradle
+++ b/grails-bom/build.gradle
@@ -62,7 +62,7 @@ dependencies {
}
for (Project subproject : rootProject.subprojects) {
- if (subproject.path == project.path || subproject.name in
testProjects || subproject.name in docProjects) {
+ if (subproject.path == project.path || subproject.name in
testProjects || subproject.name in docProjects || subproject.name in
cliProjects) {
continue // ignore self & test projects
}
diff --git a/grails-wrapper-downloader/build.gradle
b/grails-wrapper-downloader/build.gradle
new file mode 100644
index 0000000000..7ecdc5508a
--- /dev/null
+++ b/grails-wrapper-downloader/build.gradle
@@ -0,0 +1,39 @@
+plugins {
+ id 'java'
+}
+
+version = projectVersion
+group = 'org.apache.grails'
+
+ext {
+ pomTitle = 'Grails Wrapper Downloader'
+ pomDescription = 'Downloads necessary libraries for the Grails Wrapper'
+ pomDevelopers = [
+ 'graemerocher' : 'Graeme Rocher',
+ 'jeffscottbrown': 'Jeff Brown',
+ 'puneetbehl' : 'Puneet Behl'
+ ]
+ cliProject = true
+}
+
+// Intentionally no dependencies to prevent bloat
+
+apply {
+ from rootProject.layout.projectDirectory.file('gradle/java-config.gradle')
+ from
rootProject.layout.projectDirectory.file('gradle/publish-config.gradle')
+}
+
+tasks.named('jar', Jar).configure { Jar it ->
+ it.archiveFileName = "grails-wrapper.jar"
+ it.manifest {
+ attributes 'Main-Class': 'grails.init.Start'
+ }
+}
+
+tasks.named('javadocJar') { Task it ->
+ it.enabled = false
+}
+
+tasks.named('sourcesJar') { Task it ->
+ it.enabled = false
+}
\ No newline at end of file
diff --git
a/grails-wrapper/starter/src/main/java/grails/init/FindReleaseHandler.java
b/grails-wrapper-downloader/src/main/java/grails/init/FindReleaseHandler.java
similarity index 100%
rename from
grails-wrapper/starter/src/main/java/grails/init/FindReleaseHandler.java
rename to
grails-wrapper-downloader/src/main/java/grails/init/FindReleaseHandler.java
diff --git a/grails-wrapper/starter/src/main/java/grails/init/Start.java
b/grails-wrapper-downloader/src/main/java/grails/init/Start.java
similarity index 84%
rename from grails-wrapper/starter/src/main/java/grails/init/Start.java
rename to grails-wrapper-downloader/src/main/java/grails/init/Start.java
index 8c5de32c31..b5a0e2def5 100644
--- a/grails-wrapper/starter/src/main/java/grails/init/Start.java
+++ b/grails-wrapper-downloader/src/main/java/grails/init/Start.java
@@ -21,22 +21,22 @@ import static
java.nio.file.StandardCopyOption.REPLACE_EXISTING;
public class Start {
- private static final String PROJECT_NAME = "grails7-wrapper";
- private static final String WRAPPER_PATH = "/org/grails/" + PROJECT_NAME;
- private static final String DEFAULT_GRAILS_CORE_ARTIFACTORY_BASE_URL =
"https://repo.grails.org/grails/core";
+ private static final String PROJECT_NAME = "grails-wrapper";
+ private static final String WRAPPER_PATH = "/org/apache/grails/" +
PROJECT_NAME;
+ private static final String GRAILS_MAVEN_REPO_BASE_URL =
"https://repo1.maven.org/maven2/";
private static final File WRAPPER_DIR = new
File(System.getProperty("user.home") + "/.grails/wrapper");
private static final File NO_VERSION_JAR = new File(WRAPPER_DIR,
PROJECT_NAME + ".jar");
- private static String getGrailsCoreArtifactoryBaseUrl() {
- String baseUrl = System.getProperty("grails.core.artifactory.baseUrl");
+ private static String getMavenBaseUrl() {
+ String baseUrl = System.getProperty("grails.maven.repo.baseUrl");
if (baseUrl != null) {
return baseUrl;
}
- baseUrl = System.getenv("GRAILS_CORE_ARTIFACTORY_BASE_URL");
+ baseUrl = System.getenv("GRAILS_MAVEN_REPO_BASE_URL");
if (baseUrl != null) {
return baseUrl;
}
- return DEFAULT_GRAILS_CORE_ARTIFACTORY_BASE_URL;
+ return GRAILS_MAVEN_REPO_BASE_URL;
}
private static String getVersion() {
@@ -44,7 +44,7 @@ public class Start {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
FindReleaseHandler findReleaseHandler = new FindReleaseHandler();
- final String mavenMetadataFileUrl =
getGrailsCoreArtifactoryBaseUrl() + WRAPPER_PATH + "/maven-metadata.xml";
+ final String mavenMetadataFileUrl = getMavenBaseUrl() +
WRAPPER_PATH + "/maven-metadata.xml";
HttpURLConnection conn =
createHttpURLConnection(mavenMetadataFileUrl);
saxParser.parse(conn.getInputStream(), findReleaseHandler);
return findReleaseHandler.getVersion();
@@ -76,7 +76,7 @@ public class Start {
if (WRAPPER_DIR.exists() || WRAPPER_DIR.mkdirs()) {
try {
File downloadedJar = File.createTempFile(jarFileName,
jarFileExtension);
- final String wrapperUrl = getGrailsCoreArtifactoryBaseUrl() +
WRAPPER_PATH + "/" + version + "/" + jarFileName + jarFileExtension;
+ final String wrapperUrl = getMavenBaseUrl() + WRAPPER_PATH +
"/" + version + "/" + jarFileName + jarFileExtension;
HttpURLConnection conn = createHttpURLConnection(wrapperUrl);
success = downloadWrapperJar(downloadedJar,
conn.getInputStream());
} catch (Exception e) {
diff --git
a/grails-wrapper/starter/src/main/java/grails/proxy/SystemPropertiesAuthenticator.java
b/grails-wrapper-downloader/src/main/java/grails/proxy/SystemPropertiesAuthenticator.java
similarity index 100%
rename from
grails-wrapper/starter/src/main/java/grails/proxy/SystemPropertiesAuthenticator.java
rename to
grails-wrapper-downloader/src/main/java/grails/proxy/SystemPropertiesAuthenticator.java
diff --git a/grails-wrapper/README.md b/grails-wrapper/README.md
deleted file mode 100644
index 53e8677b8e..0000000000
--- a/grails-wrapper/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Grails Wrapper
-
-#### Build Status
-- [](https://github.com/apache/grails-wrapper/actions/workflows/gradle.yml)
-
-Update to the latest wrapper release based on Grails version
----
-
- ./grailsw update-wrapper
-
-Versions
----
-
-| Grails | Wrapper
|
-|---------------|---------------------------------------------------------------|
-| 5.0.0 - 5.3.3 |
[3.0.0.M1](https://github.com/apache/grails-wrapper/releases) |
-| 5.3.4 - 5.3.X | [3.1.x](https://github.com/apache/grails-wrapper/releases)
|
-| 6.x.x | [4.0.x](https://github.com/apache/grails-wrapper/releases)
|
-| 7.x.x | [7.0.x](https://github.com/apache/grails-wrapper/releases)
|
-
-Release Process
----
-
-- Release new version via GitHub Releases
-- After GitHub action is completed and only after the new release is visible
on
https://central.sonatype.com/artifact/org.apache.grails/grails7-wrapper/versions
-- Update the branch to trigger gradle.yml to publish the next snapshot which
will update the release version on
https://repository.apache.org/content/groups/snapshots/org/apache/grails/grails7-wrapper/maven-metadata.xml
-- The release version will be installed locally by grails-wrapper.jar, latest
is only used when release is not present
-
-```xml
- <latest>7.0.1-SNAPSHOT</latest>
- <release>7.0.0</release>
-```
\ No newline at end of file
diff --git a/grails-wrapper/build.gradle b/grails-wrapper/build.gradle
index 70b1f04166..1bdd5dfed0 100644
--- a/grails-wrapper/build.gradle
+++ b/grails-wrapper/build.gradle
@@ -1,48 +1,56 @@
-buildscript {
- repositories {
- mavenCentral()
- maven { url = 'https://repository.apache.org/content/groups/snapshots'
}
- maven { url = 'https://repo.grails.org/grails/core' }
- maven { url = 'https://plugins.gradle.org/m2' }
- }
- dependencies {
- classpath
platform("org.apache.grails:grails-gradle-bom:$grailsVersion")
- classpath "org.apache.grails:grails-gradle-plugins"
- classpath
"io.github.gradle-nexus:publish-plugin:$nexusPublishPluginVersion"
- }
+plugins {
+ id 'groovy'
}
-ext.isSnapshot = project.projectVersion.endsWith("-SNAPSHOT")
-ext.isReleaseVersion = !ext.isSnapshot
-ext."signing.keyId" = System.getenv("SIGNING_KEY") ?:
project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') :
null
-ext."signing.password" = System.getenv("SIGNING_PASSPHRASE") ?:
project.hasProperty("signing.password") ?
project.getProperty('signing.password') : null
-ext."signing.secretKeyRingFile" =
project.hasProperty("signing.secretKeyRingFile") ?
project.getProperty('signing.secretKeyRingFile') : null
+ext {
+ pomTitle = 'Grails Wrapper'
+ pomDescription = 'Facilitates downloading the grails shell command to
interact with a Grails project.'
+ pomDevelopers = [
+ 'graemerocher' : 'Graeme Rocher',
+ 'jeffscottbrown': 'Jeff Brown',
+ 'puneetbehl' : 'Puneet Behl'
+ ]
+ cliProject = true
+}
+
+version = projectVersion
+group = 'org.apache.grails'
+
+dependencies {
+ implementation platform(project(':grails-bom'))
+ implementation project(':grails-shell-cli')
+ implementation "org.springframework.boot:spring-boot-cli"
+ implementation "org.apache.groovy:groovy"
+ implementation "org.apache.groovy:groovy-ant"
+ implementation "org.apache.groovy:groovy-templates"
+ // TODO: This is using an ancient version of the plexus-sec-dispatcher
+ implementation
"org.sonatype.plexus:plexus-sec-dispatcher:$plexusSecDispatcherVersion"
+}
-if (isReleaseVersion) {
- apply plugin: "io.github.gradle-nexus.publish-plugin"
+apply {
+ from rootProject.layout.projectDirectory.file('gradle/java-config.gradle')
+ from
rootProject.layout.projectDirectory.file('gradle/publish-config.gradle')
}
-if (isReleaseVersion) {
- nexusPublishing {
- repositories {
- sonatype {
- def ossUser = System.getenv("SONATYPE_USERNAME") ?:
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
- def ossPass = System.getenv("SONATYPE_PASSWORD") ?:
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
- def ossStagingProfileId =
System.getenv("SONATYPE_STAGING_PROFILE_ID") ?:
project.hasProperty("sonatypeOssStagingProfileId") ?
project.sonatypeOssStagingProfileId : ''
- nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
- username = ossUser
- password = ossPass
- stagingProfileId = ossStagingProfileId
- }
+tasks.named('jar', Jar).configure { Jar it ->
+ it.from {
+ (configurations.runtimeClasspath).collect {
+ it.isDirectory() ? it : zipTree(it)
}
}
+ it.manifest {
+ attributes 'Main-Class': 'grails.init.RunCommand'
+ }
}
-allprojects {
- group = 'org.apache.grails'
- version = projectVersion
-
- apply plugin: "java"
+tasks.named('groovydoc') { Task it ->
+ it.enabled = false
+}
- compileJava.options.release = 17
+tasks.named('javadocJar') { Task it ->
+ it.enabled = false
}
+
+tasks.named('sourcesJar') { Task it ->
+ it.enabled = false
+}
\ No newline at end of file
diff --git a/grails-wrapper/gradle.properties b/grails-wrapper/gradle.properties
deleted file mode 100644
index a07ab54a09..0000000000
--- a/grails-wrapper/gradle.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-projectVersion=7.0.0-SNAPSHOT
-gradleNexusPluginVersion=2.3.1
-grailsVersion=7.0.0-SNAPSHOT
-nexusPublishPluginVersion=2.0.0
-plexusSecDispatcherVersion=1.4
\ No newline at end of file
diff --git a/grails-wrapper/publishing/grailsCentralPublishing.gradle
b/grails-wrapper/publishing/grailsCentralPublishing.gradle
deleted file mode 100644
index 272eefabed..0000000000
--- a/grails-wrapper/publishing/grailsCentralPublishing.gradle
+++ /dev/null
@@ -1,46 +0,0 @@
-publishing {
- publications {
- maven(MavenPublication) {
- pom.withXml {
- def xml = asNode()
- xml.children().last() + pomInfo
- try {
- xml.dependencyManagement.replaceNode {}
- } catch (Throwable e) {
- // ignore
- }
-
- // simply remove dependencies without a version
- // version-less dependencies are handled with
dependencyManagement
- // see
https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8
for more complete solutions
- xml.dependencies.dependency.findAll {
- it.version.text().isEmpty()
- }.each {
- try {
- it.replaceNode {}
- } catch (Throwable e) {
- // ignore
- }
- }
- }
- artifactId project.name
- from components.java
- artifact sourcesJar
- artifact javadocJar
- }
- }
-
- repositories {
- if (isSnapshot) {
- maven {
- credentials {
- username = System.getenv('MAVEN_PUBLISH_USERNAME')
- password = System.getenv('MAVEN_PUBLISH_PASSWORD')
- }
- url = System.getenv('MAVEN_PUBLISH_URL') ?:
'https://repository.apache.org/content/repositories/snapshots'
- }
- }
- }
-}
-
-task install(dependsOn: project.tasks.withType(PublishToMavenLocal))
diff --git a/grails-wrapper/settings.gradle b/grails-wrapper/settings.gradle
deleted file mode 100644
index 752ea6a480..0000000000
--- a/grails-wrapper/settings.gradle
+++ /dev/null
@@ -1,29 +0,0 @@
-plugins {
- id 'com.gradle.develocity' version '4.0'
- id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.2.1'
-}
-
-def isCI = System.getenv().containsKey('CI')
-def isLocal = !isCI
-
-develocity {
- server = 'https://ge.grails.org'
- buildScan {
- tag('grails')
- tag('grails-wrapper')
- publishing.onlyIf { it.authenticated }
- uploadInBackground = isLocal
- }
-}
-
-buildCache {
- local { enabled = isLocal }
- remote(develocity.buildCache) {
- push = isCI
- enabled = true
- }
-}
-
-include 'starter'
-include 'wrapper'
-project(':wrapper').name = 'grails7-wrapper'
diff --git a/grails-wrapper/shell/grailsw.bat b/grails-wrapper/shell/grailsw.bat
index c48c384063..14734e4450 100755
--- a/grails-wrapper/shell/grailsw.bat
+++ b/grails-wrapper/shell/grailsw.bat
@@ -1,89 +1,89 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Grails startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRAILS_OPTS
to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1"
"-XX:CICompilerCount=3"
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your
PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-set JAR_PATH=%APP_HOME%/grails-wrapper.jar
-
-@rem Execute Grails
-"%JAVA_EXE%" -jar %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRAILS_OPTS% %JAR_PATH%
%CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRAILS_EXIT_CONSOLE if you need the _script_ return code
instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRAILS_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Grails startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRAILS_OPTS
to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-XX:+TieredCompilation" "-XX:TieredStopAtLevel=1"
"-XX:CICompilerCount=3"
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your
PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+set JAR_PATH=%APP_HOME%/grails-wrapper.jar
+
+@rem Execute Grails
+"%JAVA_EXE%" -jar %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRAILS_OPTS% %JAR_PATH%
%CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRAILS_EXIT_CONSOLE if you need the _script_ return code
instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRAILS_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git
a/grails-wrapper/wrapper/src/main/groovy/grails/init/RunCommand.groovy
b/grails-wrapper/src/main/groovy/grails/init/RunCommand.groovy
similarity index 99%
rename from grails-wrapper/wrapper/src/main/groovy/grails/init/RunCommand.groovy
rename to grails-wrapper/src/main/groovy/grails/init/RunCommand.groovy
index 326669cd78..28e2868f8e 100644
--- a/grails-wrapper/wrapper/src/main/groovy/grails/init/RunCommand.groovy
+++ b/grails-wrapper/src/main/groovy/grails/init/RunCommand.groovy
@@ -1,6 +1,5 @@
package grails.init
-
import org.grails.cli.compiler.grape.DependencyResolutionContext
import org.grails.cli.compiler.grape.MavenResolverGrapeEngine
import org.grails.cli.compiler.grape.MavenResolverGrapeEngineFactory
diff --git a/grails-wrapper/starter/build.gradle
b/grails-wrapper/starter/build.gradle
deleted file mode 100644
index 289eb10c1e..0000000000
--- a/grails-wrapper/starter/build.gradle
+++ /dev/null
@@ -1,8 +0,0 @@
-apply plugin: 'java'
-
-jar {
- archiveFileName = "grails-wrapper.jar"
- manifest {
- attributes 'Main-Class': 'grails.init.Start'
- }
-}
diff --git a/grails-wrapper/wrapper/build.gradle
b/grails-wrapper/wrapper/build.gradle
deleted file mode 100644
index d80e536faa..0000000000
--- a/grails-wrapper/wrapper/build.gradle
+++ /dev/null
@@ -1,115 +0,0 @@
-ext.pomInfo = {
- delegate.name 'Grails 7 Wrapper'
- delegate.description 'The Grails Wrapper Project'
- delegate.url 'https://github.com/apache/grails-wrapper'
-
- delegate.licenses {
- delegate.license {
- delegate.name 'The Apache Software License, Version 2.0'
- delegate.url 'https://www.apache.org/licenses/LICENSE-2.0.txt'
- delegate.distribution 'repo'
- }
- }
-
- delegate.scm {
- delegate.url "scm:[email protected]:grails/grails-wrapper.git"
- delegate.connection "scm:[email protected]:grails/grails-wrapper.git"
- delegate.developerConnection
"scm:[email protected]:grails/grails-wrapper.git"
- }
-
- delegate.developers {
- delegate.developer {
- delegate.id 'graemerocher'
- delegate.name 'Graeme Rocher'
- }
- delegate.developer {
- delegate.id 'jeffscottbrown'
- delegate.name 'Jeff Brown'
- }
- delegate.developer {
- delegate.id 'puneetbehl'
- delegate.name 'Puneet Behl'
- }
- }
-}
-
-apply plugin: 'groovy'
-apply plugin: 'eclipse'
-apply plugin: 'idea'
-apply plugin: 'maven-publish'
-apply plugin: 'signing'
-apply plugin: "io.spring.dependency-management"
-
-ext {
- userOrg = 'grails'
- repo = 'grails-core'
-}
-
-configurations {
- groovyDoc.extendsFrom runtimeClasspath
-
- all {
- resolutionStrategy.dependencySubstitution {
- //update fields plugin used by scaffolding
-
substitute(module("org.codehaus.plexus:plexus-sec-dispatcher:2.0")).using(module("org.sonatype.plexus:plexus-sec-dispatcher:$plexusSecDispatcherVersion"))
- }
- }
-}
-
-repositories {
- mavenCentral()
- maven { url = 'https://repository.apache.org/content/groups/snapshots' }
- maven { url = 'https://repo.grails.org/grails/core' }
-}
-
-dependencies {
- implementation platform("org.apache.grails:grails-bom:$grailsVersion")
- implementation "org.apache.groovy:groovy"
- implementation "org.springframework.boot:spring-boot-cli"
- implementation "org.apache.groovy:groovy-ant"
- implementation "org.apache.grails:grails-shell-cli"
- implementation "org.apache.groovy:groovy-templates"
-}
-
-jar {
- from {
- (configurations.runtimeClasspath).collect {
- it.isDirectory() ? it : zipTree(it)
- }
- }
- manifest {
- attributes 'Main-Class': 'grails.init.RunCommand'
- }
-
- duplicatesStrategy = DuplicatesStrategy.INCLUDE
-}
-
-task sourcesJar(type: Jar) {
- archiveClassifier.set('sources')
- from project.sourceSets.main.allSource
-}
-
-task javadocJar(type: Jar) {
- archiveClassifier.set('javadoc')
- from groovydoc.outputs
-}
-
-tasks.withType(Groovydoc) {
- groovyClasspath = project.configurations.groovyDoc
- includes = ["grails-wrapper/**"]
-}
-
-afterEvaluate {
- signing {
- required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
- sign publishing.publications.maven
- }
-}
-
-tasks.withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository).configureEach
{
- shouldRunAfter(tasks.withType(Sign))
-}
-
-apply from:'../publishing/grailsCentralPublishing.gradle'
-
-
diff --git a/settings.gradle b/settings.gradle
index 27ce8d811b..7cbee56b97 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -153,7 +153,11 @@ include (
'grails-testing-support-datamapping',
// Test Report
- 'grails-data-test-report'
+ 'grails-data-test-report',
+
+ // wrapper
+ 'grails-wrapper-downloader',
+ 'grails-wrapper'
)
// Instead of using : to separate nested projects, fix the project directories
by setting the projectDir explicitly