Hi, You can also use one of the several Ant Task submitted by castor users and located in our bugzilla:
http://bugzilla.exolab.org/show_bug.cgi?id=885 Arnaud > -----Original Message----- > From: Verhagen [mailto:Verhagen] > Sent: Thursday, July 04, 2002 10:32 AM > To: [EMAIL PROTECTED] > Subject: [castor-dev] RE: [castor-dev] command line args for source > generator [Ant intergration] > > Trace, > > to intergrate Castor in Ant, you would not have to create a Ant task > it can > be > done through the task 'java'. > > > The target 'castor' in the Ant file 'build.xml'. > -------------------------------------------------------------------- > -------- > ---- > <!-- > =================================================================== > --> > <!-- Castor > --> > <!-- > =================================================================== > --> > <target name="castor" depends="farm-init"> > <property name="dir.src.castor" > value="${dir.src}/castor" > /> > <property name="dir.src.castor.xsd" > value="${dir.src.castor}/xsd" /> > <property name="dir.src.castor.properties" > value="${dir.src.castor}/properties" /> > > <echo message="${dir.src.castor}" /> > <echo message="${dir.src.castor.xsd}" /> > <echo message="${dir.src.castor.properties}" /> > <java classname="org.exolab.castor.builder.SourceGenerator" > fork="true"> > <!--arg value="-h" /--> > <arg value="-f" /> > <arg value="-i=../../src/castor/xsd/pims.xsd" /> > <arg value="-dest=../../build/ant/src/java" /> > <arg value="-nodesc" /> > <!--arg value="-typesj2" /--> > <classpath> > <pathelement location="${dir.src.castor.properties}" /> > <pathelement path="${package.castor.classpath}" /> > <pathelement path="${package.xerces.classpath}" /> > <pathelement path="${package.jakarta-regexp.classpath}" /> > </classpath> > </java> > </target> > -------------------------------------------------------------------- > -------- > ---- > > the directory struture we use: > The project directory: > project/ > > In the project a src for sources and a build directory for generated > stuff. > project/build/ > project/src > > The project sources contian java sources and also castor sources, > the xsd > and > castorBuilder properties. > > project/src/castor > project/src/castor/xsd > project/src/castor/properties > project/src/java > > In the project/build directory per ide/product a output directory > and in > that directory a source directory and classes directory. > project/build/ant/classes > project/build/ant/src/java > > Then there is the tool stearing inforamtion directory, for the Ant > build.xml > file and so. They are put in the project etcetera directory. This > directory > contains per project the setup inforamtion. Also for the differend > ide used > the project settings information. > project/stc > project/stc/ant > project/stc/jcreator > > I've created an ant-farm for general targets which apply to many > projects, > this target would also apply for the farm, but is still in the > project > specific build.xml. Also the target file should be a property > instead of the > hard coded 'pims.xsd'. > > > > > -----Original Message----- > From: Trace Windham [mailto:[EMAIL PROTECTED]] > Sent: 01 July 2002 22:52 > To: [EMAIL PROTECTED] > Subject: [castor-dev] command line args for source generator > > > > I have about 20 schema files that I am using to generate source > code. > > I know that the -i option on the command line is required with the > filename > as the argument. > > Does the source generator have the ability to take a wild card like > *.xsd, > or a directory as a command line arg? > > I am wanting to use ant to run the source generator, and I would > like to use > the tools in ant to pass all of the schema files at once and have > the source > generator do it's thing for each one of the schemas in the directory > where > they are stored. > > Would there be any interest in having a feature developed that > allowed the > source generator to take a group of schema files as an arg on the > command > line? > > If so, I wouldn't mine taking a crack at it. Beware though, this > would be > my first attempt at contributing to an open source project. > > Thanks, > Trace Windham > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, > confidential information and/or be subject to legal privilege. It > should not be copied, disclosed to, retained or used by, any other > party. If you are not an intended recipient then please promptly > delete this e-mail and any attachment and all copies and inform the > sender. Thank you. > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
