Development in the ext environment

【uni-app报错】选择地址:fail the api need to be declared in the requiredPrivateInfos field in app/ext.json uni-app添加地址时报错,chooseAddress:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json 阅读详情

Development in the ext environment

From LiferayPedia

Jump to: navigation, search

This guide explains how to do usual development tasks in the extension environment. It should be considered an extension to the Development in the Extension Environment Guide found in Liferay's Official Documentation] (section on Development). Be sure to check the documents that correspond to your version of Liferay.

Development is done in the /ext directory. When new versions of Liferay come out, the /portal directory can be replaced with the new version, and the /ext directory "updated" by re-running the build-ext target found in /portal/build.xml.

Any new jar files required by your extensions should be placed in /ext/ext-lib

WARNING: This article describes the versions from 4.0 to 4.2 of the extension environment. Version 4.3 has some changes that are documented in the Official Documentation]

Note: The default Language.properties file is located at /portal/portal-impl/classes/content/Language.properties. The Language-ext.properties file referred to in the docs is located at /ext/ext-impl/classes/content/Language-ext.properties


Contents

[hide]
[ edit]

Normal development process

Typically, customization/development need only occur inside the "extension environment." The normal development cycle from within the extension environment is:

  1. Ensure "extension environment" is set up (see the topic Setting up the Extension Environment)
  2. Customize portal properties by editing file /ext/ext-impl/classes/portal-ext.properties
  3. Customize settings in web.xml by adding entries to /ext/ext-web/docroot/WEB-INF/web.xml. (just put the fragments you want. The changes will be merged in to final web.xml by deployment process.
  4. Turn portlets you want to deploy on/off by editing /ext/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml
  5. Customize language/display information by editing /ext/ext-impl/classes/content/Language-ext.properties or /ext/ext-impl/classes/content/Language-ext_en.properties(see Language/display customization)
  6. New classes to be made part of the core portal system should be created in /ext/ext-impl/src.
  7. To create an entirely new portlet, follow the directions here: http://content.liferay.com/4.0.0/docs/quickstart/ch04s02.html
  8. Run the "deploy" target from /ext/build.xml. This will merge all of the changes from above, build the system, and deploy to the configured application server (configured in /ext/app.server.<developerName>.properties file).

If developing a single portal instance, and customization is desireable, create, update, and/or modify files by placing them in the /ext/ext-web/docroot directory. When ready to deploy, call the "deploy" target in /ext/ext-web/build.xml. This will unjar the "default" web configuration from /ext/ext-ear/modules/portal-war, to a temporary directory, overwrite the temp dir with those file in /ext/ext-web/docroot, then deploy to the app server.

[ edit]

Customizing the Liferay Core

If customizing the core portal system (i.e. modifying the base Liferay source for consumption by the Liferay community), the development cycle is the following:

  1. Make your changes in the appropriate /portal/ source file (most interesting core stuff is in /portal/portal-impl/src)
    1. If adding a column to an entity, do NOT modify the XXXModel.java file, but add it to appropriate service.xml (see Services, entities, and ServiceBuilder)
    2. If adding a new method to one of the services, modify XXXServiceImpl.java or XXXLocalServiceImpl.java. Don't modify any of the other service interfaces (see Services, entities, and ServiceBuilder)
    3. If any mods are made in 1 and/or 2 above, run the "build-service-portal" and/or "build-service-portlets" target in /portal/portal-impl/build.xml to regenerate the code. See the "Services, entities, and ServiceBuilder" section below for details.
  2. Run the "start" target in /portal/build.xml (to rebuild the portal)
  3. Run the "build-ext" target in /portal/build.xml (to rebuild the extension environment, re-deploying the new changes from step 2 above).

This will rebuild the extension environment, but preserve all of your customized "*-ext.*" files. You can then deploy THOSE changes by re-running the "deploy" target in /ext/build.xml

Notes: In theory, multiple web sites can be developed concurrently by creating various site directories in /ext/web-sites/<domainName>-web. The "liferay.com-web" directory. All sites placed in this dir will have the various files from above merged in. liferay.com-web seems to be the target of this process. As of 4.1.x, however, it does not appear that the deployment process (i.e. the "deploy" target) recognizes any directories other than liferay.com-web.

Interesting tidbit: The liferay.com-web directory seems to be created in the /portal/ tree initially by info in the /portal/web-sites/web-sites.xml. web-sites.xml is used by com.liferay.portal.tools.WebSiteBuilder to build various sites under the /ext/web-sites dir.

[ edit]

Overriding JSP's from Liferay Core

JSP's from core can be easily customized/overridden by making a parallel change in the EXT environment. For example, if you want to modify the view.jsp of the login portlet, here are the steps:

  1. Locate the JSP code in the portal core (portal/portal-web/docroot/html/portlet/login/view.jsp)
  2. Copy the file to the corresponding location in the EXT environment (creating folders as necessary)
    1. Create the folder path: ext/ext-web/docroot/html/portlet/login/
    2. Copy the JSP from portal to ext: view.jsp
  3. Make desired changes to JSP in EXT environment
  4. Deploy changes
    1. Since we only made changes to JSP's, we can use the "deploy-fast" ant target in the build script of ext/ext-web/build.xml which will only deploy modified jsp's (very fast!).
[ edit]

Configuring Log4J logging

  1. Copy /portal/portal-impl/classes/META-INF/portal-log4j.xml to /ext/ext-impl/classes/META-INF/portal-log4j-ext.xml (i.e. copy from the /portal/portal-impl dir to the /ext/ext-impl, then rename to portal-log4j-ext.xml)
  2. Copy /portal/portal-impl/classes/META-INF/log4j.dtd to the same /ext/ext-impl/classes/META-INF dir as above
  3. Modify your new portal-log4j-ext.xml with whatever log4j parameters you want
  4. Deploy your extension environment
  5. Note that if you are deploying the portal under the Apache Geronimo application server, and you want to output DEBUG and TRACE messages, then may need to adjust the log4j Threshold default from INFO to DEBUG or TRACE. The Geronimo Console interface provides a feature whereby you can set the logging threshold at runtime via the browser. This is achieved by the following line in the var/log/server-log4j.properties file: log4j.appender.CONSOLE.Threshold=${org.apache.geronimo.log.ConsoleLogLevel}
[ edit]

Development shortcuts

Since development frequently involves frequent interations over the code/deploy/test/debug cycle, rebuilding the entire system, rolling it up to the extension environment, and re-deploying can quickly slow down productivity. Here are some development shortcuts you can use if your changes are isolated to a particular area of the code:

To modify anything located in /portal/portal-impl/

  1. Insure there is a customized /portal/app.server.<developerName>.properties file (may have to copy from the /ext/ directory
  2. modify the source code
  3. Execute the "deploy" target in /portal/portal-impl/build.xml
  4. repeat from step #2

To modify anything located in /portal/portal-web/

  1. Insure there is a customized /portal/app.server.<developerName>.properties file (may have to copy from the /ext/ directory
  2. modify the source code
  3. Execute the "war" target in /portal/portal-web/build.xml
  4. Execute the "build-ext" target in /portal/build.xml
  5. repeat from step #2

To modify any jsp's

  1. modify source code in {$App Server}/webapps/ROOT/html/
  2. refresh page
  3. repeat from step #1
  4. save code in ext-web/docroot/html before deploying from /ext/ext-web

another alternative is to use the 'deploy-fast' ant task in /portal/portal-web/build.xml. This will deploy any modified jsps only to your app server.  

原出处:http://wiki.liferay.com/index.php/Development_in_the_ext_environment

EXT开发基础:精通“ext-base.js“及EXT框架 EXT框架是专注于构建Web应用程序的JavaScript库,为开发者提供了丰富的界面组件和灵活的布局选项。其特点主要体现在以下几个方面:在EXT框架中,类的定义和实现是整个框架的基石。EXT通过Ext.Base类来定义各种类和继承机制。类的定义是通过Ext.define方法实现的。开发者可以通过这个方法定义新的类,并在类中声明各种属性、方法和配置。extend: 'Ext.some.Class', // 继承已存在的类。 阅读详情

相关推荐

ASReview:基于主动学习的AI文献筛选工具,提升科研效率

主动学习是机器学习的一个重要分支,其核心原理是让算法能够主动选择最有价值的数据进行标注,从而以更低的成本获得更好的模型性能。这一技术通过人机协作的闭环流程,显著提升了数据标注和模型训练的效率和精度。在工程实践中,主动学习尤其适用于数据标注成本高昂或数据类别不平衡的场景,例如医学影像分析、自然语言处理中的文本分类以及推荐系统的冷启动问题。通过优先标注模型最不确定的样本,它能够有效解决传统机器学习面临的冷启动和数据稀疏性挑战。本文聚焦的ASReview项目,正是将主动学习原理应用于系统文献综述这一具体场景,通过

weixin_28725959的博客 431

【webpack】快速笔记13 -- development和production模式的区分打包

回顾 上一篇我们进行配置Tree Shaking时是不是分两种环境进行配置分析,每次我们都需要改 webpack.config.js 里面的代码,现在能不能将这两个环境的代码都有自己的script启动命令,这样我们就可以通过对应输入命令行代码启动对应的环境的webpack了 分离开发和生产配置 分离: 根据上面说的问题,那我们可以新建两个webpack配置,一个为webpack.dev.js,另一...

Umbrella_Um的博客 437

机器学习系列(3)_逻辑回归应用之Kaggle泰坦尼克之灾

f作者: 寒小阳 &&龙心尘 时间:2015年10月。 出处: 声明:版权所有,转载请注明出处,谢谢。手把手机器学习之逻辑回归应用——Kaggle泰坦尼克之灾1.引言先说一句,年末双十一什么的一来,真是非(mang)常(cheng)欢(gou)乐(le)!然后push自己抽出时间来写这篇blog的原因也非常简单: 写完前两篇逻辑回归的介绍和各个角度理解之后,小伙伴们纷纷表示『好像很高级的样纸,

寒小阳 43万+

Ext4.2.1学习历程之一:环境搭建及Hello ExtJS4.2

1、从官网下载ExtJS4.2资源包,解压开有源代码、API文档、演示程序; 2、官网地址:http://www.sencha.com/products/extjs 3、在Eclipse中新建项目,我这是建的maven项目 4、将下载的extjs需要的资源文件复制到项目中,我放的是在webapp下的resources/js/ext4.2中,那么的资源文件不需要全导入,只需要导入我们用的如

谭成 1690

高速串行信号仿真避坑指南:为什么你的SIwave Xnet设置了却不出结果?

本文深入解析SIwave中Xnet功能在高速串行信号仿真中的常见问题,包括模型缺失、网络不完整和端口设置错误等关键误区。通过详细的电路元件模型验证、网络完整性检查及端口配置指南,帮助工程师有效解决仿真不出结果的问题,提升信号完整性分析效率。

weixin_29218963的博客 251

通过EMIF接口实现FPGA与DSP的高速连接(方法)

请注意,具体的连接细节和步骤可能会根据所使用的FPGA和DSP型号以及特定的应用需求而有所不同。开发DSP和FPGA上的软件,以实现数据交换和处理。根据系统的具体需求,对FPGA和DSP的接口逻辑进行优化,以减少延迟、提高数据吞吐量或降低资源消耗。它通常支持多种类型的存储器,如SRAM、DRAM、ROM等,以及通过特定的接口与FPGA连接。对于FPGA,需要编程来实现与DSP的接口逻辑,包括地址译码、数据传输、时序控制等。在连接完成后,进行详细的调试和测试,以确保数据能够在DSP和FPGA之间正确传输。

AigcFox的博客 4587

VsCode extension development (一)

参考官网文档: https://code.visualstudio.com/api 环境准备 开始之前需要安装Node.js, npm和vscode 要生产ext还需要安装: yeomen是一个客户端的脚手架工具,用来搭建新项目 npm install -g yo vscode-generator-code是一个yeomen生成器 npm install -g generator-code 以上两个工具也可使用以下命令一次性安装 npm install -g yo generator-code

weixin_43724371的博客 964

数字后端实现Innovus教程之手把手教你N种高亮timing path和clock tree方法

数字IC后端设计实现Innovus教程之手把手教你N种高亮timing path和clock tree方法

weixin_37584728的博客 3595

Linux入门之ext\ext2\ext3\ext4的介绍与区别

Linux之ext\ext2\ext3\ext4的介绍与区别 文件系统名称 介绍 特点 优势 ext 第一代扩展文件系统,一种文件系统,于1992年4月发表,是为linux核心所做的第一个文件系统。采用Unix文件系统(UFS)的元数据结构,以克服MINIX文件系统性能不佳的问题。 它是在linux上,第一个利用虚拟文件系统实现出的文件系统 克服MIN...

i-kernel 2万+

APB Timer验证环境搭建——学习笔记(1)

以下为个人学习笔记,如有疏漏,请大家指正补充~~APB Timer是一个简单的下行计数器,包括一个32位计数器和一组比较器,可以实现多种计时功能。包括生成一次性中断或者定时中断。

qq_41651535的博客 1578

【Jenkins】Jenkins :首次登录直接使用 admin 账户

目录 一、使用admin账户 二、修改admin用户密码 三、管理视图 一、使用admin账户 安装时,自定义安装,选择必要的插件安装,设置Jenkins的URL为: http://本机或服务器IP:8080 然后在创建第一个管理者界面,直接选择:使用admin 二、修改admin用户密码 进入:系统管理——管理用户——选中用户——点击设置图标——修改密码: 三、...

顾三殇 —— 博客空间(软件测试) 1万+

How to read Ext4 in Windows 10

Ext4 or Extended Files System version 4 is the file system for Linux. If you have a Windows 10 + Linux dual boot or have a hard drive formatted it in Ext4, how do you read in Windows 10? While Linux s...

lionzl的专栏 1399

Debezium报错处理系列之第112篇:Cannot replicate because the master purged required binary logs. Replicate the

Debezium报错处理系列之第112篇:Cannot replicate because the master purged required binary logs.

zhengzaifeidelushang的博客 726

linux分区之ext2,ext3,ext4,gpt

linux分区之ext2,ext3,ext4,gpt 2013-07-10 12:00:24 标签:ext3 gpt 原创作品,允许转载,转载时请务必以超链接形式标明文章原始出处、作者信息和本声明。否则将追究法律责任。http://wushank.blog.51cto.com/3489095/1244191 一、各分区简单介绍: 1、EXT是Lin...

dengji2627的博客 1852

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Can't find ext4 filesystem(EXT4-fs:Bad magic number in super-block)

针对目前市面上主流的android系统的嵌入式设备,都是使用的emmc的flash存储,相应的使用的是ext4的文件系统,当ext4的system分区无法挂载的时候,我们改如何分析呢?何种操作导致的ext4分区无法挂载呢? 我们出问题的设备的启动log如下: [ 1.868201@2] fs_mgr: Warning: unknown flag format [ ...

csdn66_2016的博客 7342

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

ext2、ext3与ext4的区别

ext2与ext3Linux ext2/ext3文件系统使用索引节点来记录文件信息,作用像windows的文件分配表。索引节点是一个结构,它包含了一个文件的长度、创建及修改时间、权限、所属关系、磁盘中的位置等信息。一个文件系统维护了一个索引节点的数组,每个文件或目录都与索引节点数组中的唯一一个元素对应。系统给每个索引节点分配了一个号码,也就是该节点在数组中的索引号,称为索引节点号。 linux文件系统将文件索引节点号和文件名同时保存在目录中。所以,目录只是将文件的名称和它的索引节点号结合在一起的一张表,目录

Macross的专栏 8万+

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

18、ext3ext4对比

EXT3:稳定且适用于小型系统,主要优点是数据安全性高。EXT4:在 EXT3 的基础上引入了更多特性,特别是在性能和可扩展性方面有显著提升,适用于现代大规模存储设备。因此,EXT4 是更先进的选择,通常情况下推荐使用 EXT4。

Linux系统开发 1323

Linux 中 ext、ext2、ext3、ext4 文件系统介绍与区别

文件系统名称 介绍 特点 优势 ext 第一代扩展文件系统, 于1992年4月发表,是为Linux核心所做的第一个文件系统。采用Unix文件系统(UFS)的元数据结构,以克服MINIX文件系统性能不佳的问题。 它是Linux上第一个 利用虚拟文件系统实现的文件系统。 克服MINIX文件系统性能不佳的问题。 ext2 第二代扩展文件系统 是Linux内核所用的文件系统。它开始由Rémy Card设计,用以代替ext,于1993年1月加入Linux核心支持之中。ext2 的经典实现为Linu...

早知晓的博客 2万+

7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)

and。

allway2的博客 73

linux文件系统ext2\ext3\ext4\xfs详解

1.ext2 介绍: 第二代扩展文件系统是LINUX内核所用的文件系统,用以代替ext,是 EXT文件系统的升级版, 特点: 在ext2文件系统中,文件由inode(包含有文件的所有信息)进行唯一标识。一个文件可能对应多个文件名,只有在所有文件名都被删除后,该文件才会被删除。此外,同一文件在磁盘中存放和被打开时所对应的inode是不同的,并由内核负责同步。 2.ext3 介绍: EX...

大道至简 3237

linux修改分区类型ext,Linux分区类型EXT2、EXT3、EXT4详解

一、EXT2与EXT3Linux之前缺省情况下使用的文件系统为Ext2,ext2文件系统的确高效稳定。但是,随着Linux系统在关键业务中的应用,Linux文件系统的弱点也渐渐显露出来了:其中系统缺省使用的ext2文件系统是非日志文件系统。这在关键行业的应用是一个致命的弱点.Ext3文件系统是直接从Ext2文件系统发展而来,目前ext3文件系统已经非常稳定可靠。它完全兼容ext2文件系统。用户可以...

weixin_36301989的博客 1476

ext2、ext3、ext4、brtfs文件系统区别

(转自:http://blog.youkuaiyun.com/cd520yy/article/details/8518356) ext2、ext3、ext4、brtfs文件系统区别   EXT2 EXT2是second extended file system的简写。这个文件最早的目的是取代minix文件系统。开发于1993年。在设计之初没有提供journal的功能。 E

Ph智的博客 2003

【亲测免费】 探索ext2read:一个用于读取EXT2/EXT3/EXT4文件系统的工具

如果你需要在Windows系统上访问Linux文件系统中的文件,那么ext2read可能是一个值得尝试的工具。它是一个开源软件,可以让你轻松地在Windows中读取EXT2、EXT3和EXT4文件系统。 ## 什么是ext2read? ext2read是一个简单的Windows应用程序,它可以让你访问Linux文件系统中的文件。它支持EXT2、EXT3和EXT4文件系统,并且可以在Windows ...

gitblog_00008的博客 1484

Ext2Read:Windows平台上读取EXT2/EXT3/EXT4文件系统的实用工具

Ext2Read是一个基于Qt框架开发的Windows应用程序,专门用于读取和浏览Linux的EXT2、EXT3和EXT4文件系统。该工具提供了图形化界面,让Windows用户能够轻松访问Linux分区中的文件和数据。 ## 主要功能特性 Ext2Read具备以下核心功能: - **多文件系统支持**:完整支持EXT2、EXT3和EXT4文件系统的读取操作 - **LVM2支持**:能够处理

gitblog_00681的博客 852

Ext2Read - Windows下的Ext4分区读取工具

Ext2Read - Windows下的Ext4分区读取工具 【下载地址】Ext2Read-Windows下的Ext4分区读取工具 Ext2Read 是一款专为Windows用户设计的免费工具,帮助您轻松访问和管理EXT2/3/4文件系统的分区。无论您需要恢复数据,还是查看Linux分区中的文件,Ext2Read都能提供...

gitblog_06766的博客 1321
上一篇: TOMCAT源码分析(消息处理)
下一篇: Tomcat的启动脚本浅析(一)
m_yeah
博客等级 码龄19年 17粉丝 20原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值