/antlets/forrest/src .cvsignore,NONE,1.1 forrest.antproxy.xml,NONE,1.1 xbuild.xml,1.9,1.10
[email protected] Sun, 14 Mar 2004 19:51:58 -0800
| Newsgroups | gmane.comp.krysalis.metamorphosis.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/metamorphosis//antlets/forrest/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv646/forrest/src
Modified Files:
xbuild.xml
Added Files:
.cvsignore forrest.antproxy.xml
Log Message:
Brought forrest.antproxy.xml back so we can override needed properties.
Also use the ant scp and ssh.
--- NEW FILE: .cvsignore ---
usage.xml
--- NEW FILE: forrest.antproxy.xml ---
<?xml version="1.0"?>
<project default="site" basedir="." name="forrest.antproxy" >
<description>
Proxy Forrest targets that run the customized Ant provided with Forrest,
rather than using the invoker's version.
The 'validate' target in forrest.build.xml requires a patched Ant 1.6 to
run. Thus if forrest.build.xml is invoked from a user's script, it will
fail. The solution is to invoke this script's proxy targets, eg:
<![CDATA[
<target name="site" description="Build a static website">
<ant antfile="${forrest.home}/forrest.antproxy.xml" target="site"/>
</target>
]]>
</description>
<property name="build.sysclasspath" value="ignore"/>
<target name="validate" description="Validates XML doc files">
<antcall target="forrest"><param name="target" value="validate"/></antcall>
</target>
<target name="webapp" description="Generates an unpacked webapp">
<antcall target="forrest"><param name="target" value="webapp"/></antcall>
</target>
<target name="war" description="Generates a packaged .war webapp">
<antcall target="forrest"><param name="target" value="war"/></antcall>
</target>
<target name="site" description="Generates static HTML">
<antcall target="forrest"><param name="target" value="site"/></antcall>
</target>
<target name="run" description="Generates static HTML">
<antcall target="forrest"><param name="target" value="run"/></antcall>
</target>
<path id="forrest-classpath">
<fileset dir="${forrest.home}">
<include name="ant/lib/*.jar"/>
<include name="lib/endorsed/*.jar"/>
</fileset>
<pathelement location="${java.home}/../lib/tools.jar"/>
</path>
<target name="forrest">
<!-- override this to set things like memory size.-->
<property name="forrest.jvm.debug" value="" />
<property name="forrest.antlet.jvmarg.mx" value="1000m"/>
<!--Override this to set jvmargs for the coocon call-->
<property name="forrest.jvmargs" value="-Dantlet.placehoder=default"/>
<java classname="org.apache.tools.ant.Main" fork="true">
<classpath refid="forrest-classpath"/>
<jvmarg value="-Xmx${forrest.antlet.jvmarg.mx}" />
<jvmarg value="-Dproject.name=${project.name}" />
<jvmarg value="-Dproject.build-dir=${forrest.antlet.build.dir}" />
<jvmarg value="-Dproject.site-dir=${forrest.antlet.site.dir}" />
<jvmarg value="-Dproject.work-dir=${forrest.antlet.work.dir}" />
<jvmarg value="-Dproject.content-dir=${forrest.antlet.documentation.dir}" />
<jvmarg value="-Dproject.ctxt-dir=${forrest.antlet.ctxt.dir}" />
<jvmarg value="-Dforrest.jvmargs=${forrest.jvmargs}" />
<jvmarg value="${forrest.jvm.debug}" />
<jvmarg value="-Dforrest.home=${forrest.home}"/>
<jvmarg value="-Dbasedir=${basedir}"/>
<jvmarg value="-Djava.endorsed.dirs=${forrest.home}/lib/endorsed${path.separator}${java.endorsed.dirs}"/>
<arg line="-f ${forrest.home}/forrest.build.xml -emacs ${target}"/>
</java>
</target>
</project>
Index: xbuild.xml
===================================================================
RCS file: /cvsroot/metamorphosis//antlets/forrest/src/xbuild.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** xbuild.xml 11 Mar 2004 20:08:28 -0000 1.9
--- xbuild.xml 15 Mar 2004 03:51:56 -0000 1.10
***************
*** 2,149 ****
<project default="site" basedir="." name="forrest.antlet">
-
- <description>wrapper for forrest</description>
-
- <import file="usage.xml"/>
-
- <!-- Standard Properties -->
- <dirname property="forrest.antlet.dir" file="${ant.file.forrest.antlet}"/>
- <property name="forrest.antlet.build.dir" value="${project.build.dir}/forrest"/>
- <mkdir dir="${forrest.antlet.build.dir}"/>
- <property name="forrest.antlet.work.dir" value="${work.dir}/forrest"/>
- <mkdir dir="${forrest.antlet.work.dir}"/>
! <!-- Antlet specific Properties -->
! <property name="forrest.antlet.documentation.dir" value="${project.documentation.dir}" />
! <property name="forrest.antlet.site.dir" value="${forrest.antlet.build.dir}/site" />
! <property name="forrest.antlet.ctxt.dir" value="${forrest.antlet.build.dir}/context" />
! <property name="forrest.antlet.generated.xdocs.dir" location="${forrest.antlet.ctxt.dir}/content/xdocs" />
!
! <target name="site" depends="forrest.init,gen-logos,-copy-generated-html,-copy-src-xdocs" description="Generates static HTML documentation">
! <ant antfile="${forrest.home}/forrest.antproxy.xml" target="site">
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
! <target name="forrest.webapp" depends="forrest.init" description="Generates an unpackaged webapp of the website">
! <ant antfile="${forrest.home}/forrest.antproxy.xml" target="webapp">
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
! <target name="forrest.war" depends="forrest.init" description="Generates a .war file containing the website">
! <ant antfile="${forrest.home}/forrest.antproxy.xml" target="war">
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
!
! <target name="forrest.run" depends="forrest.init" description="Generates a .war file containing the website">
! <ant antfile="${forrest.home}/forrest.antproxy.xml" target="run">
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
! <target name="forrest.validate" depends="forrest.init" description="Validates XML documentation files">
! <ant antfile="${forrest.home}/forrest.antproxy.xml" target="validate">
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
! <target name="forrest.init" depends="forrest.sethome, forrest.home.defined"/>
- <target name="forrest.sethome" depends="forrest.loadenv,forrest.checkenv, forrest.checkhome, forrest.check-build.properties,forrest.check-project.properties, forrest.check-ant.properties, forrest.check-.ant.properties"/>
! <target name="forrest.loadenv" unless="forrest.home.present">
! <property environment="env"/>
! <echo level="verbose">Forrest: Got ${env.FORREST_HOME}</echo>
! </target>
! <target name="forrest.checkenv" if="env.FORREST_HOME">
! <echo level="verbose">Found $FORREST_HOME..</echo>
! <property name="forrest.home" location="${env.FORREST_HOME}"/>
! <echo level="verbose">forrest.home set to ${forrest.home}</echo>
! <available file="${forrest.home}" type="dir" property="forrest.home.present"/>
! </target>
! <target name="forrest.checkhome">
! <available file="${forrest.home}" type="dir" property="forrest.home.present"/>
! <available file="build.properties" type="file" property="build.properties.present"/>
! <available file="project.properties" type="file" property="project.properties.present"/>
! <available file="ant.properties" type="file" property="ant.properties.present"/>
! <available file=".ant.properties" type="file" property=".ant.properties.present"/>
! </target>
! <!-- No we can't extract the commonalities below into an antcall'ed target,
because it wouldn't be able to set forrest.home -->
! <target name="forrest.check-build.properties" unless="forrest.home.present"
if="build.properties.present">
! <echo level="verbose">Forrest: Checking build.properties..</echo>
! <loadproperties srcfile="build.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}" type="dir" property="forrest.home.present"/>
! </target>
! <target name="forrest.check-project.properties" unless="forrest.home.present"
! if="project.properties.present">
! <echo level="verbose">Forrest: Checking project.properties..</echo>
! <loadproperties srcfile="project.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}" type="dir" property="forrest.home.present"/>
! </target>
! <target name="forrest.check-ant.properties" unless="forrest.home.present"
if="ant.properties.present">
! <echo level="verbose">Forrest: Checking ant.properties..</echo>
! <loadproperties srcfile="ant.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}" type="dir" property="forrest.home.present"/>
! </target>
! <target name="forrest.check-.ant.properties" unless="forrest.home.present"
if=".ant.properties.present">
! <echo level="verbose">Forrest: Checking .ant.properties..</echo>
! <loadproperties srcfile=".ant.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}" type="dir" property="forrest.home.present"/>
! </target>
! <target name="forrest.home.defined" depends="forrest.sethome" unless="forrest.home.present">
! <property name="path" value="${user.home}/xml-forrest/build/dist/shbat"/>
! <pathconvert targetos="windows" property="winpath">
! <path>
! <pathelement location="${path}"/>
! </path>
! </pathconvert>
! <pathconvert targetos="unix" property="unixpath">
! <path>
! <pathelement
location="${path}"/>
! </path>
! </pathconvert>
! <echo>
----------------------------------------------
To run this target, you need Forrest installed.
--- 2,227 ----
<project default="site" basedir="." name="forrest.antlet">
! <description>wrapper for forrest</description>
! <import file="usage.xml"/>
! <!-- Standard Properties -->
! <dirname property="forrest.antlet.dir" file="${ant.file.forrest.antlet}"/>
! <property name="forrest.antlet.build.dir"
! value="${project.build.dir}/forrest"
! />
! <mkdir dir="${forrest.antlet.build.dir}"/>
! <property name="forrest.antlet.work.dir" value="${work.dir}/forrest"/>
! <mkdir dir="${forrest.antlet.work.dir}"/>
! <!-- Antlet specific Properties -->
! <property name="forrest.antlet.documentation.dir"
! value="${project.documentation.dir}"
! />
! <property name="project.build-dir"
! value="${forrest.antlet.build.dir}"
! />
! <property name="forrest.antlet.site.dir"
! value="${forrest.antlet.build.dir}/site"
! />
! <property name="forrest.antlet.ctxt.dir"
! value="${forrest.antlet.build.dir}/context"
! />
! <property name="forrest.antlet.generated.xdocs.dir"
! location="${forrest.antlet.ctxt.dir}/content/xdocs"
! />
! <target name="site"
! depends="forrest.init,gen-logos,-copy-generated-html,-copy-src-xdocs"
! description="Generates static HTML documentation"
! >
! <ant antfile="${forrest.antlet.dir}/forrest.antproxy.xml"
! target="site"
! inheritall="true"
! >
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
! <target name="forrest.webapp"
! depends="forrest.init"
! description="Generates an unpackaged webapp of the website"
! >
! <ant antfile="${forrest.antlet.dir}/forrest.antproxy.xml"
! target="webapp"
! >
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
+ <target name="forrest.war"
+ depends="forrest.init"
+ description="Generates a .war file containing the website"
+ >
+ <ant antfile="${forrest.antlet.dir}/forrest.antproxy.xml" target="war">
+ <property name="build.sysclasspath" value="ignore"/>
+ </ant>
+ </target>
! <target name="forrest.run"
! depends="forrest.init"
! description="Generates a .war file containing the website"
! >
! <ant antfile="${forrest.antlet.dir}/forrest.antproxy.xml" target="run">
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
! <target name="forrest.validate"
! depends="forrest.init"
! description="Validates XML documentation files"
! >
! <ant antfile="${forrest.antlet.dir}/forrest.antproxy.xml"
! target="validate"
! >
! <property name="build.sysclasspath" value="ignore"/>
! </ant>
! </target>
!
! <target name="forrest.init"
! depends="forrest.sethome, forrest.home.defined"
! />
!
! <target name="forrest.sethome"
! depends="forrest.loadenv,forrest.checkenv, forrest.checkhome, forrest.check-build.properties,forrest.check-project.properties, forrest.check-ant.properties, forrest.check-.ant.properties"
! />
!
! <target name="forrest.loadenv" unless="forrest.home.present">
! <property environment="env"/>
! <echo level="verbose">Forrest: Got ${env.FORREST_HOME}</echo>
! </target>
!
! <target name="forrest.checkenv" if="env.FORREST_HOME">
! <echo level="verbose">Found $FORREST_HOME..</echo>
! <property name="forrest.home" location="${env.FORREST_HOME}"/>
! <echo level="verbose">forrest.home set to ${forrest.home}</echo>
! <available file="${forrest.home}"
! type="dir"
! property="forrest.home.present"
! />
! </target>
!
!
! <target name="forrest.checkhome">
! <available file="${forrest.home}"
! type="dir"
! property="forrest.home.present"
! />
! <available file="build.properties"
! type="file"
! property="build.properties.present"
! />
! <available file="project.properties"
! type="file"
! property="project.properties.present"
! />
! <available file="ant.properties"
! type="file"
! property="ant.properties.present"
! />
! <available file=".ant.properties"
! type="file"
! property=".ant.properties.present"
! />
! </target>
!
! <!-- No we can't extract the commonalities below into an antcall'ed target,
because it wouldn't be able to set forrest.home -->
! <target name="forrest.check-build.properties" unless="forrest.home.present"
if="build.properties.present">
! <echo level="verbose">Forrest: Checking build.properties..</echo>
! <loadproperties srcfile="build.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}"
! type="dir"
! property="forrest.home.present"
! />
! </target>
! <target name="forrest.check-project.properties"
! unless="forrest.home.present"
! if="project.properties.present"
! >
! <echo level="verbose">Forrest: Checking project.properties..</echo>
! <loadproperties srcfile="project.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}"
! type="dir"
! property="forrest.home.present"
! />
! </target>
! <target name="forrest.check-ant.properties" unless="forrest.home.present"
if="ant.properties.present">
! <echo level="verbose">Forrest: Checking ant.properties..</echo>
! <loadproperties srcfile="ant.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}"
! type="dir"
! property="forrest.home.present"
! />
! </target>
! <target name="forrest.check-.ant.properties" unless="forrest.home.present"
if=".ant.properties.present">
! <echo level="verbose">Forrest: Checking .ant.properties..</echo>
! <loadproperties srcfile=".ant.properties">
! <filterchain>
! <linecontains>
! <contains value="forrest.home"/>
! </linecontains>
! </filterchain>
! </loadproperties>
! <available file="${forrest.home}"
! type="dir"
! property="forrest.home.present"
! />
! </target>
! <target name="forrest.home.defined"
! depends="forrest.sethome"
! unless="forrest.home.present"
! >
! <property name="path"
! value="${user.home}/xml-forrest/build/dist/shbat"
! />
! <pathconvert targetos="windows" property="winpath">
! <path>
! <pathelement location="${path}"/>
! </path>
! </pathconvert>
! <pathconvert targetos="unix" property="unixpath">
! <path>
! <pathelement
location="${path}"/>
! </path>
! </pathconvert>
! <echo>
----------------------------------------------
To run this target, you need Forrest installed.
***************
*** 168,245 ****
----------------------------------------------
</echo>
! <fail message="Need to define $${forrest.home}"/>
! </target>
! <!-- additional task for cent integration. -->
! <!-- Copy the src/documentation dir to build so that generated and static content is integrated -->
! <target name="-copy-src-xdocs">
! <echo message="Copy src/documentation to build"/>
! <copy todir="${build.dir}/documentation" filtering="off">
! <fileset dir="${forrest.antlet.documentation.dir}"/>
! </copy>
! </target>
! <!--Copy genreated html from the ${project.build.dir}/docs for inclusion in the site. -->
! <target name="-copy-generated-html">
! <echo message="Copy generated html"/>
! <mkdir dir="${project.build.dir}/docs"/>
! <copy todir="${forrest.antlet.ctxt.dir}/content" filtering="off">
! <fileset dir="${project.build.dir}/docs">
! <include name="**/*"/>
! </fileset>
! </copy>
! </target>
! <target name="forrest.docs" depends="site">
! <echo message="Deprecated use site"/>
!
! </target>
! <target name="deploysite" >
! <if>
<not><isset property="deployer.username"/></not>
<then>
<input addproperty="deployer.username">username</input>
</then>
! </if>
! <property name="forrest.antlet.site.work.dir" value="${forrest.antlet.work.dir}/site/"/>
! <delete dir="${forrest.antlet.site.work.dir}"/>
! <mkdir dir="${forrest.antlet.site.work.dir}"/>
! <property name="forrest.antlet.site.tar.path.and.name" value="${forrest.antlet.site.work.dir}/${project.name}-site"/>
! <tar tarfile="${forrest.antlet.site.tar.path.and.name}.tar" basedir="${forrest.antlet.site.dir}"/>
! <gzip zipfile="${forrest.antlet.site.tar.path.and.name}.tar.gz" src="${forrest.antlet.site.tar.path.and.name}.tar"/>
! <delete file="${forrest.antlet.site.tar.path.and.name}.tar"/>
! <exec dir="${forrest.antlet.site.work.dir}" executable="scp">
! <arg value="${project.name}-site.tar.gz"/>
! <arg value="${deployer.username}@${xgump.module.site.hostname}:${xgump.module.site.remotedir}"/>
! </exec>
- <exec dir="." executable="ssh">
- <arg line="-n ${xgump.module.site.hostname} -l ${deployer.username} 'cd ${xgump.module.site.remotedir};gunzip ${project.name}-site.tar.gz;tar xUvf ${project.name}-site.tar;chmod -R g+rwX *;rm ${project.name}-site.tar'"/>
- </exec>
! <delete file="${forrest.antlet.site.tar.path.and.name}.tar.gz"/>
! </target>
!
!
! <target name="gen-logos" description="Generate Default Project Logos" >
!
! <xslt basedir="${basedir}"
out="${forrest.antlet.documentation.dir}/resources/images/project-logo.svg"
in="module.xml"
force ="true"
style="${forrest.antlet.dir}/resources/transforms/project-logo.xsl">
! <param name="projectName" expression="${project.name}"/>
! </xslt>
!
! </target>
</project>
--- 246,344 ----
----------------------------------------------
</echo>
! <fail message="Need to define $${forrest.home}"/>
! </target>
! <!-- additional task for cent integration. -->
! <!-- Copy the src/documentation dir to build so that generated and static content is integrated -->
! <target name="-copy-src-xdocs">
! <echo message="Copy src/documentation to build"/>
! <copy todir="${build.dir}/documentation" filtering="off">
! <fileset dir="${forrest.antlet.documentation.dir}"/>
! </copy>
! </target>
! <!--Copy genreated html from the ${project.build.dir}/docs for inclusion in the site. -->
! <target name="-copy-generated-html">
! <echo message="Copy generated html"/>
! <mkdir dir="${project.build.dir}/docs"/>
! <copy todir="${forrest.antlet.ctxt.dir}/content" filtering="off">
! <fileset dir="${project.build.dir}/docs">
! <include name="**/*"/>
! </fileset>
! </copy>
! </target>
! <target name="forrest.docs" depends="site">
! <echo message="Deprecated use site"/>
! </target>
! <target name="deploysite" >
!
! <!-- NEed to use the ant 1.6 if>
<not><isset property="deployer.username"/></not>
<then>
<input addproperty="deployer.username">username</input>
</then>
! </if -->
! <property name="forrest.antlet.site.work.dir"
! value="${forrest.antlet.work.dir}/site/"
! />
! <delete dir="${forrest.antlet.site.work.dir}"/>
! <mkdir dir="${forrest.antlet.site.work.dir}"/>
! <property name="forrest.antlet.site.tar.path.and.name"
! value="${forrest.antlet.site.work.dir}/${project.name}-site"
! />
! <tar tarfile="${forrest.antlet.site.tar.path.and.name}.tar"
! basedir="${forrest.antlet.site.dir}"
! />
! <gzip zipfile="${forrest.antlet.site.tar.path.and.name}.tar.gz"
! src="${forrest.antlet.site.tar.path.and.name}.tar"
! />
! <delete file="${forrest.antlet.site.tar.path.and.name}.tar"/>
! <echo message="Deploying site to ${deployer.username}@${xgump.module.site.hostname}:${xgump.module.site.remotedir}"/>
! <!--sshexec host="${xgump.module.site.hostname}"
! username="${deployer.username}"
! password="${deployer.password}"
! command="mkdir ${xgump.module.site.remotedir}"
! trust="true"
! /-->
! <scp file="${forrest.antlet.site.work.dir}/${project.name}-site.tar.gz"
! todir="${deployer.username}@${xgump.module.site.hostname}:${xgump.module.site.remotedir}"
! password="${deployer.password}"
! trust="true"/>
! <sshexec host="${xgump.module.site.hostname}"
! username="${deployer.username}"
! password="${deployer.password}"
! command="cd ${xgump.module.site.remotedir};gunzip ${project.name}-site.tar.gz;tar xUvf ${project.name}-site.tar;chmod -R g+rwX *;rm ${project.name}-site.tar"
! trust="true"
! />
!
!
! <delete file="${forrest.antlet.site.tar.path.and.name}.tar.gz"/>
!
! </target>
!
!
! <target name="gen-logos" description="Generate Default Project Logos" >
!
! <xslt basedir="."
out="${forrest.antlet.documentation.dir}/resources/images/project-logo.svg"
in="module.xml"
force ="true"
style="${forrest.antlet.dir}/resources/transforms/project-logo.xsl">
! <param name="projectName" expression="${project.name}"/>
! </xslt>
!
! </target>
</project>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click