On Sat, 03 Aug 2002 21:00:17 -0700, Patrick Luby wrote: > Costin, > > If it helps, you can exclude org/apache/catalina/launcher/** from the > build if you are not using commons-launcher. This package is only used > by the Launcher's XML files and has no other packages depend on this > package.
It may be a good idea to move the ant tasks/types that you need from sandbox into oac.launcher. I think they should be in either tomcat or ant ( preferably). Later on, after things stabilise we can propose it for commons proper. > Also, I noticed that you are compiling the ${taglibs.home}/standard/src > directory. If it helps, you don't need to do this as the expression > language classes are already compiled and checked into the > jakarta-tomcat-jasper/jasper2/lib/jsp20el.jar. My goal was is have all the source that directly affects tomcat compiled. Not necesarily complete gump-style, but at least 'our' code. Costin > > Patrick > > [EMAIL PROTECTED] wrote: >> costin 2002/08/03 20:48:50 >> >> Modified: . build2.xml >> Log: >> A more functional build file. >> It now creates a fully functional tomcat ( there are few problems >> with jasper tough ). >> >> Also added a task that starts tomcat from ant - with 1.4 you need >> fork=true ( I'll try to make few changes to ant classloader to avoid >> this ). >> >> I'm also trying 'everything in a jar' model - there are cases when >> you don't need the complex hierarchy. >> >> Note that the generated tomcat.jar is 2.8M, out of which 1.6 is >> tomcat. That's not very bad - if we move backward compat stuff into >> tomcat-compat and split some 'optional' functionality we can get well >> bellow 1M. >> >> ( that includes tomcat33 code - i.e. 300k, most of it not used at the >> moment, only some non-duplicated modules will be ported ) >> >> Revision Changes Path >> 1.3 +120 -3 jakarta-tomcat-5/build2.xml >> >> Index: build2.xml >> =================================================================== >> RCS file: /home/cvs/jakarta-tomcat-5/build2.xml,v retrieving revision >> 1.2 >> retrieving revision 1.3 >> diff -u -r1.2 -r1.3 >> --- build2.xml 1 Aug 2002 20:31:15 -0000 1.2 +++ build2.xml 4 Aug >> 2002 03:48:50 -0000 1.3 @@ -28,7 +28,7 @@ >> <property name="jtc.home" >> value="${basedir}/../jakarta-tomcat-connectors"/> >> - <property name="build.dir" value="${basedir}/build/tomcat5"/> >> + <property name="build.dir" value="${basedir}/build"/> >> <property name="log4j.jar" >> value="${base.path}/log4j/log4j.jar"/> >> @@ -44,6 +44,14 @@ >> <pathelement location="${jta.jar}"/> >> <pathelement location="${log4j.jar}"/> >> </path> >> + >> + <patternset id="static.res"> >> + <include name="**/*.properties" /> + <include name="**/*.dtd" >> /> >> + <include name="**/*.tld" /> >> + <include name="**/*.xsd" /> >> + <include name="**/*.xml" /> >> + </patternset> >> <path id="jasperjars" > >> <pathelement location="${jaxen.jar}"/> >> @@ -86,8 +94,25 @@ >> </src> >> <exclude name="org/apache/tomcat/util/net/PureTLS*" /> >> <exclude >> name="org/apache/commons/logging/impl/LogKitLogger.java" /> >> - <exclude name="org/apache/commons/modeler/Modeler.java" /> + + >> <!-- Fail with GCJ --> >> + <exclude >> name="org/apache/commons/collections/DoubleOrderedMap.java" /> + >> <exclude name="org/apache/tomcat/util/log/CommonLogHandler.java" /> >> </javac> >> + <copy toDir="${build.dir}/classes" > + <fileset >> dir="${commons.home}/modeler/src/java" > + <patternset >> refid="static.res" /> + </fileset> + <fileset >> dir="${jtc.home}/util/java" > + <patternset refid="static.res" >> /> + </fileset> + <fileset >> dir="${commons.home}/digester/src/java" > + <patternset >> refid="static.res" /> + </fileset> + <fileset >> dir="${commons.home}/logging/src/java" > + <patternset >> refid="static.res" /> + </fileset> + </copy> >> </target> >> <target name="tomcat" >> @@ -111,6 +136,40 @@ >> <exclude name="org/apache/tomcat/ant/Tomcat3Precompiler.java" >> /> <exclude >> name="org/apache/catalina/startup/BootstrapService.java" /> >> </javac> >> + >> + <copy toDir="${build.dir}/classes" > + <fileset >> dir="${catalina.home}/catalina/src/share" > + <patternset >> refid="static.res" /> + </fileset> + <fileset >> dir="${jtc.home}/coyote/src/java" > + <patternset refid="static.res" >> /> + </fileset> + <fileset >> dir="${jtc.home}/http11/src/java" > + <patternset refid="static.res" >> /> + </fileset> + <fileset dir="${jtc.home}/jk/java" > + >> <patternset refid="static.res" /> + </fileset> + </copy> >> + >> + <copy toDir="${build.dir}/classes" > + <fileset >> dir="${api.home}/src/share"> + <include >> name="**/*.properties"/> + </fileset> + </copy> >> + >> + <!-- Servlet/JSP resources - work around stupid src layout --> >> + <copy todir="${build.dir}/classes/javax/servlet/resources"> + >> <fileset dir="${api.home}/src/share/dtd"> + <include >> name="web-app*.dtd"/> + </fileset> + </copy> >> + <copy todir="${build.dir}/classes/javax/servlet/jsp/resources"> >> + <fileset dir="${api.home}/src/share/dtd"> + <include >> name="web-jsptaglibrary*.dtd"/> + <include name="jspxml.*"/> + >> </fileset> >> + </copy> >> </target> >> @@ -129,11 +188,69 @@ >> <exclude name="org/apache/taglibs/standard/lang/jstl/test/**" >> /> <exclude >> name="org/apache/taglibs/standard/lang/jstl/parser/jsp20/ELParser.java" >> /> >> </javac> >> + <copy toDir="${build.dir}/classes" > + <fileset >> dir="${jasper.home}/src/share" > + <patternset >> refid="static.res" /> + </fileset> + <fileset >> dir="${taglibs.home}/standard/src" > + <patternset refid="static.res" >> /> + </fileset> + </copy> >> + </target> >> + >> + <target name="jar" >> + description="Create jars" > + <mkdir >> dir="${build.dir}/lib" /> + <jar >> file="${build.dir}/lib/servlet.jar" > + <fileset >> dir="${build.dir}/classes" > + <include >> name="javax/servlet/**"/> + </fileset> + </jar> >> + >> + <jar file="${build.dir}/lib/tomcat-commons.jar" > + <fileset >> dir="${build.dir}/classes" > + <include >> name="org/apache/commons/**"/> + </fileset> + </jar> >> + <jar file="${build.dir}/lib/tomcat.jar" > + <fileset >> dir="${build.dir}/classes" > + <include >> name="org/apache/tomcat/**"/> + <include >> name="org/apache/jk/**"/> + <include >> name="org/apache/coyote/**"/> + <include >> name="org/apache/naming/**"/> + <include >> name="org/apache/catalina/**"/> + </fileset> + </jar> >> + <jar file="${build.dir}/lib/jasper.jar" > + <fileset >> dir="${build.dir}/classes" > + <include >> name="org/apache/jasper/**"/> + <include >> name="org/apache/taglibs/standard/**"/> + </fileset> + </jar> >> + >> + <jar file="${build.dir}/tomcat-full.jar" >> manifest="resources/catalina-main.manifest"> + <fileset >> dir="${build.dir}/classes" > + <include name="**"/> + >> </fileset> >> + </jar> >> </target> >> <target name="run" > >> - <java classname="org.apache.catalina.startup.Bootstrap" > + >> <property name="tools.jar" location="${java.home}/../lib/tools.jar" >> /> + <echo message="Tools.jar = ${tools.jar}"/> + <java >> classname="org.apache.catalina.startup.Catalina" fork="true"> >> <classpath location="${build.dir}/classes"/> >> + <classpath refid="alljars" /> >> + <classpath refid="jasperjars" /> + <classpath >> location="${ant.home}/lib/xercesImpl.jar" /> + <classpath >> location="${ant.home}/lib/xml-apis.jar" /> + <classpath >> location="${ant.home}/lib/ant.jar" /> + <classpath >> location="${java.home}/lib/rt.jar" /> + <classpath >> location="${tools.jar}" /> + <arg value="start" /> + >> <sysproperty key="catalina.home" value="${build.dir}"/> + >> <sysproperty key="build.compiler" value="jikes"/> + <sysproperty >> key="java.endorsed.dirs" value="${ant.home}/lib:${java.home}/lib"/> >> </java> >> </target> >> -- >> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> For additional >> commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>