From: <jbo...@li...> - 2005-08-15 15:38:32
|
Author: aron.gombas Date: 2005-08-15 11:36:56 -0400 (Mon, 15 Aug 2005) New Revision: 854 Added: trunk/labs/kosmos/build/deploy.xml trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties trunk/labs/kosmos/build/portlet-pluto-deploy.properties trunk/labs/kosmos/build/server-jboss-as-deploy.properties trunk/labs/kosmos/build/server-tomcat-deploy.properties Modified: trunk/labs/kosmos/build/build.xml trunk/labs/kosmos/build/portlet-module.properties trunk/labs/kosmos/build/server-module.properties Log: Update build script, initial checkin for deploy script Modified: trunk/labs/kosmos/build/build.xml =================================================================== --- trunk/labs/kosmos/build/build.xml 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/build.xml 2005-08-15 15:36:56 UTC (rev 854) @@ -9,25 +9,27 @@ <!-- $Id$ --> <project basedir="." default="redeploy" name="Kosmos"> <description>Kosmos build-script template used by the module-dependent build-scripts</description> - - <property file="build/kosmos-project.properties"/> - <property name="module.name.short" value="${project.name.short}-${module.name}"/> - <property name="module.name.full" value="${project.name.short}-${module.name}-${project.version}"/> - <!-- External paths --> + <!-- external paths --> <property name="docbook.dir" location="/Java/docbook-xsl-1.69.0"/> <property name="fop.dir" location="/Java/fop-0.20.5"/> <property name="saxon.dir" location="/Java/saxonb-8.5"/> - <!-- Generated paths --> + <!-- read basic properties --> <property environment="env"/> + <property file="build/kosmos-project.properties"/> + <property file="build/${module.name}-module.properties"/> + <property name="module.name.short" value="${project.name.short}-${module.name}"/> + <property name="module.name.full" value="${project.name.short}-${module.name}-${project.version}"/> + + <!-- generated paths --> <property name="build.dir" location="build"/> <property name="conf.dir" location="conf-${module.name}"/> <property name="src.dir" location="src"/> <property name="web.dir" location="web-${module.name}"/> <property name="xdocs.dir" location="xdocs"/> - <property name="reference.dir" location="${xdocs.dir}/reference"/> + <property name="war.name" value="${module.name.short}.war"/> <property name="container.dir" location="${env.JBOSS_HOME}/server/default/deploy/${war.name}"/> @@ -35,7 +37,7 @@ <property name="dist-bin.root.dir" location=".dist-bin-${module.name}"/> <property name="dist-bin.dir" location="${dist-bin.root.dir}/${module.name.full}"/> - <property name="dist-bin.bin.dir" location="${dist-bin.dir}/${war.name}"/> + <property name="dist-bin.bin.dir" location="${dist-bin.dir}/${war.name}-expanded"/> <property name="dist-bin.classes.dir" location="${dist-bin.bin.dir}/WEB-INF/classes"/> <property name="dist-bin.docs.reference.dir" location="${dist-bin.dir}/docs/reference"/> @@ -43,7 +45,7 @@ <property name="dist-src.dir" location="${dist-src.root.dir}/${module.name.full}"/> <property name="dist-src.docs.api.dir" location="${dist-src.dir}/docs/api"/> - <!-- Targets --> + <!-- targets --> <target name="init"> <echo message="============================================================"/> <echo message="${project.name} - ${module.name} ${project.version}"/> @@ -99,7 +101,7 @@ </copy> <!-- copy container-dependent resources --> <copy todir="${container.dir}/WEB-INF"> - <fileset dir="${conf.dir}/jboss-portal"/> + <fileset dir="${conf.dir}/${container.name}"/> </copy> <!-- it doesn't restart the container! --> </target> @@ -139,42 +141,53 @@ <target name="dist-src" depends="init,clean,javadocs" description="Prepares all source distributables"> <mkdir dir="${dist-src.dir}"/> - <!-- copy all resources --> - <copy todir="${dist-src.dir}" file="build-${module.name}.xml"/> - <copy todir="${dist-src.dir}/build"> + <!-- copy other resources --> + <copy todir="${dist-src.dir}"> + <fileset dir="." includes="build-${module.name}.xml,deploy-${module.name}-*.xml"/> + </copy> + <copy todir="${dist-src.dir}/build"> <fileset dir="${build.dir}"/> </copy> - <copy todir="${dist-src.dir}/conf-${module.name}"> + <copy todir="${dist-src.dir}/conf-${module.name}"> <fileset dir="${conf.dir}"/> </copy> - <copy todir="${dist-src.dir}/src"> - <fileset dir="${src.dir}"/> + <copy todir="${dist-src.dir}/src"> + <fileset dir="${src.dir}"/> </copy> - <copy todir="${dist-src.dir}/web-${module.name}"> - <fileset dir="${web.dir}"/> + <copy todir="${dist-src.dir}/web-${module.name}"> + <fileset dir="${web.dir}"/> </copy> - <copy todir="${dist-src.dir}/xdocs"> - <fileset dir="${xdocs.dir}"/> - </copy> + <copy todir="${dist-src.dir}/xdocs"> + <fileset dir="${xdocs.dir}"/> + </copy> </target> <target name="dist-bin" depends="init,all,manual-html,manual-pdf" description="Prepares all binary distributables"> + <!-- pack to WAR --> + <war destfile="${dist-bin.dir}/${war.name}" basedir="${dist-bin.bin.dir}" webxml="web-${module.name}/WEB-INF/web.xml"/> + <delete dir="${dist-bin.bin.dir}"/> <!-- copy other resources --> + <copy todir="${dist-bin.dir}"> + <fileset dir="." includes="deploy-${module.name}-*.xml"/> + </copy> + <copy todir="${dist-bin.dir}/build"> + <fileset dir="${build.dir}" excludes="build.xml"/> + </copy> <copy todir="${dist-bin.dir}/conf"> <fileset dir="${conf.dir}"/> </copy> - <copy todir="${dist-bin.dir}"> + <copy todir="${dist-bin.dir}"> <fileset dir="${xdocs.dir}/others" includes="**/*"/> - </copy> + </copy> </target> <target name="dist" depends="dist-src,dist-bin" description="Packs all distributables"> - <mkdir dir="${dist.dir}"/> + <mkdir dir="${dist.dir}"/> <!-- pack --> <zip file="${dist.dir}/${module.name.full}-src.zip" basedir="${dist-src.root.dir}"/> <tar destfile="${dist.dir}/${module.name.full}-src.tar.gz" basedir="${dist-src.root.dir}" compression="gzip" longfile="gnu"/> <!-- pack --> <zip file="${dist.dir}/${module.name.full}.zip" basedir="${dist-bin.root.dir}"/> - <tar destfile="${dist.dir}/${module.name.full}.tar.gz" basedir="${dist-bin.root.dir}" compression="gzip" longfile="gnu"/> + <tar destfile="${dist.dir}/${module.name.full}.tar.gz" basedir="${dist-bin.root.dir}" compression="gzip" longfile="gnu"/> </target> </project> Added: trunk/labs/kosmos/build/deploy.xml =================================================================== --- trunk/labs/kosmos/build/deploy.xml 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/deploy.xml 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Kosmos. + + Distributable under LGPL license. + See terms of license at gnu.org. +--> +<!-- Kosmos deploy-script template --> +<!-- $Id$ --> +<project basedir="." default="redeploy" name="Kosmos"> + <description>Kosmos deploy-script template used by the vendor-dependent deploy-scripts</description> + + <!-- read basic properties --> + <property environment="env"/> + <property file="build/kosmos-project.properties"/> + <property file="build/${module.name}-module.properties"/> + <property name="war.name" value="${project.name.short}-${module.name}.war"/> + <property file="build/${module.name}-${container.name}-deploy.properties"/> + + <!-- generated paths --> + <property name="conf.dir" location="conf"/> + + <!-- targets --> + <target name="init"> + <echo message="============================================================"/> + <echo message="${project.name} - ${module.name} ${project.version}"/> + <echo message="Copyright 2005 (C) Midori"/> + <echo message="============================================================"/> + </target> + + <target name="deploy" depends="init" description="Deploys the portlet to the container"> + <echo message="Deploying to ${container.name} at ${container.dir}"/> + <mkdir dir="${container.dir}"/> + <!-- expand WAR --> + <unzip src="${war.name}" dest="${container.dir}"/> + <!-- copy container-dependent resources --> + <copy todir="${container.dir}/WEB-INF"> + <fileset dir="${conf.dir}/${container.name}"/> + </copy> + <!-- it doesn't restart the container! --> + </target> + + <target name="undeploy" depends="init" description="Undeploys the portlet from the container"> + <!-- it doesn't stop the container! --> + <delete dir="${container.dir}"/> + </target> + + <target name="redeploy" depends="undeploy,deploy" description="Redeploys the portlet to the container"/> +</project> Added: trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties =================================================================== --- trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/portlet-jboss-portal-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.JBOSS_HOME}/server/default/deploy/${war.name} + Modified: trunk/labs/kosmos/build/portlet-module.properties =================================================================== --- trunk/labs/kosmos/build/portlet-module.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/portlet-module.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -1,3 +1,2 @@ -module.name=portlet module.src-exclude=**/server/** Added: trunk/labs/kosmos/build/portlet-pluto-deploy.properties =================================================================== --- trunk/labs/kosmos/build/portlet-pluto-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/portlet-pluto-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.CATALINA_HOME}/webapps/${war.name} + Added: trunk/labs/kosmos/build/server-jboss-as-deploy.properties =================================================================== --- trunk/labs/kosmos/build/server-jboss-as-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/server-jboss-as-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.JBOSS_HOME}/server/default/deploy/${war.name} + Modified: trunk/labs/kosmos/build/server-module.properties =================================================================== --- trunk/labs/kosmos/build/server-module.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/server-module.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -1,3 +1,2 @@ -module.name=server module.src-exclude=**/portlet/** Added: trunk/labs/kosmos/build/server-tomcat-deploy.properties =================================================================== --- trunk/labs/kosmos/build/server-tomcat-deploy.properties 2005-08-15 14:16:13 UTC (rev 853) +++ trunk/labs/kosmos/build/server-tomcat-deploy.properties 2005-08-15 15:36:56 UTC (rev 854) @@ -0,0 +1,2 @@ +container.dir=${env.CATALINA_HOME}/webapps/${war.name} + |