使用JBoss在Mac上进行Liferay主题开发

时间:2013-08-14 14:30:35

标签: macos ant liferay jboss7.x

我在Mac上使用JBoss创建了liferay主题。在创建主题的过程中,当我在终端上执行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的环境变量。

1 个答案:

答案 0 :(得分:1)

当ant构建你的主题并需要ecj.jar(java的eclipse编译器)时,它通常从某个互联网存储库下载并将其放在$ANT_HOME/lib中。您的$ANT_HOME似乎是usr/share/ant,并且您没有该目录的写入权限。手动下载并将其放在那里或打开一个版本的目录写权限(然后再将其关闭)。

你只需要这样做一次:当ecj.jar在ant的类路径上时,它将只用于永恒。