Blogs
How can I build Liferay 7.0 from source?
To build Liferay 7.0 from source:
-
Obtain the source code:*
git clone -b 7.0.x https://github.com/liferay/liferay-portal.git \ --depth 1 -
Navigate to your new
liferay-portaldirectory:cd liferay-portal/ -
In your
app.server.${yourname}.propertiesfile, set the location where you want Liferay 7.0 to be built:echo "app.server.parent.dir=/path/to/liferay-portal" \ > "app.server.$(whoami).properties" -
Optional: If you want to build the Wildfly 10 bundle rather than the default Tomcat bundle:
-
Add
app.server.type=wildflytoapp.server.${yourname}.properties:echo "app.server.type=wildfly" \ >> "app.server.$(whoami).properties" -
Download and unzip Wildfly in your
${app.server.parent.dir}directory:ant -f build-dist.xml unzip-wildfly
-
-
Build Liferay 7.0:
ant clean all
Now you should be able to start up Tomcat (or Wildfly), and Liferay 7.0 should be accessible at localhost:8080.
* I recommend getting a shallow clone since Liferay is a huge project with massive amounts of history and commits. Shallow cloning speeds up the clone process quite a bit.

