You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2005/03/20 03:15:33 UTC
svn commit: r158270 - in lenya/trunk/src/targets: compile-build.xml
docs-build.xml export-build.xml init-build.xml properties-build.xml
webapp-build.xml
Author: gregor
Date: Sat Mar 19 18:15:31 2005
New Revision: 158270
URL: http://svn.apache.org/viewcvs?view=rev&rev=158270
Log:
Changed build to directly compile to WEB-INF/classes instead of to a temporary location.
Modified:
lenya/trunk/src/targets/compile-build.xml
lenya/trunk/src/targets/docs-build.xml
lenya/trunk/src/targets/export-build.xml
lenya/trunk/src/targets/init-build.xml
lenya/trunk/src/targets/properties-build.xml
lenya/trunk/src/targets/webapp-build.xml
Modified: lenya/trunk/src/targets/compile-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/compile-build.xml?view=diff&r1=158269&r2=158270
==============================================================================
--- lenya/trunk/src/targets/compile-build.xml (original)
+++ lenya/trunk/src/targets/compile-build.xml Sat Mar 19 18:15:31 2005
@@ -23,14 +23,12 @@
Compilation Targets
</description>
- <!-- ============================================================ -->
- <!-- The main compilation target -->
- <!-- ============================================================ -->
+ <!-- The main compilation target -->
<target name="compile" depends="prepare-src"
description="Compile the sources">
- <mkdir dir="${build.dest}"/>
+ <mkdir dir="${build.webapp}/WEB-INF/classes"/>
<javac srcdir="${build.src}"
- destdir="${build.dest}"
+ destdir="${build.webapp}/WEB-INF/classes"
debug="${debug}"
optimize="${optimize}"
deprecation="${deprecation}"
@@ -41,18 +39,12 @@
</javac>
</target>
-
-
-
- <!-- ============================================================ -->
<!-- The compilation target with deprecation on -->
- <!-- ============================================================ -->
<target name="deprecation" depends="prepare-src"
description="Compile the sources with deprecation messages">
- <delete dir="${build.dest}"/>
- <mkdir dir="${build.dest}"/>
+ <mkdir dir="${build.webapp}/WEB-INF/classes"/>
<javac srcdir="${build.src}"
- destdir="${build.dest}"
+ destdir="${build.webapp}/WEB-INF/classes"
debug="${debug}"
optimize="${optimize}"
deprecation="on"
@@ -63,9 +55,7 @@
</javac>
</target>
- <!-- ============================================================ -->
- <!-- The XSP compilation target -->
- <!-- ============================================================ -->
+ <!-- The XSP compilation target -->
<target name="compile-xsp" depends="prepare-src"
description="Compile the XSP sources">
<mkdir dir="${build.dir}/work"/>
Modified: lenya/trunk/src/targets/docs-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/docs-build.xml?view=diff&r1=158269&r2=158270
==============================================================================
--- lenya/trunk/src/targets/docs-build.xml (original)
+++ lenya/trunk/src/targets/docs-build.xml Sat Mar 19 18:15:31 2005
@@ -23,18 +23,14 @@
Documentation Targets
</description>
- <!-- ============================================================ -->
- <!-- Set a variable if javadoc is already up-to-date. -->
- <!-- ============================================================ -->
+ <!-- Set a variable if javadoc is already up-to-date -->
<target name="javadocs_check">
<uptodate property="javadocs.notrequired" targetfile="${dist.bin.javadocs}/packages.html" >
<srcfiles dir="${build.src}" includes="**/*.java"/>
</uptodate>
</target>
- <!-- =================================================================== -->
- <!-- If javadoc is already up-to-date, print a message saying so. -->
- <!-- =================================================================== -->
+ <!-- If javadoc is already up-to-date, print a message saying so -->
<target name="javadocs_done" if="javadocs.notrequired">
<echo message="-------------------------------------------------------------"/>
<echo message=" Not rebuilding Javadocs, as they are up-to-date:"/>
@@ -43,10 +39,7 @@
<echo message="-------------------------------------------------------------"/>
</target>
- <!-- ============================================================ -->
- <!-- Creates the API documentation -->
- <!-- ============================================================ -->
-
+ <!-- Creates the API documentation -->
<target name="javadocs" depends="prepare-src, javadocs_check, javadocs_done" unless="javadocs.notrequired" description="Generates the API documentation">
<mkdir dir="${dist.bin.javadocs}"/>
<javadoc packagenames="${packages}"
Modified: lenya/trunk/src/targets/export-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/export-build.xml?view=diff&r1=158269&r2=158270
==============================================================================
--- lenya/trunk/src/targets/export-build.xml (original)
+++ lenya/trunk/src/targets/export-build.xml Sat Mar 19 18:15:31 2005
@@ -23,10 +23,7 @@
Export Targets
</description>
- <!-- ============================================================ -->
- <!-- Produce the webapp -->
- <!-- ============================================================ -->
-
+<!-- Export the webapp -->
<target name="export" depends="webapp" description="Exports a publication to static HTML.">
<property name="publication" value=""/>
<property name="publication.dir" value="${build.webapp}/lenya/pubs/${publication}"/>
Modified: lenya/trunk/src/targets/init-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/init-build.xml?view=diff&r1=158269&r2=158270
==============================================================================
--- lenya/trunk/src/targets/init-build.xml (original)
+++ lenya/trunk/src/targets/init-build.xml Sat Mar 19 18:15:31 2005
@@ -23,9 +23,7 @@
Initialization Targets
</description>
- <!-- ============================================================ -->
- <!-- Initialization target -->
- <!-- ============================================================ -->
+ <!-- Initialization target -->
<target name="init">
<tstamp>
<format property="SNAPSHOT_STAMP" pattern="yyyyMMddhhmmss"/>
@@ -40,46 +38,40 @@
<property name="snapshot.src.dir" value="${dist.root}/${snapshot.src.name}"/>
</target>
+ <!-- Build ant tasks used during the Lenya build -->
<target name="build-custom-tasks" depends="init">
- <mkdir dir="${build.dir}/tools/anttasks"/>
- <javac srcdir="src/java"
- destdir="${build.dir}/tools/anttasks"
+ <javac srcdir="${tools.tasks.dest}"
+ destdir="${tools.tasks.dest}"
debug="${debug}"
optimize="{optimize}"
deprecation="${deprecation}"
target="${target.vm}"
nowarn="${nowarn}"
- includes="org/apache/lenya/cms/ant/**"
classpathref="classpath"
source="1.4"/>
- <taskdef name="copyJavaSources" classpath="${build.dir}/tools/anttasks" classname="org.apache.lenya.cms.ant.CopyJavaSourcesTask"/>
- <taskdef name="bulkCopy" classpath="${build.dir}/tools/anttasks" classname="org.apache.lenya.cms.ant.BulkCopyTask"/>
- <taskdef name="copyPubs" classpath="${build.dir}/tools/anttasks" classname="org.apache.lenya.cms.ant.CopyTask"/>
+ <taskdef name="copyJavaSources" classpath="${tools.tasks.dest}" classname="org.apache.lenya.cms.ant.CopyJavaSourcesTask"/>
+ <taskdef name="bulkCopy" classpath="${tools.tasks.dest}" classname="org.apache.lenya.cms.ant.BulkCopyTask"/>
+ <taskdef name="copyPubs" classpath="${tools.tasks.dest}" classname="org.apache.lenya.cms.ant.CopyTask"/>
<taskdef name="xpatch" classname="XConfToolTask" classpath="${tools.tasks.dest}"/>
</target>
- <!-- ============================================================ -->
- <!-- Prepares the build webapp directory -->
- <!-- ============================================================ -->
+ <!-- Prepare the build webapp directory -->
<target name="check-cocoon" depends="init" unless="gump.skipcocoonbuild">
<echo>Check if Cocoon has been built: ${cocoon.src.dir}/build/webapp</echo>
<available file="${cocoon.src.dir}/build/webapp" type="dir" property="cocoon.build.webapp.dir.exists"/>
- <!--<fail unless="cocoon.build.webapp.dir.exists" message="Cocoon needs to be built first!"/>-->
<antcall target="build-cocoon"/>
</target>
+ <!-- Build Cocoon with our properties -->
<target name="build-cocoon" depends="init" unless="cocoon.build.webapp.dir.exists">
- <!-- Building Cocoon with our properties -->
<copy todir="${cocoon.src.dir}" filtering="off">
<fileset dir="${src.cocoon.properties.dir}"/>
</copy>
<ant dir="${cocoon.src.dir}" inheritall="false"/>
</target>
- <!-- ============================================================ -->
- <!-- copy the bulk of the cocoon webapp to our destination -->
- <!-- ============================================================ -->
+ <!-- Copy the bulk of the cocoon webapp to our destination -->
<target name="prepare-cocoon" depends="check-cocoon" unless="gump.skipcocoonbuild">
<taskdef name="xpatch" classname="XConfToolTask" classpath="${tools.tasks.dest}"/>
<copy todir="${build.webapp}" filtering="off">
@@ -89,18 +81,18 @@
<exclude name="test-suite/**"/>
<exclude name="legal/**"/>
<exclude name="WEB-INF/db/**"/>
+ <exclude name="WEB-INF/xconf/**"/>
<exclude name="WEB-INF/cocoon.xconf"/>
- <exclude name="WEB-INF/logkit.xconf"/>
- <exclude name="WEB-INF/web.xml"/>
<exclude name="**/javac.jar"/>
</fileset>
</copy>
+ <!-- patch sitemap.xmap -->
<xpatch file="${build.webapp}/sitemap.xmap"
includes="src/confpatch/*.xmap"/>
<!-- patch cocoon.xconf -->
- <xslt
+ <xslt
in="${cocoon.webapp.dir}/WEB-INF/cocoon.xconf"
out="${build.webapp}/WEB-INF/cocoon.xconf"
style="${src.webapp.dir}/WEB-INF/cocoon-xconf.xsl"
@@ -110,31 +102,12 @@
</xslt>
<!-- patch logkit.xconf -->
- <xslt
- in="${cocoon.webapp.dir}/WEB-INF/logkit.xconf"
- out="${build.webapp}/WEB-INF/logkit.xconf"
- style="${src.webapp.dir}/WEB-INF/logkit-xconf.xsl"
- >
- <outputproperty name="indent" value="yes"/>
- </xslt>
+ <xpatch file="${build.webapp}/WEB-INF/logkit.xconf"
+ includes="src/confpatch/logkit-*.xconf"/>
<!-- patch web.xml -->
- <xslt
- in="${cocoon.webapp.dir}/WEB-INF/web.xml"
- out="${build.webapp}/WEB-INF/web.xml"
- style="${src.webapp.dir}/WEB-INF/web-xml.xsl"
- force="false"
- >
- <param name="enableUploads" expression="${enable.uploads}"/>
- <xmlcatalog>
- <dtd
- publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- location="${src.webapp.dir}/WEB-INF/entities/web-app_2_3.dtd"/>
- </xmlcatalog>
- <outputproperty name="indent" value="yes"/>
- </xslt>
-
- <!-- patch sitemap.xmap -->
+ <xpatch file="${build.webapp}/WEB-INF/web.xml"
+ includes="src/confpatch/*.xweb"/>
<!-- Copy Entities
<copyJavaSources pubsrootdirs="${pubs.root.dirs}" javadir="${src.entities.dir}" builddir="${build.webapp}/${build.entities.dir}" />
@@ -146,9 +119,7 @@
<mkdir dir="${build.webapp}"/>
</target>
- <!-- ============================================================ -->
- <!-- Prepares the source code -->
- <!-- ============================================================ -->
+ <!-- Prepare the source code -->
<target name="prepare-src" depends="prepare, build-custom-tasks">
<!-- Copy java source files from ${java.dir} to ${build.src} -->
<copy todir="${build.src}" filtering="on">
Modified: lenya/trunk/src/targets/properties-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/properties-build.xml?view=diff&r1=158269&r2=158270
==============================================================================
--- lenya/trunk/src/targets/properties-build.xml (original)
+++ lenya/trunk/src/targets/properties-build.xml Sat Mar 19 18:15:31 2005
@@ -23,10 +23,7 @@
Properties Targets
</description>
- <!-- ============================================================ -->
- <!-- Set up some global properties -->
- <!-- ============================================================ -->
-
+ <!-- Set up some global properties -->
<!--
Give user a chance to override without editing build.properties
(local.build.properties takes precedence)
@@ -114,11 +111,7 @@
<!-- hsqldb database config files directory -->
<property name="src.database.dir" value="src/webapp/WEB-INF/db"/>
-
- <!-- ============================================================ -->
- <!-- Set up classpath -->
- <!-- ============================================================ -->
-
+ <!-- Set up classpath -->
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
Modified: lenya/trunk/src/targets/webapp-build.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/targets/webapp-build.xml?view=diff&r1=158269&r2=158270
==============================================================================
--- lenya/trunk/src/targets/webapp-build.xml (original)
+++ lenya/trunk/src/targets/webapp-build.xml Sat Mar 19 18:15:31 2005
@@ -23,10 +23,6 @@
Webapp Targets
</description>
- <!-- ============================================================ -->
- <!-- Produce the webapp -->
- <!-- ============================================================ -->
-
<!--
This target creates a webapp directory which exactly mirrors how
the war file will look. It is used to create the war file for
@@ -39,14 +35,13 @@
<target name="webapp" depends="compile"
description="Builds the webapp directory ready to be linked into a servlet engines context directory">
<!--
- Copy CMS files and overwrite some parts of the previously unpacked cocoon webapp package with our customized files
+ Copy CMS files and overwrite some parts of the previously copied cocoon webapp package with our customized files
-->
<copy todir="${build.webapp}">
<fileset dir="${src.webapp.dir}">
<exclude name="lenya/pubs/**"/>
<exclude name="WEB-INF/*-xconf.xsl"/>
<exclude name="WEB-INF/*-xml.xsl"/>
-
</fileset>
</copy>
@@ -91,16 +86,6 @@
srcdir="${build.webapp}/lenya/pubs"
includes="*/targets/test-build.xconf"
addComments="true"/>
-
- <!-- create directory classes within webapp -->
- <mkdir dir="${build.webapp}/WEB-INF/classes"/>
-
- <!-- now copy our compiled classes -->
- <copy todir="${build.webapp}/WEB-INF/classes">
- <fileset dir="${build.dest}">
- <include name="**/*.class"/>
- </fileset>
- </copy>
<!-- now copy our logicsheets -->
<copy todir="${build.webapp}/WEB-INF/classes">
@@ -181,10 +166,7 @@
<jar jarfile="${dist.bin.warfile}" basedir="${build.webapp}" excludes="META-INF/MANIFEST.MF"/>
</target>
- <!-- ============================================================ -->
- <!-- Clean targets -->
- <!-- ============================================================ -->
-
+ <!-- Clean targets -->
<target name="reset" depends="clean" description="Resets the deployment by also cleaning the servlet engine context">
<!-- Empty server cache - this directory is set in the "local.build.properties" file -->
<delete dir="${tomcat.cache.dir}"/>
@@ -194,9 +176,7 @@
</delete>
</target>
- <!-- ============================================================ -->
- <!-- Install webapp -->
- <!-- ============================================================ -->
+ <!-- Install the webapp -->
<target name="install" depends="webapp" description="Install the webapp into servlet engine context">
<!-- Copy From build.webapp=${build.webapp} To tomcat.webapps.dir=${tomcat.webapps.dir} -->
<copy todir="${tomcat.webapps.dir}" filtering="off">
@@ -215,9 +195,7 @@
<copy file="${build.webapp}/WEB-INF/lib/xml-apis.jar" todir="${tomcat.endorsed.dir}"/>
</target>
- <!-- ============================================================ -->
- <!-- Install publication -->
- <!-- ============================================================ -->
+ <!-- Install publication -->
<target name="install-pub" depends="webapp" description="Install a publication into servlet engine context. Usage: -Dpub.prefix=blog">
<!-- Copy From build.webapp=${build.webapp}/lenya/pubs/${pub.prefix} To tomcat.webapps.dir=${tomcat.webapps.dir}/lenya/pubs/${pub.prefix} -->
<copy todir="${tomcat.webapps.dir}/lenya/pubs/${pub.prefix}" filtering="off">
@@ -225,11 +203,9 @@
</copy>
</target>
- <!-- ============================================================ -->
- <!-- Reload Tomcat -->
- <!-- ============================================================ -->
+ <!-- Reload Tomcat -->
<target name="reload">
- <!-- For Tomcat Tasks -->
+ <!-- For Tomcat Tasks -->
<path id="tomcat.classpath">
<fileset dir="${tomcat.webapps.dir}/../../server/lib"
includes="catalina-ant.jar" />
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org