BUILD FAILED hybris ant clean all

BUILD FAILED hybris ant clean all

我在本地的 ant clean all 上遇到构建失败错误。 JAVA_HOME 是 C:\Progra~1\Java\jdk1.8.0_151 并且 hybris 版本是 commerce-6.3.0.8

BUILD FAILED
C:\hybris\commerce-6.3.0.8\hybris\bin\platform\build.xml:20: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\platform\resources\ant\compiling.xml:90: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\platform\resources\ant\compiling.xml:148: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\platform\resources\ant\util.xml:20: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\platform\resources\ant\compiling.xml:155: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\platform\resources\ant\compiling.xml:297: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\platform\resources\ant\util.xml:144: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\ext-content\personalizationsmartedit\buildcallbacks.xml:65: The following error occurred while executing this line:
C:\hybris\commerce-6.3.0.8\hybris\bin\ext-content\npmancillary\buildcallbacks.xml:276: exec returned: 3

   <!-- \platform\build.xml:20: The following error occurred while executing this line:-->
    <target name="build" depends="updateMavenDependencies" description="Builds all extensions">
        <callback extname="" target="before_build"/>
        <build/>
        <callback extname="" target="after_build"/>
    </target>

    <!-- ant\compiling.xml:90: The following error occurred while executing this line:-->
     <extensions_build/>

     <!--ant\compiling.xml:148: The following error occurred while executing this line:-->
    <else>
        <external_extension_build extname="@{extname}"/>
    </else>

<!-- \ant\util.xml:20: The following error occurred while executing this line:-->
<for list="${extension.names}" param="@{param}" delimiter=";">

<!--\ant\compiling.xml:155: The following error occurred while executing this line:-->
      <then>
          <extension_build extname="@{extname}" />
      </then>

<!-- \bin\ext-content\npmancillary\buildcallbacks.xml:276: exec returned: 3 -->
    <exec dir="@{path}" executable="${loc.NPM_BINARIES_HOME}${file.separator}.bin${file.separator}grunt.cmd" failonerror="${failonerrorValue}">
 <env key="Path" value="${env.Path}${path.separator}${loc.EXTRA_PATH}"/>
 <env key="NPM_HOME" value="${loc.NPM_HOME}"/>
 <env key="NPM_BINARIES_HOME" value="${loc.NPM_BINARIES_HOME}"/>
 <env key="NODE_HOME" value="${loc.NODE_HOME}"/> 
 <arg value="@{phase}"/>
 </exec>

<!-- bin\ext-content\personalizationsmartedit\buildcallbacks.xml:65: The following error occurred while executing this line:
<then>
 <linkToSELibraries path="${ext.personalizationsmartedit.path}"/>
 <gruntBuild path="${ext.personalizationsmartedit.path}" phase="packageSkipTests"/>
</then>

检查您的文件权限/所有者很重要。如果您以 root 身份安装应用程序(不推荐),则问题可能与权限集有关。尝试递归地将文件/文件夹的所有者设置为应用程序所有者(假设您设置了一个)。在我的例子中,我使用 "hybris" 作为用户/所有者。

chown -R hybris:users /opt/hybris

我在 java11 上使用时遇到过这个问题。我通过将 OS 的语言更改为英语解决了这个问题。

希望有用