Grant, Thanks for beeing up to doing that job. Actually I found the build file on my disk - see attachements. I could also send you the source code and the velocity file. Please tell me if you where not able to get those from the repo.
Some notes: * You can ignore (or eliminate) the "inspect-" tasks. In the early days, they where meant to automatically check the component properties against the RI. Since we have TCK checks anyway now, this no longer is needed or makes sense. * For safety reasons the generator always generates .bak files, which can be deleted by the "clean" task. Perhaps we should make this feature optional, for most people with current IDEs have a local history in their editor anyway. * "generate-single-api-component": Generates or regenerates the "GENERATED CODE" section for a single component in the API source tree. * "generate-single-impl-component": Generates or regenerates the "GENERATED CODE" section for a single component in the Impl source tree. * "generate-single-components-component": Generates or regenerates the "GENERATED CODE" section for a single component in the former components (now tomahawk) source tree. * "generate-components": Generates or regenerates the "GENERATED CODE" section for all components in the API source tree. * "generate-all-components-components": Generates or regenerates the "GENERATED CODE" section for all components in the former components (now tomahawk) source tree. Please feel free to reorganize/refactor everything. The current target naming is inconsistent and we will need a way to generate code for sandbox components as well. Tell me if there is anything I could help. Thanks, Manfred 2005/11/8, Grant Smith <[EMAIL PROTECTED]>: > I'll start on the reimplementation if no-one else has. It would be nice if > someone (Manfred ?) could send me the code for the ant task(s) > (ComponentGeneratorTask). I dont feel like checking out and digging through > all the prior-to-svn-reorg stuff. Is there an open JIRA on this ? > > > On 11/8/05, Bruno Aranda <[EMAIL PROTECTED]> wrote: > > Well, AFAIK there are no plans, at least until JSF 1.2... but if you > > want to be sure just add the attribute to the xml file... > > > > Regards, > > > > Bruno > > > > 2005/11/8, Grant Smith < [EMAIL PROTECTED]>: > > > *, > > > > > > How are the plans to reimplement codegen coming along (are there any)? > The > > > reason I ask is that I'm adding an attribute to some of the extended > > > components, and I get this feeling of dread as my only choice is to > cross > > > the feared "GENERATED CODE BEGIN (do not modify!)" line... > > > > > > > > > -- > > > Grant Smith > > > > > > > > > -- > Grant Smith >
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="myfaces-codegen" default="clean">
<property environment="env"/>
<!-- Constants -->
<property name="project.dir" location="${basedir}/../.."/>
<property name="codgen-src.dir" location="${project.dir}/src/codegen"/>
<property name="jsfapi-src.dir" location="${project.dir}/src/jsfapi"/>
<property name="myfaces-src.dir" location="${project.dir}/src/myfaces"/>
<property name="components-src.dir" location="${project.dir}/src/components"/>
<!-- Properties -->
<property file="build.local.properties"/>
<property file="build.default.properties"/>
<property file="../build.local.properties"/>
<property file="../build.default.properties"/>
<property file="../manifest.properties"/>
<!-- Temporary dir. May be overridden in build.properties -->
<property name="temp.dir" location="${env.TEMP}"/>
<property name="codegen-classes.dir" location="${temp.dir}/myfaces-codegen"/>
<!-- classpath for compiling -->
<path id="codegen.class.path">
<pathelement location="${ant.jar}"/>
<pathelement location="${velocity.jar}"/>
<pathelement location="${jsf-api.jar}"/>
<pathelement location="${commons-logging.jar}"/>
<pathelement location="${codegen-classes.dir}"/>
</path>
<target name="-compile">
<mkdir dir="${codegen-classes.dir}"/>
<javac srcdir="${codgen-src.dir}"
destdir="${codegen-classes.dir}"
optimize="off"
debug="on"
classpathref="codegen.class.path">
</javac>
<copy todir="${codegen-classes.dir}">
<fileset dir="${codgen-src.dir}"
includes="**"
excludes="**/*.java
**/package.html"/>
</copy>
</target>
<target name="inspect-components" depends="-compile" >
<taskdef name="inspect" classname="org.apache.myfaces.codegen.component.ComponentInspectorTask">
<classpath refid="codegen.class.path"/>
</taskdef>
<inspect basedir="${jsfapi-src.dir}"
includes="javax/faces/component/UI*.java,
javax/faces/component/html/*.java"
excludes="javax/faces/component/UIComponent.java"
destdir="${jsfapi-src.dir}"
overwrite="false" />
</target>
<target name="generate-components" depends="-compile" >
<taskdef name="generate" classname="org.apache.myfaces.codegen.component.ComponentGeneratorTask">
<classpath refid="codegen.class.path"/>
</taskdef>
<generate basedir="${jsfapi-src.dir}"
includes="javax/faces/component/*.xml,
javax/faces/component/html/*.xml"
destdir="${jsfapi-src.dir}"
velocityLoaderPath="${codgen-src.dir}/org/apache/myfaces/codegen/resource" />
</target>
<target name="inspect-single-component" depends="-compile" >
<taskdef name="inspect" classname="org.apache.myfaces.codegen.component.ComponentInspectorTask">
<classpath refid="codegen.class.path"/>
</taskdef>
<inspect basedir="${jsfapi-src.dir}"
includes="${single-component}.java"
destdir="${jsfapi-src.dir}"
overwrite="true" />
</target>
<target name="generate-single-api-component" depends="-compile" >
<taskdef name="generate" classname="org.apache.myfaces.codegen.component.ComponentGeneratorTask">
<classpath refid="codegen.class.path"/>
</taskdef>
<generate basedir="${jsfapi-src.dir}"
includes="${single-component}.xml"
destdir="${jsfapi-src.dir}"
velocityLoaderPath="${codgen-src.dir}/org/apache/myfaces/codegen/resource" />
</target>
<target name="generate-single-impl-component" depends="-compile" >
<taskdef name="generate" classname="org.apache.myfaces.codegen.component.ComponentGeneratorTask">
<classpath refid="codegen.class.path"/>
</taskdef>
<generate basedir="${myfaces-src.dir}"
includes="${single-component}.xml"
destdir="${myfaces-src.dir}"
velocityLoaderPath="${codgen-src.dir}/org/apache/myfaces/codegen/resource" />
</target>
<target name="generate-all-components-components" depends="-compile" >
<taskdef name="generate" classname="org.apache.myfaces.codegen.component.ComponentGeneratorTask">
<classpath refid="codegen.class.path"/>
</taskdef>
<generate basedir="${components-src.dir}"
includes="org/apache/myfaces/component/html/ext/*.xml"
destdir="${components-src.dir}"
velocityLoaderPath="${codgen-src.dir}/org/apache/myfaces/codegen/resource" />
</target>
<target name="generate-single-components-component" depends="-compile" >
<taskdef name="generate" classname="org.apache.myfaces.codegen.component.ComponentGeneratorTask">
<classpath refid="codegen.class.path"/>
</taskdef>
<generate basedir="${components-src.dir}"
includes="${single-component}.xml"
destdir="${components-src.dir}"
velocityLoaderPath="${codgen-src.dir}/org/apache/myfaces/codegen/resource" />
</target>
<target name="clean"
description="deletes all temporary files that were created">
<delete quiet="true" failonerror="false" includeEmptyDirs="true">
<fileset dir="${codegen-classes.dir}" />
<fileset dir="${jsfapi-src.dir}"
includes="javax/faces/component/*.bak,
javax/faces/component/html/*.bak" />
</delete>
</target>
</project>
build.default.properties
Description: Binary data
