Re: Building Struts with ANT question
Rick Horowitz wrote: > Craig, > > Thanks very much for your reply...guess I could have gotten that from the > ANT docs...sorry about that. > No problem ... the amount of technology that is available can be overwhelming at times. If my hints encourage people to go explore some other kewl tools (like Ant), I feel it is time well invested. > > Rick > Craig
Re: Building Struts with ANT question
Craig, Thanks very much for your reply...guess I could have gotten that from the ANT docs...sorry about that. Rick At 03:21 PM 1/2/01 -0800, you wrote: >Rick Horowitz wrote: > > > I have successfully built Struts using the supplied ANT files, but have a > > question. There are classpaths referencing the property ${servlet.jar} in > > build.xml.. An example is the compile.example target... > > > > > > > depends="dist.library,prepare.example"> > > > destdir="${build.home}/example/WEB-INF/classes" > > classpath="${build.home}/library/classes:${servlet.jar}" > > ...etc. > > > > Question - where is the servlet.jar property defined? I got this to work by > > editing the build.bat file to include servlet.jar in the base classpath, > > but would like to understand this. > > > >Ant provides a hierarchy of mechanisms by which properties can be defined. >Essentially, the following list is checked from top to bottom until an >appropriate definition is found: > >* A command line setting (-Dservlet.jar=xx) > passed to Ant > >* A system property named "servlet.jar" passed to > the JVM inside which Ant is running > >* A setting inside the build script itself. > >In the case of Struts, the build script ("build.sh" or "build.bat") that >you use >looks for an environment variable named SERVLETAPI_HOME, and uses that to >construct an appropriate value: > > java ... -Dservlet.jar=$SERVLETAPI_HOME/lib/servlet.jar ... > >See the comments at the top of build.sh or build.bat for more documentation on >the environment variables you can use to control where the build gets its >files >from. The Ant user's manual (which comes with the Ant distribution in file >"docs/index.html") is also very useful when trying to understand build.xml >files. > > > > > Thanks, > > > > Rick Horowitz > > > >Craig McClanahan > > >. > > > Rick Horowitz > > > >Craig McClanahan > > >. Rick Horowitz _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Re: Building Struts with ANT question
Rick Horowitz wrote: > I have successfully built Struts using the supplied ANT files, but have a > question. There are classpaths referencing the property ${servlet.jar} in > build.xml.. An example is the compile.example target... > > > depends="dist.library,prepare.example"> > destdir="${build.home}/example/WEB-INF/classes" > classpath="${build.home}/library/classes:${servlet.jar}" > ...etc. > > Question - where is the servlet.jar property defined? I got this to work by > editing the build.bat file to include servlet.jar in the base classpath, > but would like to understand this. > Ant provides a hierarchy of mechanisms by which properties can be defined. Essentially, the following list is checked from top to bottom until an appropriate definition is found: * A command line setting (-Dservlet.jar=xx) passed to Ant * A system property named "servlet.jar" passed to the JVM inside which Ant is running * A setting inside the build script itself. In the case of Struts, the build script ("build.sh" or "build.bat") that you use looks for an environment variable named SERVLETAPI_HOME, and uses that to construct an appropriate value: java ... -Dservlet.jar=$SERVLETAPI_HOME/lib/servlet.jar ... See the comments at the top of build.sh or build.bat for more documentation on the environment variables you can use to control where the build gets its files from. The Ant user's manual (which comes with the Ant distribution in file "docs/index.html") is also very useful when trying to understand build.xml files. > > Thanks, > > Rick Horowitz > Craig McClanahan
Building Struts with ANT question
I have successfully built Struts using the supplied ANT files, but have a question. There are classpaths referencing the property ${servlet.jar} in build.xml.. An example is the compile.example target... http://im.yahoo.com