Java 在liferay社交插件上创建模型侦听器
我已经按照建议为Social Office Calendar创建了自定义模型侦听器,但尝试构建时失败,原因是项目中不存在目标“编译java”Java 在liferay社交插件上创建模型侦听器,java,eclipse-plugin,liferay,liferay-6,liferay-ide,Java,Eclipse Plugin,Liferay,Liferay 6,Liferay Ide,我已经按照建议为Social Office Calendar创建了自定义模型侦听器,但尝试构建时失败,原因是项目中不存在目标“编译java” BUILD FAILED C:\devel\fishnet\liferay-fishnet-project-6-2\liferay-plugins-sdk-6.2\build-common-plugin-ext.xml:66: The following error occurred while executing this line: C:\devel\
BUILD FAILED
C:\devel\fishnet\liferay-fishnet-project-6-2\liferay-plugins-sdk-6.2\build-common-plugin-ext.xml:66: The following error occurred while executing this line:
C:\devel\fishnet\liferay-fishnet-project-6-2\liferay-plugins-sdk-6.2\build-common-plugin-ext.xml:347: The following error occurred while executing this line:
Target "compile-java" does not exist in the project "calendar-new-portlet".
这是否与build-common-plugin-ext.xml有关,或者我应该按照另一个过程在社交办公室日历中实现自定义模型侦听器
注意:我已经用相同的构建文件(build-common-plugin-ext.xml)成功地扩展了其他社交办公室插件(chatportlet、contacts等),但在这些情况下,我没有像现在这样添加自定义Java类和模型侦听器 模型侦听器在
ext
插件中不可用,因为ext
s被设计为直接覆盖门户类
要仅添加一个模型侦听器,我建议通过执行以下操作使用hook
插件:
/hooks/
/create.sh my test“my test”
)/my test hook/docroot/WEB-INF/liferay hook.xml
中编写:
<hook>
<portal-properties>portal.properties</portal-properties>
</hook>
portal.properties
/mytesthook/docroot/WEB-INF/src/portal.properties
value.object.listener.com.liferay.portal.model.User=com.test.MyListener
考虑将你正在处理的平台添加到标签列表中。liferay标记可能不会生成那么多视图。我尝试的是为插件portlet(如social office calendar)的模型实体添加一个侦听器。因此,我必须在service.properties中添加value.object.listener.com.liferay.calendar.model.calendar=com.liferay.calendar.model.listeners.CalendarListener,而不是在portal.properties中。