Home > weblogic > Weblogic ant tasks

Weblogic ant tasks

If you are trying to use weblogic ant task you might have run into the following problem when calling the task :

Could not create task or type of type: wlcompile.

This happens because ant can’t find the classes associated with the task, to solve this include the following snippet in your build xml:

<taskdef name="wlcompile" classname="weblogic.ant.taskdefs.build.WLCompileTask">
        <pathelement location="${weblogic.jar}"/>

Please note the classpath element, this is important or ant will not find the appropriate class files. The weblogic.jar property points towards the weblogic.jar file present in your server/lib folder.

This example is for the wlcompile task. Here are the names and classes for the other avaiable task:

  • wldeploy – weblogic.ant.taskdefs.management.WLDeploy
  • wlappc – weblogic.ant.taskdefs.build.WLCompileTask
  • wlpackage – weblogic.ant.taskdefs.build.WLPackageTask
  • wlserver – weblogic.ant.taskdefs.management.WLServer

Good place for some more info is the bea edocs site avaiable at :  http://edocs.bea.com

Also check out Developing Applications with WebLogic Server 10.0

  1. Sumeet
    August 29, 2013 at 10:28 am

    Thanks, very useful!

  2. Muni
    February 10, 2014 at 3:18 am

    Thanks it is solving my needs 🙂

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: