From ant-user-return-7277-apmail-jakarta-ant-user-archive=jakarta.apache.org@jakarta.apache.org Tue May 01 16:46:34 2001 Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 48259 invoked by uid 500); 1 May 2001 16:46:25 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 48248 invoked from network); 1 May 2001 16:46:23 -0000 Message-Id: <200105011645.MAA19884@interlock2.lexmark.com> X-Lotus-Fromdomain: LEXMARK@LEXMTA From: dhay@lexmark.com To: ant-user@jakarta.apache.org Date: Tue, 1 May 2001 12:44:17 -0400 Subject: Re: Using compiled classes later in build? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi everyone. It appears the problem with this is setting the classpath before hand (I call env.bat), when the directories have not been created yet. Has anyone else run into this? I am trying to change it so that I set the classpath under my target as below, but can't figure out why it is not working - says it can't find the servlet.jar: Would appreciate any input! thanks, Dave "David_Hay/Lex/Lexmark.LEXMARK"@sweeper.lex.lexmark.com on 04/30/2001 11:36:33 AM Please respond to ant-user%jakarta.apache.org@interlock.lexmark.com To: ant-user%jakarta.apache.org@interlock.lexmark.com cc: (bcc: David Hay/Lex/Lexmark) Subject: Re: Using compiled classes later in build? Anyone have any ideas on this? Does anyone know if it is possible to have Ant display a directory list? That way I could see if the files have been compiled and are available to the JspC step? Many thanks, Dave David Hay 04/27/2001 04:39 PM To: ant-user%jakarta.apache.org@interlock.lexmark.com cc: Subject: Re: Using compiled classes later in build? (Document link: David Hay) Hi Nico, Yep, agree it should work!! One thing I forgot to mention is that if I run Ant twice (exactly the same file etc.) it only compiles some of the jsp's the first time, but ALL of them the second! The ones it doesn't compile first time are those which have custom tag, which reference the classes build in the previous target. If I compile these original classes and put them in a seperate location, and point to them rather than the classes Ant has just compiled, it works fine first time. My classpaths are all set in env.bat which I execute before Ant. Please find buildAll.xml and env.bat below (still testing, so xml not been cleaned up yet! I am executing compileJSPs target.) So...if anyone can spot the problem, or explain the behaviour, I'd be very grateful! Dave ***buildAll.xml ***env.bat REM Setup the environment for building granite if exist o:\nul if not exist o:\TOOLDRV.ID net use o: /delete if not exist o:\nul net use o: \\toolbox.mw.prtdev.lexmark.com\utilapps REM Setup tools set Path=o:\MSVC40\bin;%Path% REM Setup up the latest JDK 1.3 compiler set JDKHOME=O:\java\jdk\1.3 set CLASSPATH=%JDKHOME%\jre\lib\rt.jar; set Path=%JDKHOME%\bin;%Path% REM Setup the jikes compiler set JIKESHOME=O:\java\ibm\jikes112 set Path=%JIKESHOME%\bin;%Path% REM Setup Ant set ANT_HOME=O:\java\ant1.2 set JAVA_HOME=%JDKHOME% set Path=%ANT_HOME%\bin;%Path% REM Setup access to Granite classes set CLASSPATH=%CLASSPATH%;d:\dev\nato\granite\Design\classes\debug\graniteclient.jar REM Setup access to Tomcat JSP compiler set jsdkJars=%TOMCAT_DIR%\lib\common\servlet.jar;%STRUTS_DIR%\lib\struts.jar set jspJars=%TOMCAT_DIR%\lib\container\jasper.jar set beanJars=d:\dev\nato\ServerWebPage\classes\build\WEB-INF\classes rem xml parser stuff, plus util.Log set miscJars=%TOMCAT_DIR%\lib\container\jaxp.jar;%TOMCAT_DIR%\lib\container\parser.jar;%TOMCAT_DIR%\lib\common\core_util.jar; set appJars=%jsdkJars%;%jspJars%;%beanJars%;%miscJars% set sysJars=%JAVA_HOME%\lib\tools.jar set appClassPath=%TOMCAT_DIR%\classes;%appJars% set cp=%CLASSPATH% set CLASSPATH=%CLASSPATH%;%appClassPath%;%sysJars% "Nico Seessle" on 04/27/2001 02:56:46 PM Please respond to ant-user%jakarta.apache.org@interlock.lexmark.com To: ant-user%jakarta.apache.org@interlock.lexmark.com cc: (bcc: David Hay/Lex/Lexmark) Subject: Re: Using compiled classes later in build? ----- Original Message ----- From: To: Sent: Friday, April 27, 2001 7:44 PM Subject: Using compiled classes later in build? > I am using Ant to build my web app. After building all my classes, I try to > pre-compile my jsp's with JspC (Tomcat). This is fine for some of the jsp's, > but those which have custom tags which were compiled in the previous step come > out with a size of 0! > > I believe the problem is something to do with using the compiled classes later > in the build, but I do not understand why this would be a problem. I have moved > It seems like there should be a way to do this in go!! > You are right, and normally it should work. Can you give us more details of the steps in your build.xml or post the relevant parts of your build.xml? Are you sure the classes you compile in the first step are compiled to a location that is in the classpath of your jspc-compilation? Nico