Okay, I changed the build.xml to use a property and still get the same
results. Also, in the first version, since weblogic.jar was on my classpath
(both the system classloader and defined in the task), shouldn't the
relative path work?

Updated build.xml with property setting:

<project name="StatefulEJB" default="simple_jar" basedir="./">
        <target name="simple_jar">
                <mkdir dir="temp/simple_classfiles" />
                <mkdir dir="temp/jar"/>
                <property name="locations" value="d:\dtds" />
                <javac
                        srcdir="."
                        destdir="./temp/simple_classfiles"
                        classpath="c:\bea\wlserver6.1\lib\weblogic.jar"
                        includes="**/testcase/*.java"
                />
                <ejbjar
                        descriptordir="testcase/META-INF"
                        srcdir="./temp/simple_classfiles"
                        basejarname="simple_temp"
                        destdir="./temp/jar" 
                        >
                        <dtd publicId="-//Sun Microsystems, Inc.//DTD
Enterprise JavaBeans 2.0//EN"
             location="${locations}\ejb-jar_2_0.dtd" />
                        <include name="**/ejb-jar.xml"/>
                        <exclude name="**/weblogic*.xml"/>
                        <classpath>
                                <pathelement
path="c:\bea\wlserver6.1\lib\weblogic.jar"/>
                        </classpath>
                </ejbjar>
        </target>
</project>

Results: 

simple_jar:
Setting project property: locations -> d:\dtds
fileset: Setup scanner in dir D:\Develop\StatefulEJB_Testcase with
patternSet{ includes: [**/testcase/*.java] excludes: [] }
    [javac] testcase\SimpleEJBHome.java omitted as
D:\Develop\StatefulEJB_Testcase\temp\simple_classfiles\testcase\SimpleEJBHom
e.class is up to date.
    [javac] testcase\Simple.java omitted as
D:\Develop\StatefulEJB_Testcase\temp\simple_classfiles\testcase\Simple.class
is up to date.
    [javac] testcase\SimpleEJB.java omitted as
D:\Develop\StatefulEJB_Testcase\temp\simple_classfiles\testcase\SimpleEJB.cl
ass is up
 to date.
   [ejbjar] Unable to load dependency analyzer:
org.apache.tools.ant.util.depend.bcel.AncestorAnalyzer
fileset: Setup scanner in dir
D:\Develop\StatefulEJB_Testcase\testcase\META-INF with patternSet{ includes:
[**/ejb-jar.xml] excludes: [**/weblogic*.xml] }
   [ejbjar] 1 deployment descriptors located.
   [ejbjar] Could not resolve ( publicId: -//Sun Microsystems, Inc.//DTD
Enterprise JavaBeans 2.0//EN, systemId:
http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd) to a local entity

BUILD FAILED
file:D:/Develop/StatefulEJB_Testcase/build.xml:17: IOException while
parsing'ejb-jar.xml'.  This probably indicates that the descriptor doesn't
exist. Details: Server returned HTTP response code: 403 for URL:
http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd

-Brett 


-----Original Message-----
From: Conor MacNeill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 3:14 AM
To: Ant Users List
Subject: Re: Generic ejbjar task


Schmoll, Brett x66244 wrote:
> Hi, 
> 
> I'm having a problem (*surprise*) with resolving a local dtd reference
while
> generating a generic ejbjar. 

>                       <dtd publicId="-//Sun Microsystems, Inc.//DTD
> Enterprise JavaBeans 2.0//EN"
>              location="weblogic/ejb20/dd/xml/ejb-jar_2_0.dtd" />


you're using a relative path for the DTD. Perhaps it should be absolute. I 
don't know the layout of your project so it might be OK, but I suspect this.

In fact the best thing to do here wuld be to use a property and allow each 
developer to have their own DTD locations in a property file, perhaps with a

default location in the build file

Conor



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

<<application/ms-tnef>>

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

Reply via email to