For liferay We can undeploy using with ant.
We should add this script to built.xml
We should add this script to built.xml
<target name="undeploy" depends="clean-ext" >
<property name="app.name" value="${app.name}"></property>
<property name="tomcat.home" value="${tomcat.name}"></property>
<echo>Application Name :"${app.name}"</echo>
<echo>Catalina Home :"${tomcat.home}\webapps\${app.name}-ext"</echo>
</target>
<target name="clean-ext">
<delete includeemptydirs="true">
<fileset dir="${tomcat.home}\webapps\${app.name}-ext" includes="**/*" />
</delete>
<echo>Deleting util-bridges.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${app.name}-ext-util-bridges.j
<property name="app.name" value="${app.name}"></property>
<property name="tomcat.home" value="${tomcat.name}"></property>
<echo>Application Name :"${app.name}"</echo>
<echo>Catalina Home :"${tomcat.home}\webapps\${app.name}-ext"</echo>
</target>
<target name="clean-ext">
<delete includeemptydirs="true">
<fileset dir="${tomcat.home}\webapps\${app.name}-ext" includes="**/*" />
</delete>
<echo>Deleting util-bridges.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${app.name}-ext-util-bridges.j
<echo>Deleting util-taglib.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${app.name}-ext-util-taglib.ja
<echo>Deleting util-java.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${app.name}-ext-util-java.jar"
<echo>Deleting ext-impl.jar</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\lib\ext-${app.name}-ext-impl.jar"></de
<echo>Deleting ext-"${app.name}"-ext.xml</echo>
<delete file="${tomcat.home}\webapps\ROOT\WEB-INF\ext-${app.name}-ext.xml"></delete>
<
<delete file="${tomcat.home}\temp\liferay\com\liferay\portal\deploy\dependencies\ext-${a
<delete file="${tomcat.home}\temp\liferay\com\liferay\portal\deploy\dependencies\ext-${a
</target>
___________________________________________________________
and create build.properties and put properties as aboveapp.name=YourAppNametomcat.home=C\:\\Java\\Liferay\\Liferay-portal-6.0.5\\t
That's it. Enjoy