liferay sdk下载 \IDE下载 \ Tomcat 安装细节不在此赘述
网上有很多.
只讲核心关键坑点
进入2016年,从Liferay6.2.5 ga6版本开始,到7.0 ga3,在ivy环节对国内用户会造成很大困扰,一直卡住,无法使用IDE新建liferay portlet工程.
看遍国内的论坛和博客,没有什么帮助.
看到这里很有帮助:
https://web.liferay.com/zh/community/forums/-/message_boards/message/74382032
关键点1 : 修改 build.wx.properties 文件,一定要配正确路径
app.server.parent.dir = D:\\liferay62\\bundles app.server.tomcat.dir = D:\\liferay62\\bundles\\tomcat-7.0.
app.server.tomcat.deploy.dir = D:\\liferay62\\bundles\\tomcat-7.0.\\webapps
app.server.tomcat.lib.global.dir = D:\\liferay62\\bundles\\tomcat-7.0.\\lib\\ext
app.server.tomcat.manager.user = tomcat
app.server.tomcat.manager.password = tomcat
app.server.tomcat.portal.dir = D:\\liferay62\\bundles\\tomcat-7.0.\\webapps\\ROOT
没这个build.wx.properties文件?查查cmd => echo %username% 换成自己的PC name
关键点2:修改 build.wx.properties 原有的ivy相关设置,地址就根本不对了
官方搞这么个乌龙,实在无语
ivy.home = ${sdk.dir}/.ivy
ivy.jar.url = http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar ivy.log.level = quiet
ivy.pom.developer.name = Brian Wing Shun Chan
ivy.pom.developer.organization = Liferay,Inc.
ivy.pom.developer.organizationUrl = http://www.liferay.com
ivy.pom.license.name = LGPL 2.1
ivy.pom.license.url = http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
ivy.pom.scm.connection = scm:git:[email protected]:liferay/liferay-plugins.git
ivy.pom.scm.developerConnection = scm:git:[email protected]:liferay/liferay-plugins.git
ivy.pom.scm.url = http://github.com/liferay/liferay-plugins
ivy.resolve.transitive.dependencies = true
ivy.resolve.transitive.dependencies.test = true ivy.version = 2.4.
关键点3:修改ivy-settings.xml,换成这样:
原来的liferay-public maven仓库地址根本不行, 国内原来速度飞快的开源中国仓库也关了,气愤阿!
现在是找不到下载速度快的地址了
<ivysettings>
<settings defaultResolver="default" /> <resolvers>
<ibiblio m2compatible="true" name="liferay-public" root="https://repo1.maven.org/maven2/" />
<ibiblio m2compatible="true" name="local-m2" root="file://${user.home}/.m2/repository" /> <chain dual="true" name="default">
<resolver ref="local-m2" /> <resolver ref="liferay-public" />
</chain>
</resolvers>
</ivysettings>
ivy cache下载过程大概需要20分钟,之后就可以在eclipse开发了