Liferay provides code to implement deployment via Ant. The guts of that code is in the file portlet-deployer.xml. I don't know if it is available in the downloads (I recall it wasn't when I first encountered Liferay), however I have found a copy of it here:
Thanks for the pointer bjoy, but that file is almost exactly the same as the deploy file provided with KOSMOS. The only difference is the optional flag
which I added, but it makes no difference.
I still get the error
[java] java.lang.NoClassDefFoundError: com/liferay/portal/tools/PortletDeployer
I am deploying on Windows XP, with Liferay 4.1.3 anf Tomcat 5.17 (I had to downgrade because of a Tomcat problem with context loading) and JVM 1.5.
At a guess I would say my classpath is not set correctly, although the deployer may have changed. Since I don't know where it should be found I don't know what to change.
Any idea where to look next?
The Kosmos deploy-portlet-liferay-portal.xml file pretty much just delegates to the Liferay file that I pointed you too: portlet-deployer.xml.
I already had a working deployer (written in Java with the logic copied from portlet-deployer.xml) before I decided to include Kosmos to the portal. So I cannot help you with the process of troubleshooting either of the two Ant scripts.
The Liferay script is explict where it gets the jars, the bulk of which come from the common/lib/ext directory plus also common/lib/servlet-api.jar. My deployer also adds the liferay/WEB-INF/lib directory jar files to the classpath but I don't recall why.
I am using Liferay Professional 4.0 as it came bundled with Tomcat.