You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sr...@timeinc.com on 2005/12/20 18:10:00 UTC

Different version of ant _ Please help

How to use the weblogic version of ant .  I am trying to build a
webservice using the following build file but it is complaining for
wlappc. I am using weblogic version 8.1 sp2

 

 

BUILD FAILED

C:\testwebservice\build.xml:78: Could not create task or type of type:
wlappc.

 

Ant could not find the task or a class this task relies upon.

 

This is common and has a number of causes; the usual

solutions are to read the manual pages then download and

install needed JAR files, or fix the build file:

 - You have misspelt 'wlappc'.

   Fix: check your spelling.

 - The task needs an external JAR file to execute

     and this is not found at the right place in the classpath.

   Fix: check the documentation for dependencies.

   Fix: declare the task.

 - The task is an Ant optional task and the JAR file and/or libraries

     implementing the functionality were not found at the time you

     yourself built your installation of Ant from the Ant sources.

   Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the

     task and make sure it contains more than merely a
META-INF/MANIFEST.MF.

     If all it contains is the manifest, then rebuild Ant with the
needed

     libraries present in ${ant.home}/lib/optional/ , or alternatively,

     download a pre-built release version from apache.org

 - The build file was written for a later version of Ant

   Fix: upgrade to at least the latest release version of Ant

 - The task is not an Ant core or optional task

     and needs to be declared using <taskdef>.

 - You are attempting to use a task defined using

    <presetdef> or <macrodef> but have spelt wrong or not

   defined it at the point of use

 

Remember that for JAR files to be visible to Ant tasks implemented

in ANT_HOME/lib, the files must be in the same directory or on the

classpath

 

Please neither file bug reports on this problem, nor email the

Ant mailing lists, until all of these causes have been explored,

as this is not an Ant bug.

        at
org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownEleme

nt.java:488)

 

<project name="ejblink" default="all" basedir=".">

  <!-- set global properties for this build -->

  

    <property name="source" value="."/>

  <property name="build" value="${source}/build"/>

  <property name="dist" value="${source}/dist"/>

  <property name="ejbc_jar_file" value="OMSQueueEngine.jar" />

  <property name="war_file" value="OMSQueueEngine.war" />

  <property name="ear_file" value="OMSQueueEngine.ear" />

  <property name="client_file" value="OMSQueueEngine_client.jar" />

 

 

 <path id="classpath.server">

        <pathelement location="lib/weblogic.jar"/>

        <pathelement location="lib/webservices.jar"/>

        <pathelement location="lib/xerces.jar"/>

        <pathelement location="lib/ejbgen.jar"/>

    </path>

 

  <target name="all" depends="clean, ear"/>

 

  <target name="clean">

    <delete dir="ejbcgen" />

    <delete dir="${build}" />

    <delete file="${war_file}"/>

    <delete file="dist/${ear_file}"/>

    <delete file="${client_file}"/>

  </target>

 

  <target name="ear" depends="build-ejb">

<echo message="" file="logcreation.log" append="false"/>

 

    <delete dir="${build}" />

    <mkdir dir="${build}" />

    <copy todir="${build}" file="${dist}/${ejbc_jar_file}"/> 

    

    

    <servicegen

            destEar="dist/${ear_file}"

            warName="${war_file}" 

            contextURI="OMS">

            

             <classpath refid="classpath.server"/>     

            <service

                        ejbJar="${build}/${ejbc_jar_file}"

 
targetNamespace="http://local:7001/OMS/OMSQueueEngine"

                        serviceName="OMSQueueEngine"

                        serviceURI="/OMSQueueEngine"

                        generateTypes="True"

                        expandMethods="True" >

            

    </service>

    </servicegen>

  </target>

 

  <target name="build-ejb">

  

  

    <delete dir="${build}" />

    <delete dir="${dist}" />

    <mkdir dir="${build}" />

    <mkdir dir="${dist}"/>

    <javac srcdir="." excludes="Client.java" destdir="${build}">

          <classpath refid="classpath.server"/>

</javac>

    <copy todir="${build}/META-INF" >

      <fileset dir="." >

        <include name="*.xml"/>

      </fileset>

    </copy>

   

 

     <jar jarfile="${dist}/${ejbc_jar_file}"

         basedir="${build}"

         update="yes"/>

    <wlappc debug="${debug}"

      source="${dist}/${ejbc_jar_file}"

      />

      

  </target>

 

 

</project>