cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Found cgen documentation error
Date Wed, 20 Jul 2011 07:59:06 GMT

On Jul 20, 2011, at 10:48 AM, Joseph Senecal wrote:

> The page:
> describes a tag: supertemplate
> By activating Maven debuging, I was able to determine that this tag is actually: superTemplate
> And that it is case sensitive.

Actually you are reading the Ant cgen docs. Ant task parameters are case insensitive. The
Maven plugin docs are here and this page correctly shows the name as "superTemplate":

> What I can't determine is what I should put in that tag to have it use my template instead
of the default template. Even though my template is just a copy of the default template, any
use of the superTemplate tag results in an error message and no file generation. Here is the
error message:
> 7/20/11 12:33:26 AM PDT: Build errors for SFS; org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal org.apache.cayenne.plugins:maven-cayenne-plugin:3.1M2:cgen (cgen) on
project SFS: Error generating classes: 
> I've tried putting in the file name relative to the project/pom. I've tried just the
directory that it's in. I've even tried a fully qualified name. None of these worked.
> Has anyone used a custom cgen template? How do you specify it?

I haven't used it in a while, but it should be something like this:

   <superTemplate >${}/../templates/mytemplate.vm</superTemplate>

${} is equal to "yourproject/src/main/java", and the above assumes
you put your templates under  "yourproject/src/main/templates". The location is arbitrary
of course.

View raw message