You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2004/03/17 20:15:08 UTC
cvs commit: cocoon-2.1/legal ant-contrib-0.6.jar.license.txt
cziegeler 2004/03/17 11:15:08
Modified: tools/targets init-build.xml
tools/src blocks-build.xsl
Added: tools/lib ant-contrib-0.6.jar
legal ant-contrib-0.6.jar.license.txt
Log:
Improving build time by start using ant-contrib if task instead of antcall
Revision Changes Path
1.1 cocoon-2.1/tools/lib/ant-contrib-0.6.jar
<<Binary file>>
1.12 +2 -0 cocoon-2.1/tools/targets/init-build.xml
Index: init-build.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/tools/targets/init-build.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- init-build.xml 16 Mar 2004 13:18:48 -0000 1.11
+++ init-build.xml 17 Mar 2004 19:15:08 -0000 1.12
@@ -178,6 +178,8 @@
nowarn="on"
compiler="${compiler}"/>
+ <!-- Ant-Contrib tasks -->
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
</target>
<!-- === Preparation Targets ============================================= -->
1.54 +34 -35 cocoon-2.1/tools/src/blocks-build.xsl
Index: blocks-build.xsl
===================================================================
RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- blocks-build.xsl 17 Mar 2004 18:48:49 -0000 1.53
+++ blocks-build.xsl 17 Mar 2004 19:15:08 -0000 1.54
@@ -337,9 +337,19 @@
</xsl:if>
<!-- Test if this block has samples -->
- <available property="{$block-name}.has.samples" file="${{blocks}}/{$block-name}/samples/sitemap.xmap"/>
-
- <antcall target="{$block-name}-samples"/>
+ <if>
+ <available file="${{blocks}}/{$block-name}/samples/sitemap.xmap"/>
+ <then>
+ <copy filtering="on" todir="${{build.webapp}}/samples/{$block-name}">
+ <fileset dir="${{blocks}}/{$block-name}/samples"/>
+ </copy>
+
+ <!-- copy sample classes -->
+ <copy todir="${{build.webapp.classes}}" filtering="off">
+ <fileset dir="${{build.blocks}}/{$block-name}/samples"/>
+ </copy>
+ </then>
+ </if>
</target>
<target name="{@name}-lib" unless="unless.exclude.block.{$block-name}">
@@ -354,13 +364,30 @@
</xsl:if>
<!-- Test if this block has libraries -->
- <available property="{$block-name}.has.lib" type="dir" file="${{blocks}}/{$block-name}/lib/"/>
+ <if>
+ <available type="dir" file="${{blocks}}/{$block-name}/lib/"/>
+ <then>
+ <copy filtering="off" todir="${{build.webapp.lib}}">
+ <fileset dir="${{blocks}}/{$block-name}/lib">
+ <include name="*.jar"/>
+ <exclude name="servlet*.jar"/>
+ </fileset>
+ </copy>
+ </then>
+ </if>
<!-- Test if this block has global WEB-INF files -->
- <available property="{$block-name}.has.webinf" type="dir" file="${{blocks}}/{$block-name}/WEB-INF/"/>
+ <if>
+ <available type="dir" file="${{blocks}}/{$block-name}/WEB-INF/"/>
+ <then>
+ <copy filtering="on" todir="${{build.webapp.webinf}}">
+ <fileset dir="${{blocks}}/{$block-name}/WEB-INF/">
+ <include name="**"/>
+ </fileset>
+ </copy>
+ </then>
+ </if>
- <antcall target="{$block-name}-lib"/>
- <antcall target="{$block-name}-webinf"/>
</target>
<target name="{$block-name}-prepare" unless="unless.exclude.block.{$block-name}">
@@ -475,23 +502,6 @@
</javac>
</target>
- <target name="{$block-name}-lib" if="{$block-name}.has.lib">
- <copy filtering="off" todir="${{build.webapp.lib}}">
- <fileset dir="${{blocks}}/{$block-name}/lib">
- <include name="*.jar"/>
- <exclude name="servlet*.jar"/>
- </fileset>
- </copy>
- </target>
-
- <target name="{$block-name}-webinf" if="{$block-name}.has.webinf">
- <copy filtering="on" todir="${{build.webapp.webinf}}">
- <fileset dir="${{blocks}}/{$block-name}/WEB-INF/">
- <include name="**"/>
- </fileset>
- </copy>
- </target>
-
<target name="{$block-name}-roles" unless="unless.exclude.block.{$block-name}">
<xpatch file="${{build.dest}}/org/apache/cocoon/cocoon.roles" srcdir="${{blocks}}">
<include name="{$block-name}/conf/*.xroles"/>
@@ -511,17 +521,6 @@
<xpatch file="${{build.webapp}}/WEB-INF/web.xml" srcdir="${{blocks}}">
<include name="{$block-name}/conf/*.xweb"/>
</xpatch>
- </target>
-
- <target name="{$block-name}-samples" if="{$block-name}.has.samples">
- <copy filtering="on" todir="${{build.webapp}}/samples/{$block-name}">
- <fileset dir="${{blocks}}/{$block-name}/samples"/>
- </copy>
-
- <!-- copy sample classes -->
- <copy todir="${{build.webapp.classes}}" filtering="off">
- <fileset dir="${{build.blocks}}/{$block-name}/samples"/>
- </copy>
</target>
<target name="{@name}-tests" unless="unless.exclude.block.{$block-name}">
1.1 cocoon-2.1/legal/ant-contrib-0.6.jar.license.txt
Index: ant-contrib-0.6.jar.license.txt
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001-2003 Ant-Contrib project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The name Ant-Contrib must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact
* ant-contrib-developers@lists.sourceforge.net.
*
* 5. Products derived from this software may not be called "Ant-Contrib"
* nor may "Ant-Contrib" appear in their names without prior written
* permission of the Ant-Contrib project.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*/