logo       

RE: ant task questions: msg#00090

text.xml.xmlbeans.user

Subject: RE: ant task questions

Hi Zac,

Can you try putting xbean.jar on the classpath attribute of the xmlbean
task?

<taskdef name="xmlbean"
classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpath="xbean.jar"/>

<xmlbean schema="foo.xsd" classpath="xbean.jar" />


You're right about the failonerror attribute -- that's a bug. The
xmlbean task does fail correctly if there is an error during the schema
compilation part. It isn't failing if there is an error during the
javac compilation of the generated sources. (Of course, there should
never be a failure during the javac compilation stage... :)

--k

-----Original Message-----
From: Zac Jacobson [mailto:pie.fed@xxxxxxxxx]
Sent: Wednesday, January 12, 2005 4:10 PM
To: user@xxxxxxxxxxxxxxxxxxx
Subject: ant task questions

Hi,

I've downloaded xmlbeans-1.0.3 and I'm having a couple problems with
the xmlbeans ant task. I only seem to be able to get it to work when I
set srconly. I am running ant from Netbeans 4 (1.6.2) and from the
command line (1.5.4). I am using Java 1.4.2_06.

First, the compilation only works if xbeans.jar is on ant's classpath,
regardless of how I try and put specify the classpath through that
task (I've tried including it with the classpath attribute, I've
created a path reference and included that with the classpathref
attribute). I get this error:
<generated file>.java:16: package org.apache.xmlbeans does not exist

This goes away if, as I say, I put xbeans.jar on the ant classpath. I
don't want to, and I don't think I should have to do that: it should
be easy for others to compile my project as checked out.

Second, the value of the failonerror attribute doesn't seem to have an
affect: even after the xmlbean task fails due to the compilation
problems, the ant script carries on with its next task.

I hunted around on jira for bugs about what I'm seeing, but I don't
see anything. Can anybody tell me what I'm missing?

Thanks.
Zac.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise