cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: vppconfig - cgen question
Date Mon, 20 Sep 2010 21:01:17 GMT
Here's a more explicit example.  But to answer your specific questions...

> 1) loaderref="aclasspathloader" from the first and second<typedef>

it's a refid to an ant path, probably containing your velocity tool classes.

> 2) <tool key="myToolName" className="org.myDomain.MyTool" /> -  in the
> tutorial myToolName and className would be replace by what classes??
> untiledDomainMap.java ??

By whatever set of tools you want to load into the environment.

http://velocity.apache.org/tools/devel/



	<property name="tool.classpath"
value="${framework-cayenne.base.dir}/classes-velocity-tools"/>

    <!-- classpath -->
    <path id="vpp.loader.classpath">
    	<path refid="framework-cayenne-build.classpath"/>
        <pathelement path="${tool.classpath}"/>
    </path>

	<typedef
        loaderref="vpp.loader.classpath.loader"
		resource="org/objectstyle/cayenne/tools/antlib.xml">
	    <classpath refid="vpp.loader.classpath"/>
	</typedef>
    <typedef name="vppconfig"
         classname="foundrylogic.vpp.VPPConfig"
         loaderref="vpp.loader.classpath.loader">
         <classpath refid="vpp.loader.classpath"/>
    </typedef>

	<typedef name="entityPackageTool"
		className="com.xyz.velocity.tool.EntityPackageTool"
		loaderref="vpp.loader.classpath.loader">
		 <classpath refid="vpp.loader.classpath"/>
	</typedef>


On Mon, Sep 20, 2010 at 4:50 PM, bogdan_voloshincu
<bogdan_voloshincu@yahoo.com> wrote:
>
> Hello ! I try to invoke a cgen task programmatically but i get this error
> :--- referenced object is not a VPPConfig so i fallow the example from the
> cayenne site : http://cayenne.apache.org/doc12/cgen.html
>
>
>      "Here is an example of using CGen with vppconfig:
>
> <typedef
>    resource="org/objectstyle/cayenne/tools/antlib.xml">
>    loaderref="aclasspathloader"
>    <classpath refid="aclasspath"/>
> </typedef>
>
> <typedef name="vppconfig"
>    classname="foundrylogic.vpp.VPPConfig"
>    loaderref="aclasspathloader">
>    <classpath refid="aclasspath"/>
> </typedef>
>
> <vppconfig id="myconfig">
>    <context>
>        <property key="myPropertyName" value="myPropertyValue" />
>        <tool key="myToolName" className="org.myDomain.MyTool" />
>    </context>
> </vppconfig>
>
> <cgen map="src/datamap.xml"
>    destDir="src/doc/web"
>    makepairs="false"
>    usepkgpath="false"
>    template="EntityReport.vm"
>    includeEntities="Artist*"
>    outputPattern="*Report.html">
>    <config refid="myconfig" />
> </cgen>
> "
>
> but i can't i can't figure out what is the :
>
> 1) loaderref="aclasspathloader" from the first and second<typedef>
>
> 2) <tool key="myToolName" className="org.myDomain.MyTool" /> -  in the
> tutorial myToolName and className would be replace by what classes??
> untiledDomainMap.java ??
>
>
>
>
> Thank's
>
>
>
> --
> View this message in context: http://cayenne.195.n3.nabble.com/vppconfig-cgen-question-tp1531454p1531454.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
>

Mime
View raw message