File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
grails-shell/src/main/groovy/org/grails/cli Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class GrailsDependencyVersions implements DependencyManagement {
3636 protected Map<String , Dependency > groupAndArtifactToDependency = [:]
3737 protected Map<String , String > artifactToGroupAndArtifact = [:]
3838 protected List<Dependency > dependencies = []
39+ protected Map<String , String > versionProperties = [:]
3940
4041 GrailsDependencyVersions () {
4142 this (getDefaultEngine())
@@ -69,6 +70,7 @@ class GrailsDependencyVersions implements DependencyManagement {
6970 pom. dependencyManagement. dependencies. dependency. each { dep ->
7071 addDependency(dep. groupId. text(), dep. artifactId. text(), dep. version. text())
7172 }
73+ versionProperties = pom. properties. ' *' . collectEntries { [(it. name()): it. text()] }
7274 }
7375
7476 protected void addDependency (String group , String artifactId , String version ) {
@@ -89,6 +91,10 @@ class GrailsDependencyVersions implements DependencyManagement {
8991 return dependencies
9092 }
9193
94+ Map<String , String > getVersionProperties () {
95+ return versionProperties
96+ }
97+
9298 @Override
9399 String getSpringBootVersion () {
94100 return find(" spring-boot" ). getVersion();
Original file line number Diff line number Diff line change @@ -229,9 +229,9 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
229229
230230 if (profileRepository instanceof MavenProfileRepository ) {
231231 MavenProfileRepository mpr = (MavenProfileRepository )profileRepository
232- org.springframework.boot.cli.compiler.dependencies.Dependency gormDep = mpr. profileDependencyVersions. find( " org.grails " , " grails- datastore-core " )
232+ String gormDep = mpr. profileDependencyVersions. versionProperties . get( ' datastore.version ' )
233233 if (gormDep != null ) {
234- variables[' gorm.version' ] = gormDep. version
234+ variables[' gorm.version' ] = gormDep
235235 }
236236 }
237237
You can’t perform that action at this time.
0 commit comments