Hi,

I believe it should not be a problem to call ant from a java program. As
ant itself is a java program, you just have to put the ant libraries in
your classpath, call the correct main class, and use the values which you
would issue from the command line in the String[]argument of the main
class. Look at ant.bat to see what it does (you might have to set the
system properties "by hand")
Perhaps there is an easier way to do it, it might be worth while to check
the ant docs.

    Thomas

"Pedro Castro" <[EMAIL PROTECTED]> schrieb am 15.11.2004 20:12:04:

> Hi, and thank you for your response.
>
> I could put version 3.1.1 working with ant in the command line ... I just
> copied over my build.xml from 3.1 and run the usual way: ant -f build.xml
> sql ... The problem is that I wanted to integrate it in a java project
and i
> didn't want to use the command line.
>
>
> :)
>
> Pedro Castro.
>
> -----Mensagem original-----
> De: Thomas Fischer [mailto:[EMAIL PROTECTED]
> Enviada: segunda-feira, 15 de Novembro de 2004 18:52
> Para: Apache Torque Users List
> Assunto: Re: Using torque
>
>
>
>
>
> Hi,
>
> please look at the tutorial,
> http://db.apache.org/torque/tutorial/index.html.  There, maven is used to
> generate the java classes. It worked for me.
> I did the following:
> - downloaded and installed maven
> - installed the torque plugin for maven (see tutorial)
> - downloaded torque-gen-3.1.1
> - unpacked it and changed into the torque-gen-3.1.1 directory
> - create a subdirectory src/schema and put the schema.xml from the
tutorial
> there
> - put the torque.properties and build.properties from the tutorial
directly
> into the torque-gen-3.1.1 directory
> - ran the command "maven torque" in the torque-gen-3.1.1 directory
> - and voila, the java sources were generated in the src/java subdiretory.
>
> In the 3.1. version, there was also an ant file in the generator called
> build-torque.xml, but I cannot find it in the 3.1.1 binary distribution
:-(
> I am not sure whether it was taken out by purpose, and if yes, why. So it
> seems that using ant is not an option at the moment with torque 3.1.1
>
>      Thomas
>
> "Pedro Castro" <[EMAIL PROTECTED]> schrieb am 15.11.2004 18:56:12:
>
> > Hello.
> >
> >
> >
> > I would like to use the 3.1.1 version of torque generator.
> >
> >
> >
> > I downloaded torque-gen-3.1.1.zip and ended up with the torque jar and
> the
> > lib dir containing the needed files (ant jar is included).
> >
> >
> >
> > I have project-schema.xml from my latest test as well as the
> > build-torque.xml and build.properties.
> >
> >
> >
> > I want to make a new JAVA file using torque jar for generating the sql
> > script, I understand that ant is needed.
> >
> >
> >
> > Is this possible, has anyone accomplished this?
> >
> >
> >
> >
> >
> > Thank you in advance.
> >
> >
> >
> >
> >
> > Pedro Castro.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to