Re: Building Events
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Adam,
Try providing <classpath refid="build.classpath"/> to not only the taskdef
definition of events, but also to the <events> element itself. so...
<events srcdir="${build.event_source.dir}" destdir="${build.classes.dir}"
descriptor="${src.dir}/${src.package.path}${subdir}">
<classpath refid="build.classpath"/>
</events>
BTW, one little nit. I never write a path with a trailing slash
("/"). This way, if I ever need to add some more stuff to that path, I
know that I need to explicitly add a "/" between the two paths being
concatenated. I suppose if you always add a trailing slash to your paths
and treat it consistently that way, then that would be ok as
well. However, in the above, there is an explicit "/" between ${src.dir}
and ${src.package.path}, but not between ${src.package.path} and
${subdir}. This is inconsistent and can lead to hard to identify
errors. Also, there may be times where a trailing slash will change the
behavior of a task given a particular path.
later,
Jake
At 03:39 PM 5/27/2003 +0100, you wrote:
>Hi,
>
>I am trying to produce an ant build file to just build and compile some
>events from a specific events.xml file. I started by cutting down the main
>barracuda build.xml file and threw out all of the stuff that I thought I
>didn't need. I ended up with the attached build file, and everything seems
>okay except that when the event classes get compiled I get the following
>error message:
>
> * "ApplicationRequest.java": [events]
> C:\Dev\xmltravel\ViewdataService\tmp$\src_events\com\xmltravel\viewdata\events\ApplicationRequest.java:29:
> error #302: cannot access class
> org.enhydra.barracuda.core.event.HttpRequestEvent; neither class nor
> source found for org.enhydra.barracuda.core.event.HttpRequestEvent at line 29
> From the looks of it the event base class is not found during
> compilation. After trying various different strategies for updating the
> class path that Ant is using during the EventBuilder task I have not
> managed to overcome this problem. Now, the weird bit is that as far as I
> can determine, the regular Barracuda build process should have the same
> problem unless I am mistaken (which I almost certainly am). The
> build.classpath (used as the classpath for the event building task)
> consists of the jars in the Jars directory and the log4J jar in the
> lib-cvs directory, neither of which would include the standard event
> base-class (org.enhydra.barracuda.core.event.HttpRequestEvent).
> Therefore, I must assume that other paths are also added for that
> process. I am new to Ant so this is the bit that I don't understand. When
> the event classes are compiled during the main Barracuda build process
> where do the event base classes come from?
>
>If I am not building the whole of barracudda and I just want to build my
>events, what should my classpath look like for the build_events.sub task?
>
>
>thanks for your help,
>
>Adam.
>
>=====================================================
>
>Tel: (+44) 117 908 1254 (Direct)
>Mobile (+44) 7780 962 961
>email: <mailto:[email protected]>[email protected]
>
>This communication is intended solely for the addressee and is confidential.
>If you are not the intended recipient, any disclosure, copying, distribution
>or any action taken or omitted to be taken in reliance on it, is prohibited
>and may be unlawful.
>
>Although this e-mail and any attachments are believed to be free of any
>virus, or any other defect which might affect any computer or IT system into
>which they are received and opened, it is the responsibility of the
>recipient to ensure that they are virus free and no responsibility is
>accepted by Multicom Products Limited for any loss or damage arising in any
>way from receipt or use thereof.