enonic / cli-enonic

GNU General Public License v3.0
41 stars 1 forks source link

Problem running 'enonic project build' #149

Open pladdenico opened 5 years ago

pladdenico commented 5 years ago

Windows 10 home 1803

The issue is related to JAVA_HOME not being overridden by the enonic cli:

C:\dev\enonic\myproject>enonic project build

Building in sandbox 'Sandbox1'...

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_144

Please set the JAVA_HOME variable in your environment to match the location of your Java installation.

If I unset JAVA_HOME (set JAVA_HOME=) I get the following error;

C:\dev\enonic\myproject>enonic project build

Building in sandbox 'Sandbox1'...

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the location of your Java installation.

If I then run enonic project shell, then it works, and JAVA_HOME is set correctly. XP does start fine when running 'enonic project deploy', but the build has failed (with the errors above). The result is not having an app in the deploy folder.

sigdestad commented 5 years ago

I have seen this issue first hand and can confirm. We need to investigate why XP starts fine, but gradlew does not work as intended...