ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Flemetakis" <cflem...@hotmail.com>
Subject Re: Problem while using ejb-jar deployment files for multiple J2EE servers
Date Tue, 18 Sep 2001 17:40:13 GMT
What I would do is depending on which target you are executing, copy only 
those descriptors that apply to the j2ee server you are using in the 
descriptor staging directory...

So for example.. if you are running the weblogic target, then create a copy 
tasks that goes through your deployment descriptors and copies them to the 
staging directory.. then point that task to that staging directory.

that way when the ejbjar task goes to look for descriptors it only sees the 
descriptors you want it to see... of course with each build you need to make 
sure that you clean out the staging directory so the only descriptors that 
end up there are the ones you intented...

Hope this helps

Chris


>From: daniel caune <danielc@in-fusio.com>
>Reply-To: ant-user@jakarta.apache.org
>To: ant-user@jakarta.apache.org
>Subject: Problem while using ejb-jar deployment files for multiple J2EE 
>servers
>Date: 18 Sep 2001 13:40:52 +0200
>
>Hi,
>
>I encounter some problems while I try to use different ejb-jar
>deployment files for multiple J2EE servers, such as JBoss and Weblogic:
>
>MyBean-ejb-jar.xml
>MyBean-weblogic-ejb-jar.xml
>MyBean-jboss.xml
>
>(1). I use different targets to create JBoss and Weblogic EJB JAR files.
>But the jboss built-in task doesn't react as the weblogic built-in task
>does. I think it looks at all the -ejb-jar.xml files and tries then to
>build the corresponding EJB JAR files. But in my case it takes also the
>-weblogic-ejb-jar.xml and finds obviously some errors: "Could not
>resolve ( publicId: -//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN,
>systemId: http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd) to
>a local entity"
>!
>
>(2). The Weblogic built-in task just looks at the -weblogic-ejb-jar
>files and thus doesn't raise any error. It creates correctly the
>different EJB JAR files.
>
>How to make cohabit the JBoss and Weblogic deployment files?
>
>Regards,
>
>
>Daniel
>
>
>
>P.S.: My Ant targets are as follow:
>
>  <target name="jboss-ejbjar" depends="compile">
>    <ejbjar descriptordir="${res}"
>            destdir="${lib}"
>            srcdir="${classes}">
>      <classpath refid="project.class.path"/>
>      <include name="**/*-ejb-jar.xml"/>
>      <include name="${classes}/**/*Exception.class"/>
>      <exclude name="**/*jboss*.xml"/>
>      <jboss destdir="${lib}"/>
>      <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
>1.1//EN"
>           location=" http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd
><http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd> "/>
>      <dtd publicId="-//JBoss//DTD JBOSS//EN"
>           location=" http://www.jboss.org/j2ee/dtd/jboss.dtd
><http://www.jboss.org/j2ee/dtd/jboss.dtd> "/>
>    </ejbjar>
>  </target>
>
>
>  <target name="weblogic-ejbjar" depends="compile">
>    <ejbjar descriptordir="${res}"
>            destdir="${lib}"
>            srcdir="${classes}">
>      <weblogic destdir="${lib}"
>                suffix="-weblogic.jar">
>        <classpath refid="project.class.path"/>
>      </weblogic>
>      <include name="**/*-ejb-jar.xml"/>
>      <include name="${classes}/**/*Exception.class"/>
>      <exclude name="**/*weblogic*.xml"/>
>      <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
>1.1//EN"
>           location=" http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd
><http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd> "/>
>      <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
>           location="
>http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd
><http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd> "/>
>    </ejbjar>
>  </target>
>
>
>  <target name="ejbjar" depends="jboss-ejbjar, weblogic-ejbjar"/>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


Mime
View raw message