users@jaxb.java.net

Re: ant XJCTask: How to set the working directory (basedir)?

From: Ed Mooney <Ed.Mooney_at_sun.com>
Date: Thu, 17 Jul 2003 10:28:30 -0400

Hi Jan,

You can create a second project file and run it with the ant[1] task.
antcall[2] might do what you want, but I'm not sure.

Regards,
--
Ed Mooney         |Sun Microsystems, Inc.|Time flies like
Java Web Services |UBUR02-201            |an arrow, but
Ed.Mooney_at_Sun.COM |1 Network Drive       |fruit flies like
781-442-0459      |Burlington, MA  01803 |a banana. Groucho
[1] http://ant.apache.org/manual/CoreTasks/ant.html
[2] http://ant.apache.org/manual/CoreTasks/antcall.html
Jan Gramberg wrote:
> As described in the documentation for the ant task (http://java.sun.com/webservices/docs/1.2/jaxb/ant.html), there is no attribute "basedir" for XJCTask.
>
> I have to set the working directory for my XJCTask. This directory is not the same directory as defined by the basedir-attribute of <project>. Any ideas, how I could achieve this with ant?
>
> My Reason for setting the working directory: In the schema-file "schema.xsd" are <xs:import> and <xs:include>-statements relative to the position of schema.xsd in the filesystem, which I can't change. This position is NOT the directory <project basedir/>.
>
> Example:
> +-Myprojectdir
>   +-Sources
>   +-XMLSchema
>     +Service
>
>     +Types
>
> schema.xsd is in "Service". It contains statements like