Closed poi33 closed 3 years ago
How do you intend to build without a sandbox?
You don't need a running XP instance locally to build an app. For example you might want to build a local app to deploy it to a remote XP instance.
Well, currently you actually need a sandbox to build an app because we pass JAVA_HOME
and XP_HOME
pointing to that sandbox to every gradle command.
We may drop XP_HOME
for some commands, but I don't think it's a good idea to do the same with JAVA_HOME
.
Correct me if I'm wrong, but we don't know what java version has user installed locally and there's no guarantee app built with his java version will run in sandbox with our java version later.
This task is specifically for the build
command, not any other command. As far as I understand, we only need JAVA_HOME
for the build, but it doesn't/shouldn't depend on a running sandbox. For example, I can execute enonic project env
for any project with a stopped sandbox and get its JAVA_HOME
.
So the question is - is a running sandbox required for the build
command? If not, then we should drop this check for this command.
JAVA_HOME
points to a java bundled with distro, that is specified in a sandbox, therefore we don't know it without a sandbox.
So cli asks to set up a sandbox when building an app to know what java version to use.
Question here is not whether sandbox is running now or not, but rather if it is set up for project.
Running a build (not deploy) should not prompt a "sandbox is required". Our libs should not need to be attached to a sandbox to be able build.