You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Wallter Tobias <To...@TETRAPAK.com> on 2004/04/07 14:53:53 UTC

Problems with Ant 1.6.1 and wlcompile (weblogic.jar)

Hi

I have a problem with Ant 1.6.1 and wlcompile. 

I get the following error: The <wlcompile> type doesn't support the
nested "javac" element.

Heres the error msg I get in debug mode:
BUILD FAILED
C:\P2Development\dev\testing\test.xml:3: The <wlcompile> type doesn't
support the nested "javac" element.
	at
org.apache.tools.ant.IntrospectionHelper.throwNotSupported(Introspection
Helper.java:573)
	at
org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionH
elper.java:624)
	at
org.apache.tools.ant.IntrospectionHelper.getElementCreator(Introspection
Helper.java:691)
	at
org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:529)
	at
org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:3
20)
	at
org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:176)
	at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:1
52)
	at org.apache.tools.ant.Task.perform(Task.java:363)
	at org.apache.tools.ant.Target.execute(Target.java:301)
	at org.apache.tools.ant.Target.performTasks(Target.java:328)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
	at
org.apache.tools.ant.Project.executeTargets(Project.java:1063)
	at org.apache.tools.ant.Main.runBuild(Main.java:632)
	at org.apache.tools.ant.Main.startAnt(Main.java:183)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)


I'm using windows 2000. I've tried with weblogic.jar from Weblogic
Server 8.1 SP1 and SP2. I've tried with JDK 1.4.1_02 and 1.4.2_04. If
I'm using Ant 1.5.3 then everything works perfectly.

I've tried to remove the WLS included Ant version to avoid conflicts
with Ant 1.6.1 and Ant 1.5.3 (that comes with Weblogic server). I've
tried to uninstall Weblogic Server and just keep weblogic.jar, but I
still get the same error. I've tried to put weblogic.jar on the
classpath, still not working. I've tried to remove all jar files from
$ANT_HOME/lib except those jar files needed to run my test project -
ant.jar and ant-launcher.jar, but still doesn't work. If I change
$ANT_HOME to Ant 1.5.3 and run Ant 1.5.3 then everything works. 

Here's my example code:

<project name="wlcompile_test" default="test" basedir=".">
 	<target name="test" depends="init">
           <wlcompile srcdir="${src.dir}" destdir="${build.dir}">
             <javac debug="${build.debuginfo}"
debuglevel="${build.debuglevel}" nowarn="${build.nowarn}"
deprecation="${build.deprecated}" source="${build.source.version}"/>
           </wlcompile>
	</target>

        <target name="clean" depends="init">
          <delete dir="${build.dir}"/>
        </target>

        <target name="init">
          <taskdef name="wlcompile"
classname="weblogic.ant.taskdefs.build.WLCompileTask"
classpath="C:\P2Development\weblogic.jar"/>
          <property name="src.dir" value="src"/>
          <property name="build.dir" value="classes"/>
          <property name="build.compiler" value="modern"/>
          <property name="build.compiler.pedantic" value="true"/>
          <property name="build.debuginfo" value="true"/>
          <property name="build.debuglevel" value="lines,vars,source"/>
          <property name="build.deprecated" value="false"/>
          <property name="build.nowarn" value="off"/>
          <property name="build.source.version" value="1.4"/>

          <mkdir dir="${build.dir}"/>
        </target>
</project>

And I run "ant test"
It doesn't work with Ant 1.6.1 and weblogic.jar from WLS 8.1 SP1 and
SP2. But it works perfectly if I change to Ant 1.5.3.

Here's a link to the Ant wlcompile task documentation from BEA:
http://e-docs.bea.com/wls/docs81/programming/environment.html#1098348

Regards,
Tobias Wallter

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