I want to know the versions of the software used while developing the project, Suppose If there is an existing project In grails ,so I want to know the version of grails as well as version of Groovy for that project
Metadata regarding a project in Grails is kept in application.properties
.
Within this file you will find the version of Grails used for the project under the key app.grails.version
.
The version of Groovy used however is not kept in this file and is determined by the version of Grails being used. To determine the version of Groovy used by a specific version of Grails visit the introduction section of the Grails documentation.
edit
As pointed out in another answer, if you have target version of Grails already downloaded you can search for the version of Groovy being used by that version of Grails.
*nix
$ cd grails-X.X.X
$ find . -name "groovy*jar"
win32
> cd grails-x.x.x
> dir /s "groovy*.jar"
If you already have a project and want to learn which grails version it uses. You can find it in gradle.properties file. The content of the file is like the following
grailsVersion=4.0.1
gorm.version=7.0.2.RELEASE
From controllers/services:
def appVersion=Metadata.current.'app.grails.version'
def appName=Metadata.current.'app.name'
From gsp:
App Version <g:meta name="app.version"/>
Built with Grails <g:meta name="app.grails.version"/>
Added extra information to figure out a grails application version from raw text files :
If you have a grails 3 application, you should find a build.gradle in the main root of your application folder:
version "0.1" According to this grails 3 project the version of this application is 0.1
Grails version is 3.1.1 according to gradle.properties
On a grails 2 project you will find application.properties in the main project root:
According to this grails 2 project
No such property: Metadata for class
for appVersion
–
Karrikarrie As of Grails 3, this is:
Version <g:meta name="info.app.version"/>
Notice the info. http://docs.grails.org/3.0.17/ref/Tags/meta.html
use application.properties
in the root of the grails application
To find out which version of groovy is used with particular version of grails I always use simple find:
$ cd grails-X.X.X
$ find . -name "groovy*jar"
Maybe I'm just too lazy to dig into websites... ;-)
You can see application name,grails version,application version from application.properties file of grails project
I face the same issue, I found simplest way to find version by simple command. run
grails clean
then it prints
Welcome to Grails 1.3.7 - http://grails.org/
© 2022 - 2024 — McMap. All rights reserved.
GroovySystem.getVersion()
or justGroovySystem.version
– Palaeozoology