Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD2E87121 for ; Wed, 20 Jul 2011 07:59:59 +0000 (UTC) Received: (qmail 82584 invoked by uid 500); 20 Jul 2011 07:59:59 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 82545 invoked by uid 500); 20 Jul 2011 07:59:49 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 82500 invoked by uid 99); 20 Jul 2011 07:59:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 07:59:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Jul 2011 07:59:29 +0000 Received: (qmail 21934 invoked from network); 20 Jul 2011 07:59:07 -0000 Received: from unknown (HELO ?192.168.1.98?) (194.158.197.10) by vorsha.objectstyle.org with SMTP; 20 Jul 2011 07:59:07 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Found cgen documentation error From: Andrus Adamchik In-Reply-To: <86ED3E6D-4576-42D5-AD15-217887F0066D@apple.com> Date: Wed, 20 Jul 2011 10:59:06 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <0D226D73-A583-4260-B1CA-B68DF49FF867@objectstyle.org> References: <86ED3E6D-4576-42D5-AD15-217887F0066D@apple.com> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org On Jul 20, 2011, at 10:48 AM, Joseph Senecal wrote: > The page: http://cayenne.apache.org/doc/cgen.html > 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": http://cayenne.apache.org/doc/maven2-cgen.html > 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:=20 >=20 > 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. >=20 > 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: =09 ${project.build.sourceDirectory}/../templates/mytemplate.vm =20 ${project.build.sourceDirectory} 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. Andrus=