Jose Alberto,

Look at the attached build file. It uses ejbjar with weblogic and no
classpath. Here is the result
D:\antdev\ejb-naming\descriptor>echo %CLASSPATH%
%CLASSPATH%
D:\antdev\ejb-naming\descriptor>dir %ANT_HOME%\lib
 Volume in drive D is User
 Volume Serial Number is 6CEF-919B

 Directory of D:\Software\Ant\lib

26/02/2002  01:24p      <DIR>          .
26/02/2002  01:24p      <DIR>          ..
26/02/2002  01:24p             547,440 ant.jar
15/12/2001  07:40a             491,551 bcel.jar
07/02/2002  10:53a             206,384 crimson.jar
21/05/2001  11:19a             117,522 junit.jar
26/02/2002  01:24p             500,913 optional.jar
07/02/2002  10:53a                 309 README


Total time: 1 second
D:\antdev\ejb-naming\descriptor>ant -Dappserver.classes=d:\Software\BEA\wlse
rver6.0\lib\weblogic.jar -Ddtd.home=.
Buildfile: build.xml

main:
    [mkdir] Created dir: D:\antdev\ejb-naming\descriptor\build\classes
   [depend] Deleted 0 out of date files in 0 seconds
    [javac] Compiling 7 source files to
D:\antdev\ejb-naming\descriptor\build\classes
    [mkdir] Created dir: D:\antdev\ejb-naming\descriptor\build\deployment
   [ejbjar] building Sample.jar with 6 files
   [ejbjar] building SessionSample.jar with 5 files

BUILD SUCCESSFUL
Total time: 19 seconds

So, what is the problem you are having?

Conor


> -----Original Message-----
> From: Jose Alberto Fernandez [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 26 February 2002 12:22 PM
> To: Ant Developers List
> Subject: Re: We need to stop the lies
>
>
> From: "Conor MacNeill" <[EMAIL PROTECTED]>
>
> > Jose Alberto Fernandez wrote:
> >
> > > In the current documentation for <ejbjar> it says that we can
> use a particular element to
> > > specify the classpath for weblogic. IT DOES NOT WORK UNLESS
> WL IS IN THE CLASSPATH.
> > >
> >
> >
> > Jose Alberto,
> >
> > Can you give me more info on this?
> >
>
> Just create a buildfile and call the <ejbjar> task. Use a virgin
> installation of ANT (i.e., just ant.jar
> and optional.jar in ANT_HOME/lib.
>
> See the definition of the <weblogic> element, in particular
> 'classpath' and 'wlclasspath' attributes.
>
> Jose Alberto
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
<project name="Ant ejbjar example" default="main" basedir=".">
    <property name="build.sysclasspath" value="last"/>
    
    <property name="dd.dir" value="dd"/>
    <property name="src.dir" value="../code"/>
    
    <property name="build.dir" value="build"/>
    <property name="build.classes" value="${build.dir}/classes"/>
    <property name="depcache.dir" value="${build.dir}/depcache"/>
    <property name="deployment.dir" value="${build.dir}/deployment"/>
    
    <path id="build.classpath">
        <pathelement location="${appserver.classes}"/>
    </path>

    <path id="descriptorbuild.classpath">
        <path refid="build.classpath"/>
        <path location="${build.classes}"/>
    </path>

    <target name="main">
        <mkdir dir="${build.classes}"/>
        <depend srcdir="${src.dir}" 
                destdir="${build.classes}" 
                cache="${depcache.dir}"/>
        <javac srcdir="${src.dir}" 
               destdir="${build.classes}">
            <classpath refid="build.classpath"/>
        </javac>

        <mkdir dir="${deployment.dir}"/>
        <ejbjar descriptordir="${dd.dir}" 
                srcdir="${build.classes}"
                manifest="manifest.mf">
            <weblogic destdir="${deployment.dir}" 
                      keepgeneric="true" 
                      rebuild="false"
                      newCMP="true">
                <classpath refid="descriptorbuild.classpath"/>
                <wlclasspath refid="build.classpath"/>
            </weblogic>                   
            <include name="**/*-ejb-jar.xml"/>
            <exclude name="**/*-weblogic-ejb-jar.xml"/>
            <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
              location="${dtd.home}/ejb20-jar.dtd"/>
            <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
              location="${dtd.home}/weblogic600-ejb-jar.dtd"/>
        </ejbjar>
    </target>

    <target name="clean">
        <delete dir="build"/>
    </target>
</project>
    

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

Reply via email to