ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Wilkinson" <richard.wilkin...@protek.com>
Subject RE: WebLogic 5.1 deployment fails if the j2ee.jar isn't set in th e en vironment classpath.
Date Thu, 19 Jul 2001 15:26:56 GMT
First of all, thank you to all the people who responded to this distress
call.

I thought I would give the results of today's hard head scratching.

The problem didn't lay in the build.xml files but the ant.bat file. Like I
said in the first email we are trying to set and build everything in the
build.xml file and hence the environment CLASSPATH is not set.

If this is the case the ant deploy line in the ant.bat becomes:
Y:\fsp\server>c:\java\jdk1.3\bin\java -classpath
"c:\java\jdk1.3\lib\tools.jar";"c:\Progra~1\Ant\lib\parser.jar";"c:\Progra~1
\Ant\lib\jaxp.jar";"c:\Progra~1\Ant\lib\jakarta-ant-1.3-optional.jar";"c:\Pr
ogra~1\Ant\lib\ant.jar";  -Dant.home="c:\Progra~1\Ant"
-Djikes.class.path=C:\java\jikes-1.14\bin  org.apache.tools.ant.Main
-Dweblogic.home=c:\weblogic -Dtoplink.home=c:\toplink -Dweblogic.deploy=W:\
deploy

Note the ';' at the end of the -classpath added by the automatic
construction of LOCALCLASSPATH variable. This IS the problem.

Resolution: Add this line to the 'checkJava' section of the ant.bat
if "%CLASSPATH%" == "" set LOCALCLASSPATH=%LOCALCLASSPATH%\.

to give

.
.
.
:checkJava
set _JAVACMD=%JAVACMD%
for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"

if "%JAVA_HOME%" == "" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\tools.jar"
if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\classes.zip"

rem The automation above doesn't account for the CLASSPATH not being set. 
if "%CLASSPATH%" == "" set LOCALCLASSPATH=%LOCALCLASSPATH%\. 
goto checkJikes

:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java
echo.
echo Warning: JAVA_HOME environment variable is not set.
echo   If build fails because sun.* classes could not be found
.
.
.

This makes sure that ';' not at the end of the classpath, by adding a '.'
local dir.

Richard




-----------------------------------------------------------------------------------------
This message is for the named persons use only.  It may contain confidential, proprietary
or legally privileged information.  No confidentiality or privilege is waived or lost by any
mistransmission.  If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the sender.  You must
not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message
if you are not the intended recipient. PROTEK Network Management Group and each of its subsidiaries
reserve the right to monitor all e-mail communications through its networks.  Any views expressed
in this message are those of the individual sender, except where the message states otherwise
and the sender is authorised to state them to be the views of any such entity.





Mime
View raw message