Hi all,
As an extension to ant task 'db-load', I have a class
'org.myCompany.dbLoad.SaveNotices' that populates tables with
pseudo-random sample-data. The class lives in the service layer and has
a method main(..). When "run as" an application it executes fine.
The next step is to get ant to execute the method. In this connection, I
am having problems getting the classpath right.
I am adding the following ant target to build.xml:
<target name="populateNotices" depends=""
description="populates db with sample notices">
<java classname="org.myCompany.dbLoad.SaveNotices">
<classpath>
<path refid="ant.compile.classpath"/>
</classpath>
</java>
</target>
where 'ant.compile.classpath' is:
<path id="ant.compile.classpath">
<pathelement path="${build.dir}/classes/WEB-INF/"/> <!-- for
hibernate and service.xml -->
<pathelement path="${build.dir}/classes/META-INF/"/> <!-- for
applicationContext-resources.xml -->
<pathelement path="web/WEB-INF/classes/"/> <!-- for
mail.properties. -->
<path location="${build.dir}/service/classes"/>
<path location="${build.dir}/dao/classes"/>
<fileset dir="${javamail.dir}" includes="*.jar"/>
<fileset dir="${commons.dir}" includes="*.jar"/>
<pathelement location="${hibernate.jar}"/>
<fileset dir="${hibernate.dir}/lib" includes="*.jar"/>
<pathelement location="${database.jar}"/>
<fileset dir="${spring.dir}" includes="*.jar"/>
<pathelement location="${xerces.jar}"/>
</path>
I thought this would be simple to configure, however I am going in
circles.
I need files applicationContext*.xml, *.hbm.xml, jars, and
org.myCompany.dbLoad.SaveNotices on classpath. No matter how I alter the
classpath, it is complaining about a file missing.
Does anyone have any pin-pointers?
Regards
Jon Loken
BiP Solutions Limited is a company registered in Scotland with Company Number
SC086146 and VAT number 38303966 and having its registered office at Park
House, 300 Glasgow Road, Shawfield, Glasgow, G73 1SQ
****************************************************************************
This e-mail (and any attachment) is intended only for the attention of the
addressee(s). Its unauthorised use, disclosure, storage or copying is not
permitted. If you are not the intended recipient, please destroyall copies and
inform the sender by return e-mail.
This e-mail (whether you are the sender or the recipient) may be monitored,
recorded and retained by BiP Solutions Ltd.
E-mail monitoring/ blocking software may be used, and e-mail content may be
read at any time. You have a responsibility to ensure laws are not broken when
composing or forwarding e-mails and their contents.
****************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]