我正在Mac上使用JBoss创建救生主题。在创建主题的过程中,当我在终端上执行ant deploy
时,我会收到以下错误:
Buildfile:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/themes/g2y-b2b-theme/build.xml
[copy] Copying 1 file to /usr/share/ant/lib
BUILD FAILED
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/themes/g2y-b2b-theme/build.xml:5:
The following error occurred while executing this line:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/themes/build-common-theme.xml:7:
The following error occurred while executing this line:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/build-common-plugin.xml:5:
The following error occurred while executing this line:
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/build-common.xml:68:
Failed to copy
/Users/saif/Desktop/Liferay/liferay-plugins-sdk-6.1.1/lib/ecj.jar to
/usr/share/ant/lib/ecj.jar due to java.io.FileNotFoundException
/usr/share/ant/lib/ecj.jar (Permission denied)
Total time: 0 seconds
请帮我摆脱这个问题,继续前进。为了在Mac上做到这一点,我应该采取哪些步骤?还请告诉我如何在Mac上设置ANT的环境变量。
当ant构建主题并需要ecj.jar
(用于java的eclipse编译器)时,它通常会从某个互联网存储库下载并将其放置在$ANT_HOME/lib
中。您的$ANT_HOME
似乎是usr/share/ant
,并且您没有对该目录的写访问权限。手动下载并放置在那里,或者打开一个构建的目录写入权限(然后再次关闭)。
您只需要做一次:当ecj.jar
在ant的类路径上时,它将永远被使用。