If you are a product designer working in a Liferay DXP related project this guide might be helpful for you and your daily work.
We usually use zsh as terminal interface
Install brew
brew install gradle
Install ant
brew install ant
Clone Liferay Portal
Create a folder wherever you want, navigate to it through terminal and clone the repo there:
git clone https://github.com/liferay/liferay-portal
Install Java
Download it from Oracle
Configure Java in your machine
You can use pico or any other terminal text editor.
pico .zshrc
Paste this inside:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Homeexport ANT_OPTS="-Xms4096m -Xmx4096m -XX:MaxPermSize=512m -Dorg.gradle.workers.max=11"
Note: Adjust 'jdk1.8.0_261' to the version number you have just downloaded
Everyday to update your portal you have to do the following from liferay-portal folder
Clean bundles
rm -rf ../bundles/data ../bundles/osgi/state
Get the news
git pull
Build them
ant all
You just need to run this from liferay-portal folder
../bundles/tomcat-9.0.37/bin/catalina.sh run
Note: Adjust 'tomcat-9.0.37' to the version number in bundles folder
PD: another day I can show you all the alias I have to run this quickly
Changing to DXP version
ant setup-profile-dxp
Changing to Portal version
ant setup-profile-portal
After any of them you might need to get the bundle snapshot
ant snapshot-bundle