Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove version from grails-wrapper.properties

  • Loading branch information...
commit ce96104e50c76a9a65842265972362f0e6ba5d4b 1 parent 54e2f72
@jeffbrown jeffbrown authored
View
4 grails-wrapper/build.gradle
@@ -11,10 +11,10 @@ task copyScript(type: Copy) {
rename 'startGrails.bat', 'grailsw.bat'
}
filter(ReplaceTokens, tokens: ['starter.main.class': 'org.grails.wrapper.GrailsWrapper'])
- filter(ReplaceTokens, tokens: ['starter.classpath': '@wrapperDir@/grails-wrapper-runtime-@grailsVersion@.jar:@wrapperDir@'])
+ filter(ReplaceTokens, tokens: ['starter.classpath': '@wrapperDir@/grails-wrapper-runtime-@grailsVersion@.jar:@wrapperDir@:.'])
filter(ReplaceTokens, tokens: ['agent.string': '-javaagent:@wrapperDir@/springloaded-core-@springLoadedVersion@.jar -noverify -Dspringloaded=$SPRINGLOADED_PARAMS'])
filter(ReplaceTokens, tokens: ['startup.command': 'startGrails $STARTER_MAIN_CLASS "$@"'])
- filter(ReplaceTokens, tokens: ['windows.starter.classpath': '@wrapperDir@/grails-wrapper-runtime-@grailsVersion@.jar;@wrapperDir@'])
+ filter(ReplaceTokens, tokens: ['windows.starter.classpath': '@wrapperDir@/grails-wrapper-runtime-@grailsVersion@.jar;@wrapperDir@;.'])
filter(ReplaceTokens, tokens: ['windows.agent.string': "-javaagent:@wrapperDir@/springloaded-core-@springLoadedVersion@.jar -noverify -Dspringloaded=%SPRINGLOADED_PARAMS%".toString()])
fileMode = 0755
}
View
7 grails-wrapper/src/main/java/org/grails/wrapper/GrailsWrapper.java
@@ -22,12 +22,13 @@
public class GrailsWrapper {
public static void main(final String[] args) throws Exception{
- ResourceBundle bundle = ResourceBundle.getBundle("grails-wrapper");
- final String grailsVersion = bundle.getString("wrapper.version");
+ final ResourceBundle applicationBundle = ResourceBundle.getBundle("application");
+ final ResourceBundle wrapperBundle = ResourceBundle.getBundle("grails-wrapper");
+ final String grailsVersion = applicationBundle.getString("app.grails.version");
final File grailsCacheDir = new File(System.getProperty("user.home") + "/.grails/");
final File grailsVersionDir = new File(grailsCacheDir, grailsVersion);
final File wrapperDir = new File(grailsVersionDir, "wrapper");
- String distUrl = bundle.getString("wrapper.dist.url");
+ String distUrl = wrapperBundle.getString("wrapper.dist.url");
if(distUrl == null) {
distUrl = "http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/";
}
View
1  grails-wrapper/src/main/resources/grails-wrapper.properties
@@ -1,2 +1 @@
-wrapper.version=@wrapperVersion@
wrapper.dist.url=@distributationUrl@
View
11 scripts/Wrapper.groovy
@@ -1,20 +1,17 @@
includeTargets << grailsScript("_GrailsInit")
USAGE = """
- wrapper [--wrapperVersion=version] [--wrapperDir=dir] [--distributionUrl=url]
+ wrapper [--wrapperDir=dir] [--distributionUrl=url]
where
- --wrapperVersion = The version of Grails that the wrapper should use
--wrapperDir = Directory where wrapper support files are installed relative to project root
--distributationUrl = URL to the directory where the release may be downloaded from if necessary
examples
- grails wrapper --wrapperVersion=2.0.3
- grails wrapper --wrapperDir=grailsWrapper --wrapperVersion=2.0.3
- grails wrapper --wrapperVersion=2.0.0.RC1 --distributionUrl=http://dist.springframework.org.s3.amazonaws.com/milestone/GRAILS/
+ grails wrapper --wrapperDir=grailsWrapper
+ grails wrapper --wrapperDir=grailsWrapper --distributionUrl=http://dist.springframework.org.s3.amazonaws.com/milestone/GRAILS/
optional argument default values
- wrapperVersion = the version of Grails that the wrapper is being generated with ($grailsVersion)
wrapperDir = 'wrapper'
distributionUrl = 'http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/'
@@ -24,7 +21,6 @@ target ('default': "Installs the Grails wrapper") {
depends(checkVersion, parseArguments)
event 'InstallWrapperStart', [ 'Installing Wrapper...' ]
- grailsWrapperVersion = argsMap.wrapperVersion ?: grailsVersion
grailsDistUrl = argsMap.distributionUrl ?: 'http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/'
grailsWrapperDir = argsMap.wrapperDir ?: 'wrapper'
@@ -53,7 +49,6 @@ target ('default': "Installs the Grails wrapper") {
include(name: 'grailsw*')
}
}
- ant.replace(dir: targetDir, includes: '*.properties', token: '@wrapperVersion@', value: grailsWrapperVersion)
ant.replace(dir: targetDir, includes: '*.properties', token: '@distributationUrl@', value: grailsDistUrl)
ant.replace(dir: basedir, includes: 'grailsw*', token: '@wrapperDir@', value: grailsWrapperDir)
ant.chmod(file: 'grailsw', perm: 'u+x')
Please sign in to comment.
Something went wrong with that request. Please try again.