ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beacock Andrew (NMP/Boston)" <Andrew.Beac...@nokia.com>
Subject RE: creating ejb-jar problem - resolving dtd
Date Thu, 15 Nov 2001 14:01:46 GMT
James,

> I am currently having a problem creating an ejb-jar file.
<snip/>
> Could not resolve ( publicId: -//Sun Microsystems, Inc.//DTD 
> Enterprise JavaBeans 2.0//EN, systemId: 
> http://java.sun.com/dtd/ejb-jar_2_0.dtd) to a local entity

The problem is that Ant can't see the java.sun.com website (due to a
firewall problem) or the dtd file itself and so is giving you this
error.  To solve this you have to use the <dtd> nested element of the
ejbjar task.

Here is a snippet from my Ant script for building ejbs:

    <!-- ejb -->
    <target name="ejb" description="create the EJB JARs">
        <mkdir dir="${dist}"/>
        <ejbjar srcdir="${classes}"
                descriptordir="${descriptors}/ejb"
                destdir="${dist}"
                naming="directory"
                flatdestdir="true"
                genericjarsuffix="EJB.jar">
            <dtd publicId=
                 "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN"
                 location="${descriptors}/dtd/ejb-jar_2_0.dtd"/>
            <classpath refid="path.classpath"/>
            <include name="**/ejb-jar.xml"/>
            <exclude name="**/weblogic-*.xml"/>
        </ejbjar>
    </target>

As you can see the <dtd> element refers to the dtd that I saved from
Sun's site and placed in my local file system.

For more info, see
http://jakarta.apache.org/ant/manual/OptionalTasks/ejb.html#ejbjar and
look for in the 'Nested Elements' section for 'dtd'.

Hope this helps, good luck! ;)

Andy.

--
Andrew Beacock
Senior Software Engineer/Project Lead
Nokia Mobile Phones
NMP/MSW/SSP/AG

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message