Skip to content

Instantly share code, notes, and snippets.

@timlevett
Last active February 15, 2016 18:12
Show Gist options
  • Save timlevett/6922b4578047319b9076 to your computer and use it in GitHub Desktop.
Save timlevett/6922b4578047319b9076 to your computer and use it in GitHub Desktop.
Deploy a portlet to your local machine
#!/bin/bash
PROJECTS_HOME=$1
export UPHOME=$PROJECTS_HOME/uPortal/
echo Uportal home set to : $UPHOME
function upDeployPortlet()
{
pushd $UPHOME
ant deployPortletApp -DportletApp="$@"
popd
}
function upRebuildPortlet()
{
pushd $PROJECTS_HOME/${1}/
mvn clean
mvn package > /tmp/${1}.build.log
WAR=`cat /tmp/${1}.build.log | grep .war | grep $1 | grep target | cut -d" " -f4`
echo "Deploying war $WAR"
upDeployPortlet $WAR
popd
echo "Deployed war $WAR"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment