By W.ZH July 22 2009
If you develop a portlet project, it is in fact has many differences with the normal web application, But when you develop project in the Jdev 11g, it developed as a normal project., when u do the deploy from Jdev, it will ask to develop as a web app or a portlet app. (This is a simple article, but it is very trick practice in your real project. it may take several days if you explore how to do this by ur self. )
But how to deploy the portlet project in ANT?
1. first you deply in jdev , you can get the ear file and war file. unzip that file to see what is inside.
2. you design a normal web build.xml for your project.
3. notice the major difference that jdev changed during the deploy for the portlet proejct are:
Basically, if you include all these, your build should be able to build the project as a portlet deployment.
There are some tips in ANT build file:
1. when you compile use <javac in ant, it will not auto copy any non java file to your classes dir, you need take note your properties, xml, xsd, wsdl files in the src folder to include them into your war file , after compile.
2. If you have the webservice /client proxy in your src, then then will create some *.xsd and *.wsdl in the src, you need to remeber to copy them to your classes folder.