gradle-aem-plugin
gradle-aem-plugin copied to clipboard
Avoid saving user-specific data in instance scripts
Task instanceUp
is saving e.g JAVA_EXECUTABLE absolute path in control/\*.\[bat|sh]
scripts and it makes instances not usable directly when extracted externally (outside of GAP usage).
Consider passing user-specific data to instance scripts using arguments or env vars instead of writing them down to files that could be later a part of instance backups.
Thx @szymon-owczarzak for reporting it!
Or a system variable for the username could be used in JAVA_EXECUTABLE
:
C:\Users\%Username%\.gradle\jdks\jdk8u275-b01\bin\java.exe
How about backup made on Unix but reused on windows? 😁 Nope
for *.sh
we could use $HOME/.gradle/jdks...
and for *.bat
%userprofile%/.gradle/jdks..
Distro of Java determined by Gradle could be different for each OS.