On Tue, 2007-05-22 at 09:45 -0700, saurabh dutta wrote:
> Hi,
> I am in a project where i need to generate code using
> xdoclet.I have to read aproperties file in the
> <ejbdoclet> task or in the <jboss> subtask,so that I
> can dynamically assign some values.
> 
> I have searched a lot,but could not get a guidance as
> to how to read a properties file in <ejbdoclet> or
> <jboss> task.

You don't read the properties file in the ejbdoclet task itself, just
use the standard Ant <property> task before you call XDoclet.  See
http://ant.apache.org/manual/CoreTasks/property.html for details.
XDoclet should automatically substitute any Ant properties in the tag
values.

e.g.
<target name="code-generate">
<property file="mytable.properties"/>
<ejbdoclet ejbspec="2.0" ...


/**
 * @jboss.create-table create="${jboss.create.table}"
 */
public class ...


Andrew.
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku solver

> 
> Please let me know and help me on the same.
> 
> Thanks
> Saurabh


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to