Update of /var/cvs/contributions/didactor2
In directory james.mmbase.org:/tmp/cvs-serv21112

Modified Files:
        build.xml 
Added Files:
        build18.xml 
Log Message:
create also build18.xml. build.xml now only points to the one you want


See also: http://cvs.mmbase.org/viewcvs/contributions/didactor2


build18.xml is new



Index: build.xml
===================================================================
RCS file: /var/cvs/contributions/didactor2/build.xml,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -b -r1.108 -r1.109
--- build.xml   26 Jun 2008 09:10:04 -0000      1.108
+++ build.xml   26 Jun 2008 11:42:49 -0000      1.109
@@ -1,615 +1,5 @@
 <project name="didactor2" default="webapp" basedir=".">
 
-  <!-- We need the 'foreach' and 'if' tasks, therefore we use ant-contrib -->
-  <taskdef resource="net/sf/antcontrib/antcontrib.properties">
-    <classpath>
-      <pathelement location="lib/ant-contrib-1.0b1.jar"/>
-    </classpath>
-  </taskdef>
-
-  <taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask">
-    <classpath>
-      <pathelement location="lib/AntelopeTasks_3.4.2.jar" />
-    </classpath>
-  </taskdef>
-
-  <property file="my.properties"/>
-  <property file="configure.properties"/>
-  <property file="build.properties"/>
-
-
-  <property name="defaultexcludes" value="no" />
-
-  <property name="build.webapp.dir" value="${build.dir}/webapp" />
-
-  <property name="download.dir"           location="${basedir}" />
-  <property name="war.dir"                value="${build.dir}" />
-
-  <property name="mmbase.version"         value="mmbase-1.8.6.20080621" />
-  <property name="mmbase.distro.location" 
value="http://www.mmbase.org/development/download/stable/2008-06-21/"; />
-  <property name="mmbase.zip"             value="${mmbase.version}.zip" />
-  <property name="mmbase.distro"          
value="${mmbase.distro.location}/${mmbase.zip}" />
-
-  <property name="mmbase.dest"             
value="${download.dir}/${mmbase.version}.zip" />
-  <property name="mmbaseroot.language"     value="en" />
-  <property name="mmbaseroot.datadir"      value="." /> <!-- defaults to 
WEB-INF/data -->
-
-
-
-
-  <target name="create.dirs">
-    <mkdir dir="${build.dir}" />
-    <mkdir dir="${build.dir}/classes" />
-    <mkdir dir="${build.webapp.dir}" />
-    <mkdir dir="${build.webapp.dir}/WEB-INF" />
-    <mkdir dir="${build.webapp.dir}/WEB-INF/config" />
-    <mkdir dir="${build.webapp.dir}/WEB-INF/lib" />
-  </target>
-
-  <target name="build" >
-    <echo message="Building components: ${components}" />
-    <delete file="${build.webapp.dir}/WEB-INF/web.xml" />
-
-    <foreach list="${components}" target="build.component" inheritall="true" 
param="component" />
-    <foreach list="${providers}" target="build.provider" inheritall="true" 
param="provider" />
-
-     <ant antfile="configure.xml" target="config"/>
-     <if>
-       <available file="${build.webapp.dir}/WEB-INF/config/applications" 
type="dir" />
-       <then>
-         <copy todir="${build.webapp.dir}/WEB-INF/config/builders" 
flatten="yes">
-           <!--
-                flatten yes? having builders in a sensible sub-dir would make 
life a bit better
-                bearable ...
-                Btw, putting the builders under config/applications is 
deprecated.
-                Put them under config/builders directly, in a nice sub-dir.
-           -->
-           <fileset dir="${build.webapp.dir}/WEB-INF/config/applications">
-             <include name="**/builders/*.xml"/>
-           </fileset>
-         </copy>
-       </then>
-     </if>
-  </target>
-
-  <target name="compileonly">
-    <echo message="Only compiling all classes" />
-    <foreach list="${components}" target="compile.component" inheritall="true" 
param="component" />
-  </target>
-
-  <target name="clean">
-    <delete dir="${build.dir}" />
-  </target>
-  <target name="mmbase.distro.exists">
-    <echo message="Using MMBase ${mmbase.version}" />
-    <available file="${mmbase.dest}" property="mmbase.distro.exists"/>
-    <available file="${build.dir}/mmbase" 
property="mmbase.distro.expanded.exists"/>
-  </target>
-  <target name="mmbase.distro.download" depends="mmbase.distro.exists" 
unless="mmbase.distro.exists">
-    <mkdir dir="${download.dir}" />
-    <get src="${mmbase.distro}" dest="${mmbase.dest}" verbose="on" />
-  </target>
-
-  <target name="mmbase.distro" 
depends="mmbase.distro.exists,mmbase.distro.download" 
unless="mmbase.distro.expanded.exists" >
-    <unzip src="${mmbase.dest}" dest="${build.dir}/" />
-    <move file="${build.dir}/${mmbase.version}" tofile="${build.dir}/mmbase" />
-  </target>
-
-  <target name="webapp"
-          depends="create.dirs,build,mmbase.distro">
-    <copy todir="${build.webapp.dir}/mmbase" preservelastmodified="true">
-      <fileset dir="${build.dir}/mmbase/mmbase-webapp/mmbase">
-        <include name="**"/>
-      </fileset>
-    </copy>
-    <copy todir="${build.webapp.dir}/WEB-INF/lib" preservelastmodified="true">
-      <fileset dir="${build.dir}/mmbase/mmbase-webapp/WEB-INF/lib">
-        <include name="**"/>
-        <exclude name="mmbase-rmmci-server.jar" />
-      </fileset>
-    </copy>
-  </target>
-
-  <target name="config">
-    <ant antfile="configure.xml" target="config"/>
-  </target>
-
-  <target name="build.provider">
-    <echo message="Building provider ${provider}" />
-
-    <!-- copy templates -->
-    <if>
-      <available file="src/core/templates/${provider}" type="dir" />
-      <then>
-        <echo message="Copying templates from src/core/templates/${provider}" 
/>
-        <echo message="Warning: putting provider templates in 
/src/core/templates is deprecated,
-                       consider using /providers/${provider}/templates instead 
${defaultexclude} "/>
-        <copy todir="${build.webapp.dir}/${provider}"
-              overwrite="true" preservelastmodified="true">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="src/core/templates/${provider}">
-            <include name="**"/>
-            <exclude name="templates/**"/>
-          </fileset>
-        </copy>
-      </then>
-      <else>
-        <if>
-          <available file="providers/${provider}/templates" type="dir" />
-          <then>
-            <echo message="Copying templates from 
providers/${provider}/templates" />
-            <copy todir="${build.webapp.dir}/${provider}" overwrite="true">
-              <fileset
-                  defaultexcludes="${defaultexcludes}"
-                  dir="providers/${provider}/templates">
-                <include name="**"/>
-              </fileset>
-            </copy>
-          </then>
-          <else>
-            <echo message="WARNING! provider ${provider} does not have any 
templates in /src/core/templates/${provider} or 
/providers/${provider}/templates"/>
-          </else>
-        </if>
-      </else>
-    </if>
-    <if>
-     <available file="providers/${provider}/templates.zip" type="dir" />
-     <then>
-        <unzip dest="${build.webapp.dir}">
-          <fileset dir="providers/${provider}/templates.zip">
-            <include name="*.zip" />
-            <include name="*.war" />
-          </fileset>
-        </unzip>
-     </then>
-    </if>
-    <if>
-     <available file="providers/${provider}/webinf" type="dir" />
-     <then>
-      <echo message="Copying WEB-INF files from providers/${provider}/webinf" 
/>
-        <copy todir="${build.webapp.dir}/WEB-INF" overwrite="true">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="providers/${provider}/webinf">
-            <include name="**"/>
-          </fileset>
-        </copy>
-        <replace file="${build.webapp.dir}/WEB-INF/classes/oscache.properties"
-                 token="$${mmbaseroot.datadir}"
-                 value="${mmbaseroot.datadir}"/>
-      </then>
-    </if>
-  </target>
-
-  <target name="compile.component" depends="mmbase.distro">
-    <echo message="Compiling component ${component}" />
-    <!-- copy external libs -->
-    <if>
-      <available file="src/${component}/lib" type="dir" />
-      <then>
-        <copy todir="${build.webapp.dir}/WEB-INF/lib"
-              preservelastmodified="true">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="src/${component}/lib">
-            <include name="**"/>
-          </fileset>
-        </copy>
-      </then>
-    </if>
-    <if>
-      <available file="src/${component}/lib18" type="dir" />
-      <then>
-        <copy todir="${build.webapp.dir}/WEB-INF/lib"
-              preservelastmodified="true">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="src/${component}/lib18">
-            <include name="**"/>
-          </fileset>
-        </copy>
-      </then>
-    </if>
-
-    <if>
-      <available file="src/${component}/config" type="dir"/>
-      <then>
-        <echo message="copying src/${component}/config" />
-        <mkdir dir="${build.dir}/classes/${component}/org/mmbase/config" />
-        <copy todir="${build.dir}/classes/${component}/org/mmbase/config"  
preservelastmodified="true">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="src/${component}/config">
-            <include name="applications/**" />
-            <include name="builders/**" />
-            <include name="components/**" />
-            <include name="translations/**" />
-            <include name="datatypes.xml" />
-          </fileset>
-        </copy>
-      </then>
-    </if>
-
-    <!-- build java sources and create a jar file -->
-    <if>
-      <available file="src/${component}/java" type="dir"/>
-      <then>
-        <path id="classpath">
-          <fileset dir="lib/">
-            <include name="*.jar" />
-          </fileset>
-          <fileset dir="${build.webapp.dir}/WEB-INF/lib">
-            <include name="*.jar" />
-          </fileset>
-          <fileset dir="src/${component}/lib">
-            <include name="*.jar" />
-          </fileset>
-          <fileset
-              dir="${build.dir}/mmbase/mmbase-webapp/WEB-INF/lib">
-            <include name="*.jar" />
-          </fileset>
-        </path>
-        <mkdir dir="${build.dir}/classes/${component}" />
-
-        <copy todir="${build.dir}/classes/${component}">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="src/${component}/java">
-            <include name="**/*.properties" />
-            <include name="**/*.xsd" />
-            <include name="**/*.xml" />
-            <exclude name="**/*.java"/>
-          </fileset>
-        </copy>
-
-
-        <javac srcdir="src/${component}/java"
-               destdir="${build.dir}/classes/${component}"
-               deprecation="off"
-               debug="yes"
-               classpathref="classpath" />
-
-        <if>
-          <!-- pretty ridiculous. See DIDACTOR-4
-          -->
-          <available file="src/${component}/java/hibernate.cfg.xml" 
type="file"/>
-          <then>
-            <!-- hibernate configuration -->
-            <replace file="${build.dir}/classes/reports/hibernate.cfg.xml"
-                     token="$${jdbc.driver}"
-                     value="${jdbc.driver}"/>
-            <replace file="${build.dir}/classes/reports/hibernate.cfg.xml"
-                     token="$${jdbc.host}"
-                     value="${jdbc.host}"/>
-            <replace file="${build.dir}/classes/reports/hibernate.cfg.xml"
-                     token="$${jdbc.port}"
-                     value="${jdbc.port}"/>
-            <replace file="${build.dir}/classes/reports/hibernate.cfg.xml"
-                     token="$${jdbc.database}"
-                     value="${jdbc.database}"/>
-            <replace file="${build.dir}/classes/reports/hibernate.cfg.xml"
-                     token="$${jdbc.user}"
-                     value="${jdbc.user}"/>
-            <replace file="${build.dir}/classes/reports/hibernate.cfg.xml"
-                     token="$${jdbc.password}"
-                     value="${jdbc.password}"/>
-          </then>
-        </if>
-
-        <if>
-          <available file="src/${component}/metainf" />
-          <then>
-            <jar 
jarfile="${build.webapp.dir}/WEB-INF/lib/didactor-${component}.jar"
-                 includes="**"
-                 basedir="${build.dir}/classes/${component}">
-              <metainf dir="src/${component}/metainf">
-                <include name="**" />
-              </metainf>
-            </jar>
-          </then>
-          <else>
-            <jar 
jarfile="${build.webapp.dir}/WEB-INF/lib/didactor-${component}.jar"
-                 includes="**"
-                 basedir="${build.dir}/classes/${component}"
-                 />
-          </else>
-        </if>
-      </then>
-    </if>
-    <if>
-      <available file="src/${component}/build.xml" type="file" />
-      <then>
-        <echo message="running src/${component}/build.xml"/>
-        <ant antfile="src/${component}/build.xml" target="build"/>
-      </then>
-    </if>
-  </target>
-
-  <target name="build.component" depends="compile.component">
-    <echo message="Building component ${component}" />
-
-    <!-- copy templates -->
-    <if>
-     <available file="src/${component}/templates" type="dir" />
-     <then>
-        <if>
-          <equals arg1="${component}" arg2="core"/>
-          <then>
-            <copy todir="${build.webapp.dir}" preservelastmodified="true">
-              <fileset
-                  defaultexcludes="${defaultexcludes}"
-                  dir="src/${component}/templates">
-                <include name="**"/>
-                <!--
-                <include name="admin/**"/>
-                <include name="cockpit/**"/>
-                <include name="components/**"/>
-                <include name="css/**"/>
-                <include name="editwizards/**"/>
-                <include name="gfx/**"/>
-                <include name="help/**"/>
-                <include name="mmbase/**"/>
-                <include name="mmeditors/**"/>
-                <include name="shared/**"/>
-                <include name="users/**"/>
-                <include name="metadata/**"/>
-                <include name="migrate/**"/>
-                <include name="translation/**"/>
-                <include name="${component}/**"/>
-                <include name="classes/**"/>
-                <exclude name="templates/**"/>
-                -->
-              </fileset>
-            </copy>
-          </then>
-          <else>
-            <copy todir="${build.webapp.dir}" overwrite="true" 
preservelastmodified="true">
-              <fileset
-                  defaultexcludes="${defaultexcludes}"
-                  dir="src/${component}/templates">
-                <include name="**"/>
-                <exclude name="CVS/**"/>
-                <exclude name="templates/**"/>
-                <exclude name="editwizards/**/extra_*.xml"/>
-              </fileset>
-            </copy>
-          </else>
-        </if>
-       </then>
-       <else>
-         <echo message="no templates dir in ${component}" />
-       </else>
-    </if>
-    <if>
-     <available file="src/${component}/templates.zip" type="dir" />
-     <then>
-        <unzip dest="${build.webapp.dir}">
-          <fileset dir="src/${component}/templates.zip">
-            <include name="*.zip" />
-            <include name="*.war" />
-          </fileset>
-        </unzip>
-     </then>
-    </if>
-
-
-    <!-- copy webinf -->
-    <if>
-      <available file="src/${component}/webinf" type="dir" />
-      <then>
-        <copy todir="${build.webapp.dir}/WEB-INF" preservelastmodified="true">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="src/${component}/webinf">
-            <include name="**"/>
-            <exclude name="**/taglib-extra.tld" />
-            <exclude name="**/web-extra.xml" />
-          </fileset>
-        </copy>
-        <if>
-          <available file="src/${component}/webinf/web-extra.xml" />
-          <then>
-            <property name="mergeXmlFile"
-                      location="src/${component}/webinf/web-extra.xml" />
-            <xslt style="merge-web.xml.xslt"
-                  in="${build.webapp.dir}/WEB-INF/web.xml"
-                  out="${build.webapp.dir}/WEB-INF/web.help.xml">
-              <param name="mergeXmlFile" expression="${mergeXmlFile}" />
-            </xslt>
-            <move file="${build.webapp.dir}/WEB-INF/web.help.xml"
-                  tofile="${build.webapp.dir}/WEB-INF/web.xml" />
-          </then>
-        </if>
-
-      </then>
-    </if>
-
-
-    <!-- copy configuration files -->
-    <if>
-      <available file="src/${component}/config" type="dir" />
-      <then>
-        <copy todir="${build.webapp.dir}/WEB-INF/config"
-              preservelastmodified="true">
-          <fileset
-              defaultexcludes="${defaultexcludes}"
-              dir="src/${component}/config">
-            <include name="**"/>
-          </fileset>
-        </copy>
-      </then>
-    </if>
-
-
-    <!-- merge editwizard definitions -->
-    <if>
-      <available file="src/${component}/templates/editwizards/data/config/" />
-      <then>
-        <echo message="Merging wizards of '${component}'" />
-        <foreach target="mergewizards" param="file">
-          <path>
-            <fileset dir="src/${component}/templates/editwizards/data/config/">
-              <include name="**/extra_*.xml" />
-            </fileset>
-          </path>
-        </foreach>
-      </then>
-    </if>
-  </target>
-
-  <target name="mergewizards">
-    <echo>MergeWizards: ${file}</echo>
-    <pathconvert property="cleaned_filename" dirsep="${file.separator}" 
pathsep="${path.separator}">
-      <path path="${file}" />
-      <mapper>
-        <globmapper 
from="${basedir}/src/${component}/templates/editwizards/data/config/*" to="*" 
handledirsep="yes" />
-      </mapper>
-    </pathconvert>
-    <pathconvert property="destfile" dirsep="${file.separator}" 
pathsep="${path.separator}">
-      <path 
path="${build.webapp.dir}/editwizards/data/config/${cleaned_filename}" />
-    </pathconvert>
-    <echo>Destfile: ${destfile}</echo>
-    <if>
-      <available file="${destfile}" />
-      <then>
-        <echo>Merging in extra wizards defs for ${component}: 
${cleaned_filename}</echo>
-        <concat destfile="${destfile}" append="true">
-          <path path="${file}" />
-        </concat>
-      </then>
-      <else>
-        <echo>Copying extra wizards defs for ${component}: 
${cleaned_filename}</echo>
-        <copy file="${file}" tofile="${destfile}" preservelastmodified="true" 
/>
-      </else>
-    </if>
-  </target>
-
-
-  <target name="javadoc">
-    <mkdir dir="${build.dir}/javadoc" />
-    <javadoc destdir="${build.dir}/javadoc">
-      <classpath>
-        <fileset dir="${build.webapp.dir}/WEB-INF/lib">
-          <include name="*.jar" />
-        </fileset>
-        <fileset dir="lib/">
-          <include name="*.jar" />
-        </fileset>
-      </classpath>
-      <fileset dir="src">
-        <include name="**/*.java" />
-      </fileset>
-      <group title="Components" packages="nl.didactor.component.*" />
-    </javadoc>
-  </target>
-
-  <target name="war.name.postfix" unless="war.name.postfix">
-    <property name="tag"         value="$Name:  $" />
-    <if>
-      <contains string="${tag}" substring="Name:  $" />
-      <then>
-        <tstamp />
-        <property name="war.name.postfix"         value="${DSTAMP}_${TSTAMP}" 
/>
-      </then>
-      <else>
-        <!--
-             WTF, I hate Ant
-             2 external libraries and 8 lines to do something completely 
trivial:
-        -->
-        <stringutil string="${tag}" property="tag.length">
-          <length/>
-        </stringutil>
-        <math result="shorter" operand1="${tag.length}" operation="-" 
operand2="2" datatype="int"/>
-        <stringutil string="${tag}" property="tag.name">
-          <substring beginindex="7" endindex="${shorter}" />
-        </stringutil>
-        <property name="war.name.postfix" value=".${tag.name}" />
-      </else>
-    </if>
-    <tstamp />
-    <property name="war.name.postfix"         value="${DSTAMP}_${TSTAMP}" />
-
-  </target>
-
-  <target name="war" depends="webapp,war.name.postfix">
-    <!-- there also exists a 'war' target, why not use it? -->
-    <jar destfile="${war.dir}/${war.name}${war.name.postfix}.war"
-         basedir="${build.webapp.dir}"
-         defaultexcludes="${defaultexcludes}"
-         />
-  </target>
-
-  <!--
-      If you want to precompile the webapplicationn, you need to use Tomcat5, 
and
-      set the property 'tomcat.home' in your properties file
-  -->
-  <target name="precompile" depends="webapp">
-    <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
-      <classpath id="jspc.classpath">
-        <pathelement location="${java.home}/../lib/tools.jar"/>
-        <fileset dir="${tomcat.home}/server/lib">
-          <include name="*.jar"/>
-        </fileset>
-        <fileset dir="${tomcat.home}/common/lib">
-          <include name="*.jar"/>
-        </fileset>
-        <fileset dir="src/core/lib">
-          <include name="*.jar"/>
-        </fileset>
-      </classpath>
-    </taskdef>
-
-    <jasper2
-        validateXml="false"
-        addWebXmlMappings="true"
-        uriroot="${build.webapp.dir}"
-        webXmlFragment="${build.webapp.dir}/WEB-INF/jsp.xml"
-        outputDir="${build.dir}/jspjava" />
-
-    <mkdir dir="${build.dir}/jspclasses" />
-    <javac destdir="${build.dir}/jspclasses"
-           optimize="off"
-           debug="on" failonerror="false"
-           deprecation="off"
-           srcdir="${build.dir}/jspjava"
-           fork="true" memoryMaximumSize="512M">
-      <classpath>
-        <fileset dir="${build.webapp.dir}/WEB-INF/lib">
-          <include name="*.jar"/>
-        </fileset>
-        <fileset dir="${tomcat.home}/common/lib">
-          <include name="*.jar"/>
-        </fileset>
-        <fileset dir="${tomcat.home}/shared/lib">
-          <include name="*.jar"/>
-        </fileset>
-      </classpath>
-      <include name="**" />
-    </javac>
-
-    <jar jarfile="${build.webapp.dir}/WEB-INF/lib/didactor-jsp.jar"
-         includes="**"
-         basedir="${build.dir}/jspclasses" />
-  </target>
-
-  <target name="precompiledwar" depends="precompile,war" />
-
-  <target name="srcdist">
-    <mkdir dir="${build.dir}" />
-    <delete file="${build.dir}/didactor-src.zip" quiet="true"/>
-    <zip
-        defaultexcludes="${defaultexcludes}"
-        destfile="${build.dir}/didactor-src.zip"
-        basedir=".">
-      <includesfile name="sourcedistfiles.properties" />
-      <include name="lib/**"/>
-      <include name="*.xml" />
-      <include name="*.xslt" />
-      <include name="README.txt" />
-      <zipfileset dir="." includes="configure.properties.srcdist" 
fullpath="configure.properties" />
-      <zipfileset dir="." includes="build.properties.srcdist" 
fullpath="build.properties" />
-    </zip>
-  </target>
+  <import file="build18.xml" />
 
 </project>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to