ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hall, John" <jh...@solant.com>
Subject RE: EJBJar task bug..
Date Mon, 26 Feb 2001 16:43:53 GMT
try using C:\Progra~1\test\... instead of C:\Program Files\test\...

john

> -----Original Message-----
> From: Goli, Srikanth [mailto:sg210022@exchange.DAYTONOH.NCR.com]
> Sent: Friday, February 23, 2001 6:34 PM
> To: ant-user@jakarta.apache.org; ant-dev@jakarta.apache.org
> Subject: EJBJar task bug..
> 
> 
> 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
> "C:\weblogic\classes;C:\weblogic\lib\weblogicaux.jar;C:\Program
> 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(ejbc.java:183)
>   [java]     at weblogic.ejbc.runBody(ejbc.java:289)
>   [java]     at weblogic.utils.compiler.Tool.run(Tool.java:80)
>   [java]     at weblogic.ejbc.main(ejbc.java:353)
>   [java] Java Result: 1
> 
> In Java the whitespace is an argument separator. This command 
> definitely
> fails. I understand, the command generation from 
> WeblogicDeploymentTool is
> wrong.  
> 
> The generated command should be as the following command
> 
> java -classpath
> "C:\weblogic\classes;C:\weblogic\lib\weblogicaux.jar;C:\Program
> 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;${b
> uild}" />
> 
>    <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}"
> oldCMP="false"/>
> 	    <include name="**/ejb-jar.xml" />
> 	    <exclude name="**/weblogic*.xml" />
>       </ejbjar>
>       <delete dir="${build}" />
>    </target>
> </project>
> 
> 
> Please let me know if there is any work around for this problem..
> 
> Thanks in advance
> Srikanth Goli
> Srikanth.Goli@ncr.com
> (An Ant Lover)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: ant-dev-help@jakarta.apache.org
> 

Mime
View raw message