ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goli, Srikanth" <>
Subject EJBJar task bug..
Date Sat, 24 Feb 2001 01:34:04 GMT
Hi Everybody..

There seems to be a bug in ejbjar task (using weblogic) to build a jar file
from my beans.
When I have some white spaces in destdir attribute in weblogic task, the
task fails. This task works perfectly well if I don't have whitespaces. I am
not a windows guy. I hate to say, I have a requirement to have my
application classes in Program Files.

I tried to debug and noticed the parent process is forking another process
with the folling command.

     [java] Forking java -classpath
Files\test\build" weblogic.ejbc -noexit C:\Program
Files\test\test-generic.jar C:\Program Files\test\test.jar

  [java] weblogic.utils.compiler.ToolFailureException: ERROR: You must
specify a source ejb-jar file ending with the suffix .jar for weblogic.ejbc
  [java]     at weblogic.ejbc.validateToolInputs(
  [java]     at weblogic.ejbc.runBody(
  [java]     at
  [java]     at weblogic.ejbc.main(
  [java] Java Result: 1

In Java the whitespace is an argument separator. This command definitely
fails. I understand, the command generation from WeblogicDeploymentTool is

The generated command should be as the following command

java -classpath
Files\test\build" weblogic.ejbc -noexit "C:\Program
Files\test\test-generic.jar" "C:\Program Files\test\test.jar"

Both the arguments for ejbc compiler should be in the quotes.

Here is my sample project file that has a property called destdir that
points to Program Files\test. When I run ant, my jar building task fails.
If this destdir points to non-whitespace directory it works fine.

<project name="test" default="testjar" basedir="C:\">

   <property name="destdir" value="Program Files\test"/>

   <property name="build" value="C:\test\build"/>
   <property name="classpath"
value="C:\weblogic\classes;C:\weblogic\lib\weblogicaux.jar;${build}" />

   <target name="testjar">
      <mkdir dir="${build}"/>
      <javac srcdir="test" destdir="${build}" classpath="${classpath}"/>
      <ejbjar srcdir="C:\test\build" descriptordir="C:\test"
basejarname="test" classpath="${classpath}">
         <weblogic destdir="C:\${destdir}" classpath="${classpath}"
	    <include name="**/ejb-jar.xml" />
	    <exclude name="**/weblogic*.xml" />
      <delete dir="${build}" />

Please let me know if there is any work around for this problem..

Thanks in advance
Srikanth Goli
(An Ant Lover)

View raw message