Another way to load cayenne.xml (without having to deal with CLASSPATH
issues at all) is by using FileConfiguration:
http://objectstyle.org/cayenne/api/cayenne/org/objectstyle/cayenne/conf/FileConfiguration.html
You can create FileConfiguration with a File object passed for ant, and go
from there.
Andrus
> I addes just the path of the directory that contains cayenne.xml
>
>
> <taskdef name="jasper_gen"
> classname="org.jsaar.mware.report.JasperReportWizardAntTask"
> >
> <classpath>
> <pathelement
> path="/opt/cayenne_1.1/lib/cayenne.jar" />
> <pathelement
> path="/opt/jsaar/lib/jdbc/informix/lib/ifxjdbc.jar"
> /> <pathelement
> path="/opt/jsaar/lib/jdbc/postgresql/pg72jdbc2.jar"
> /> <pathelement location="base/bin" />
> <pathelement location="business/bin" />
> <pathelement location="tools/bin" />
> <pathelement location="tools/etc" />
> <pathelement
> location="/home/jsaar/project/mware/repository"
> />
> </classpath>
> </taskdef>
>
>
> Todd O'Bryan <toddobrya..ac.com> schrieb am 20.12.04 13:50:16:
>>
>> I've just started using Ant to auto-run Cayenne tasks and it does find
>> cayenne.xml.
>>
>> Are you adding the whole path to cayenne.xml or the path to the
>> directory that contains it? The latter should work.
>>
>> Todd
>>
>> On Dec 20, 2004, at 7:16 AM, Jürgen Saar wrote:
>>
>> > Hi,
>> >
>> > I'm just writing an ant task
>> > for a wizard to generate some
>> > JasperReport default reports for ObjEntities
>> > based on Velocity.
>> >
>> > Ant has it's own ClassLoader and ResourceLocator,
>> > so I have problems accessing cayenne.xml.
>> >
>> > If I add the path of cayenne.xml in the classpath definition in
>> build.xml
>> > cayenne.xml is not found by the cayenne ResourceLocator.
>> >
>> > What helps is setting up a $CLASSPATH with the
>> > path of cayenn.xml included and then call ant,
>> > but I think there must be a better way.
>> >
>> > Any hints?
>> > --- Juergen ---
>> >
>> > __________________________________________________________
>> > Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
>> > weltweit telefonieren! http://freephone.web.de/?mc=021201
>> >
>>
>
>
> __________________________________________________________
> Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
> weltweit telefonieren! http://freephone.web.de/?mc=021201
This archive was generated by hypermail 2.0.0 : Mon Dec 20 2004 - 09:32:27 EST