liferay project 由ant build 到maven build

liferay project 由ant build 到maven build

liferay project 由ant build 到maven build

It’s actually quite easy. The only hang up is that you lose any history you’ve accumulated in your revision control system.

Basic process is to create a new maven project using one of the Liferay archetypes. Choose the archetype that best fits the plugin you’re migrating. Overlay the java source to the src/main/java directory and web-based files (such as portlet.xml, etc) to the src/main/webapp directory. Finally the pom files need to be updated to add any reference dependencies (remember to use the “provided” scope for all jars pulled into your project via liferay-plugin-package.properties file).

There are two special cases to keep in mind - service builder portlets and themes.

For service builder portlets you actually get a multi-module project, one for the implementation and one for the service jar. I think this one is best handled by copying your service.xml file into implementation project and immediately build services. Let Liferay create all of the initial classes. Then overlay your source to src/main/java and src/main/resources and build services again.

For themes the _diffs folder is gone. Copy your files from your ant _diffs folder and layer them in the appropriate place in the src/main/webapp directory. During builds, maven will start with the parent theme files (parent theme is defined in the pom) and then overlay your files from src into the target web app.

参考

参考liferay forum

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值