wttech/gradle-aem-plugin

Infer Java support version by AEM quickstart jar provided

pun-ky opened this issue · 0 comments

to avoid following

Execution failed for task ':env:instanceUp'.
> Some instances (2) require different Java version than current 11:
  Instance 'local-author' using URL 'http://localhost:4564' is AEM 6.4.0 (on-prem) and requires Java 1.7|1.8!
  Instance 'local-publish' using URL 'http://localhost:4565' is AEM 6.4.0 (on-prem) and requires Java 1.7|1.8!
Mam jave 1.8
java -version:
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)
Build time:   2021-01-22 13:20:08 UTC
Revision:     31f14a87d93945024ab7a78de84102a3400fa5b2
Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_301 (Oracle Corporation 25.301-b09)
OS:           Windows 10 10.0 amd64

instead, let GAP in local instance plugin override the default '11' convention and instead implement a function which will assign correct Java version according to quickstart jar

https://github.com/wttech/gradle-common-plugin/blob/master/src/main/kotlin/com/cognifide/gradle/common/java/JavaSupport.kt#L21