cedric 02/02/18 06:52:22
Modified: contrib/tiles build-webapp.xml build-webapps.xml
build.properties.sample build.xml
Log:
Updated build files to allow new tiles-blank build (if compiled outside of Struts)
Revision Changes Path
1.2 +9 -16 jakarta-struts/contrib/tiles/build-webapp.xml
Index: build-webapp.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/build-webapp.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build-webapp.xml 1 Aug 2001 14:36:36 -0000 1.1
+++ build-webapp.xml 18 Feb 2002 14:52:21 -0000 1.2
@@ -45,16 +45,8 @@
build.home Base directory into which we are building
the Struts tiles.
- commons-beanutils.jar (required). The path to the JAR file
- of the Jakarta Commons Beanutils
- package (version 1.0 or later).
-
- commons-collections.jar (required). The path to the JAR file
- of the Jakarta Commons Collections
- package (version 1.0 or later).
-
- commons-digester.jar (required). The path to the JAR file
- of the Jakarta Commons Digester
+ commons-lib.home (required). The path to the JAR files
+ of the Jakarta Commons
package (version 1.0 or later).
servlet.jar MUST be set to the pathname of the
@@ -72,7 +64,7 @@
tiles.libs If specified, must be the pathname of a
directory from which "tiles.jar" will be
copied to your WEB-INF/lib directory, and
- from which all tilesv TLD files will be copied
+ from which all tiles TLD files will be copied
to your WEB-INF directory. Also, the
tiles.jar file will automatically be
added to your compile classpath.
@@ -160,9 +152,10 @@
<!-- The class path used for compiling this library -->
<path id="classpath">
- <pathelement location="${commons-beanutils.jar}"/>
- <pathelement location="${commons-collections.jar}"/>
- <pathelement location="${commons-digester.jar}"/>
+ <pathelement location="${commons-beanutils.jar}"/>
+ <pathelement location="${commons-collections.jar}"/>
+ <pathelement location="${commons-digester.jar}"/>
+ <pathelement location="${commons-logging.jar}"/>
<pathelement location="${jdbc20ext.jar}"/>
<pathelement location="${servlet.jar}"/>
<pathelement location="${struts.libs}/struts.jar"/>
@@ -256,7 +249,7 @@
</copy>
<mkdir dir="${webapp.target}/WEB-INF/lib"/>
<copy todir="${webapp.target}/WEB-INF/lib">
- <fileset dir="${struts.libs}" includes="commons-*.jar"/>
+ <fileset dir="${commons-lib.home}" includes="commons-*.jar"/>
<fileset dir="${struts.libs}" includes="struts.jar"/>
</copy>
</target>
@@ -273,7 +266,7 @@
</copy>
<mkdir dir="${webapp.target}/WEB-INF/lib"/>
<copy todir="${webapp.target}/WEB-INF/lib">
- <fileset dir="${struts.libs}" includes="commons-*.jar"/>
+ <fileset dir="${commons-lib.home}" includes="commons-*.jar"/>
<fileset dir="${tiles.libs}" includes="*.jar"/>
</copy>
</target>
1.3 +30 -4 jakarta-struts/contrib/tiles/build-webapps.xml
Index: build-webapps.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/build-webapps.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build-webapps.xml 10 Sep 2001 13:16:55 -0000 1.2
+++ build-webapps.xml 18 Feb 2002 14:52:21 -0000 1.3
@@ -26,6 +26,9 @@
servlet.jar The pathname of the servlet API classes
that you wish to compile against.
+ commons-lib.home The path to the JAR files
+ of the Jakarta Commons
+ package (version 1.0 or later).
struts.libs The directory containing struts.jar and
the associated TLD files.
@@ -98,6 +101,11 @@
<property name="webapp.name" value="channel"/>
<property name="webapp.web" value="web/channel"/>
</ant>
+ <ant antfile="build-webapp.xml" target="static">
+ <property name="webapp.name" value="blank"/>
+ <property name="webapp.web" value="web/blank"/>
+ <property name="struts.libs" value="false"/>
+ </ant>
</target>
<!--
@@ -119,7 +127,7 @@
The "static" target causes non-generic static activity required
for specific tag libraries to be executed.
-->
-<target name="static.optional" if="make.optional.webapps"
+<target name="static.optional" if="make.optional.webapps"
description="Copy optional static resources for individual web
applications">
</target>
@@ -154,6 +162,11 @@
<!-- Channel sources are the same as tutorial, so use tutorial sources -->
<property name="webapp.src" value="src/tutorial/"/>
</ant>
+ <ant antfile="build-webapp.xml" target="compile">
+ <property name="webapp.name" value="blank"/>
+ <property name="webapp.web" value="web/blank"/>
+ <property name="struts.libs" value="false"/>
+ </ant>
</target>
<!--
@@ -179,9 +192,6 @@
-->
<target name="compile" depends="compile.generic"
description="Compile individual web applications">
- <!-- Create the taglib documentation -->
- <style basedir="${doc.dir}" destdir="${build.home}/documentation/doc"
- extension="Tags.html" style="stylesheets/struts.xsl" includes="*.xml"/>
<!-- Copy the basic documentation files -->
<copy todir="${build.home}/documentation/doc">
<fileset dir="${doc.dir}/html">
@@ -200,6 +210,12 @@
<include name="**/*.js"/>
</fileset>
</copy>
+ <!-- Create the taglib documentation -->
+ <style basedir="${doc.dir}" destdir="${build.home}/documentation/doc"
+ extension="Tags.html" style="stylesheets/tiles.xsl"
includes="tiles*.xml"/>
+ <!-- Create the xml documentation -->
+ <style basedir="${doc.dir}" destdir="${build.home}/documentation/doc"
+ extension="Xml.html" style="stylesheets/tiles.xsl" includes="*.xml"
excludes="tiles*.xml" />
</target>
@@ -221,6 +237,12 @@
<property name="webapp.web" value="web/channel"/>
<property name="webapp.war" value="tiles-channel.war"/>
</ant>
+ <ant antfile="build-webapp.xml" target="dist">
+ <property name="webapp.name" value="blank"/>
+ <property name="webapp.web" value="web/blank"/>
+ <property name="webapp.war" value="tiles-blank.war"/>
+ <property name="struts.libs" value="false"/>
+ </ant>
</target>
<!--
@@ -262,6 +284,10 @@
<ant antfile="build-webapp.xml" target="clean">
<property name="webapp.name" value="channel"/>
<property name="webapp.web" value="web/channel"/>
+ </ant>
+ <ant antfile="build-webapp.xml" target="clean">
+ <property name="webapp.name" value="blank"/>
+ <property name="webapp.web" value="web/blank"/>
</ant>
</target>
1.4 +24 -6 jakarta-struts/contrib/tiles/build.properties.sample
Index: build.properties.sample
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/build.properties.sample,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- build.properties.sample 27 Dec 2001 17:44:12 -0000 1.3
+++ build.properties.sample 18 Feb 2002 14:52:21 -0000 1.4
@@ -6,7 +6,7 @@
# to "build.properties" in the same directory that contains the Struts
# "build.xml" file.
#
-# $Id: build.properties.sample,v 1.3 2001/12/27 17:44:12 cedric Exp $
+# $Id: build.properties.sample,v 1.4 2002/02/18 14:52:21 cedric Exp $
# -----------------------------------------------------------------------------
# WARNING: The relative paths below assume that the build.xml file is in the
@@ -24,23 +24,41 @@
# (CVS module "jakarta-servletapi" at jakarta.apache.org).
servletapi.home=../jakarta-servletapi
-# The directory containing your binary distribution of Struts
-# (CVS module "jakarta-servletapi" at jakarta.apache.org).
+# The directories containing your binary distribution of Struts
+# struts.home is used to build library and webapps (so all distribution)
+# struts1.0.home is used to build struts1.0.x compatible jar file only
+# To build all distribution with a particular Struts version, set struts.home
+# to point to the Struts version you want
+# Comment struts1.0.home if you don't want to build the extra compatible jar file
+# Any struts home should contains a subdir called 'lib' and containing the
+# struts jar file.
struts.home=../struts
#struts1.0.home=../struts1.0
-# The directory containing your binary distribution of Tomcat 3.2, from CVS
-# module "jakarta-tomcat" (and branch "TOMCAT_32") at jakarta.apache.org.
-# This is only required if you are going to execute the "deploy.tomcat" target.
-tomcat.home=../build/tomcat
+# The directory containing JAR files
+# from the Jakarta Commons project.
+commons-lib.home=../commons/lib
+
+# The directory containing your binary distribution of Tomcat 4.0 ("Catalina"
+# is the servlet container part of this distribution), from CVS module
+# "jakarta-tomcat-4.0" at jakarta.apache.org). This is only required
+# if you are going to execute the "deploy.catalina" target.
+catalina.home=../jakarta-tomcat-4.0/build
+
+# The directory containing your binary distribution of the Servlet API classes
+# (CVS module "jakarta-servletapi" at jakarta.apache.org).
+servlet.jar=${tomcat.home}/lib/servlet.jar
# The directory containing your binary distribution of the Xerces XML parser,
# from CVS module "xerces-j" at xml.apache.org. This is only required
# if you are going to execute the "deploy.catalina" target.
xerces.home=../xml-xerces
+build.home=../target
+dist.home=../dist
# Flag indicating if we want to build additional war files.
# If true, build them.
make.optional.webapps=true
+
1.3 +154 -28 jakarta-struts/contrib/tiles/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 10 Sep 2001 13:16:55 -0000 1.2
+++ build.xml 18 Feb 2002 14:52:21 -0000 1.3
@@ -19,21 +19,13 @@
These properties MUST be set on the "ant" command line, a
"build.properties" file in the base directory, or a
"build.properties" file in your user home directory.
-
+
servlet.jar (required). The path to the Servlet API
classes to compile against (currently,
either version 2.2 or 2.3 supported).
- commons-beanutils.jar (required). The path to the JAR file
- of the Jakarta Commons Beanutils
- package (version 1.0 or later).
-
- commons-collections.jar (required). The path to the JAR file
- of the Jakarta Commons Collections
- package (version 1.0 or later).
-
- commons-digester.jar (required). The path to the JAR file
- of the Jakarta Commons Digester
+ commons-lib.home The path to the JAR files
+ of the Jakarta Commons
package (version 1.0 or later).
struts.libs (required). The path to the Struts
@@ -111,7 +103,7 @@
<!-- Directory where test configurations files are stored -->
<property name="conf.test.dir" value="conf/test"/>
-
+
<!-- Doc directory -->
<property name="doc.dir" value="doc"/>
@@ -121,10 +113,28 @@
<!-- Compilation Classpath -->
<path id="compile.classpath">
<pathelement location="${servlet.jar}"/>
+ <fileset dir="${commons-lib.home}">
+ <include name="commons-*.jar"/>
+ </fileset>
+ <pathelement location="${commons-lib.home}"/>
+ </path>
+
+ <path id="compile.classpath.struts1.1">
+ <pathelement location="${servlet.jar}"/>
<pathelement location="${struts.libs}/struts.jar"/>
<pathelement location="${commons-beanutils.jar}"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-digester.jar}"/>
+ <pathelement location="${commons-logging.jar}"/>
+ </path>
+
+ <path id="compile.classpath.struts1.1">
+ <pathelement location="${servlet.jar}"/>
+ <pathelement location="${struts1.0.home}/lib/struts.jar"/>
+ <pathelement location="${commons-beanutils.jar}"/>
+ <pathelement location="${commons-collections.jar}"/>
+ <pathelement location="${commons-digester.jar}"/>
+ <pathelement location="${commons-logging.jar}"/>
</path>
@@ -153,40 +163,156 @@
</target>
-<!--
- Create directories and copy files for the core component library
+<!--
+ Prepare static directories for web applications
+-->
+ <target name="static.webapps">
+ <ant antfile="build-webapps.xml" target="static"/>
+ </target>
+
+<!--
+ Compile Libraries for each target
+-->
+ <target name="compile.library" depends="init"
+ description="Compile Tiles libraries">
+
+ <!-- for struts1.1 -->
+ <antcall target="compile.clean.library.classes" />
+ <antcall target="compile.library.struts1.1" />
+ <!-- for struts1.0.X -->
+ <antcall target="compile.clean.library.classes" />
+ <antcall target="compile.library.struts1.0" />
+ </target>
+
+
+<!--
+ Create directories and copy files required for building library
-->
<target name="prepare.library" depends="init">
<mkdir dir="${build.home}/library/classes/META-INF/tlds"/>
<mkdir
dir="${build.home}/library/classes/org/apache/struts/tiles/resources"/>
+ <!-- copy resources -->
<copy
todir="${build.home}/library/classes/org/apache/struts/tiles/resources">
<fileset dir="${conf.share.dir}" includes="**/*.dtd"/>
</copy>
+ <!-- copy properties, dtds -->
+ <copy todir="${build.home}/library/classes">
+ <fileset dir="${src.share.dir}" includes="**/*.properties"/>
+ <fileset dir="${src.share.dir}" includes="**/*.dtd"/>
+ </copy>
+ <!-- copy additional dtd, tld in library -->
+ <copy todir="${build.home}/library">
+ <fileset dir="${conf.share.dir}" includes="*.dtd"/>
+ <fileset dir="${conf.share.dir}" includes="*.tld"/>
+ </copy>
+ <!-- create and copy tld for application -->
+ <style basedir="${doc.dir}"
+ destdir="${build.home}/library"
+ extension=".tld"
+ style="stylesheets/tld.xsl"
+ includes="tiles*.xml"/>
+ <copy todir="${build.home}/library/classes/META-INF/tlds">
+ <fileset dir="${build.home}/library" includes="*.tld"/>
+ </copy>
</target>
-<!--
- Prepare static directories for web applications
+<!--
+ Create directories and copy files required for building library
-->
- <target name="static.webapps">
- <ant antfile="build-webapps.xml" target="static"/>
+ <target name="compile.clean.library.classes" depends="prepare.library" >
+ <delete quiet="true">
+ <fileset dir="${build.home}/library/classes"
includes="**/*.class"/>
+ </delete>
</target>
-<!--
- Compile core struts library directory tiles
+<!--
+ Compile Tiles library for Struts1.1
-->
- <target name="compile.library" depends="prepare.library"
- description="Compile Tiles library files">
+ <target name="compile.library.struts1.1" if="struts.home"
+ depends="prepare.library"
+ description="Compile Tiles library for Struts1.1">
+
+ <antcall target="prepare.library" />
<javac srcdir="${src.share.dir}"
destdir="${build.home}/library/classes"
debug="${compile.debug}"
optimize="${compile.optimize}"
deprecation="${compile.deprecation}">
<classpath refid="compile.classpath"/>
+ <classpath>
+ <pathelement location="${struts.libs}/struts.jar"/>
+ </classpath>
</javac>
- <copy todir="${build.home}/library/classes">
+ <jar jarfile="${build.home}/library/${app.name}.jar"
+ manifest="${conf.share.dir}/MANIFEST.MF"
+ basedir="${build.home}/library/classes"
+ includes="**"/>
+ </target>
+
+<!--
+ Compile Tiles library for Struts1.0.x
+-->
+ <target name="compile.library.struts1.0" if="struts1.0.home"
+ depends="prepare.library"
+ description="Compile Tiles library for Struts1.0.x">
+
+ <antcall target="prepare.library" />
+
+ <property name="jar.name" value="${app.name}ForStruts1-0"/>
+
+ <javac srcdir="${src.share.dir}"
+ destdir="${build.home}/library/classes"
+ debug="${compile.debug}"
+ optimize="${compile.optimize}"
+ deprecation="${compile.deprecation}">
+ <exclude name="org/apache/struts/tiles/TilesRequestProcessor.java" />
+ <classpath refid="compile.classpath"/>
+ <classpath>
+ <pathelement location="${struts1.0.home}/lib/struts.jar"/>
+ </classpath>
+ </javac>
+ <jar jarfile="${build.home}/library/${jar.name}.jar"
+ manifest="${conf.share.dir}/MANIFEST.MF"
+ basedir="${build.home}/library/classes"
+ includes="**"/>
+
+ <move file="${build.home}/library/${jar.name}.jar"
todir="${build.home}/library/struts1.0" />
+ </target>
+
+<!--
+ Procedure to compile library with struts1.0, if set
+-->
+ <target name="proc.compile.library1.0" if="struts1.0.home" >
+ <!-- delete classes to ensure new classes are compiled -->
+ <delete>
+ <fileset dir="${build.home}/library/classes"
includes="**/*.class"/>
+ </delete>
+ <antcall target="proc.compile.library" >
+ <param name="build.lib.classes"
value="${build.home}/library/classes" />
+ <param name="compile.classpath" value="compile.classpath1.0" />
+ <param name="app.name" value="${app.name}ForStruts1-0" />
+ </antcall>
+ <move file="${build.home}/library/${app.name}ForStruts1-0.jar"
todir="${build.home}/library/struts1.0" />
+ </target>
+
+<!--
+ Procedure to compile library
+ @param build.lib.classes directory where classes are compiled
+ @param compile.classpath refid of classpath
+ @param app.name name use for the resulting .jar
+-->
+ <target name="proc.compile.library" >
+ <javac srcdir="${src.share.dir}"
+ destdir="${build.lib.classes}"
+ debug="${compile.debug}"
+ optimize="${compile.optimize}"
+ deprecation="${compile.deprecation}">
+ <classpath refid="${compile.classpath}"/>
+ </javac>
+ <copy todir="${build.lib.classes}">
<fileset dir="${src.share.dir}" includes="**/*.properties"/>
</copy>
- <copy todir="${build.home}/library/classes">
+ <copy todir="${build.lib.classes}">
<fileset dir="${src.share.dir}" includes="**/*.dtd"/>
</copy>
<copy todir="${build.home}/library">
@@ -198,12 +324,12 @@
extension=".tld"
style="stylesheets/tld.xsl"
includes="*.xml"/>
- <copy todir="${build.home}/library/classes/META-INF/tlds">
+ <copy todir="${build.lib.classes}/META-INF/tlds">
<fileset dir="${build.home}/library" includes="*.tld"/>
</copy>
<jar jarfile="${build.home}/library/${app.name}.jar"
manifest="${conf.share.dir}/MANIFEST.MF"
- basedir="${build.home}/library/classes"
+ basedir="${build.lib.classes}"
includes="**"/>
</target>
@@ -251,7 +377,7 @@
<target name="dist.library" depends="prepare.dist,compile.library">
<copy todir="${dist.home}/lib">
<fileset dir="${build.home}/library" includes="*.dtd"/>
- <fileset dir="${build.home}/library" includes="*.jar"/>
+ <fileset dir="${build.home}/library" includes="**/*.jar"/>
<fileset dir="${build.home}/library" includes="*.tld"/>
</copy>
</target>
@@ -306,7 +432,7 @@
<!-- Remove extra webapps from struts -->
<delete dir="${dist.home}/webapps/tiles-channel.war" />
<delete dir="${dist.home}/webapps/tiles-template.war" />
- <move file="${dist.home}/webapps/tiles-doc.war"
+ <move file="${dist.home}/webapps/tiles-doc.war"
tofile="${dist.home}/webapps/struts-${app.name}.war"/>
</target>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>