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 7DCA26B0D for ; Thu, 21 Jul 2011 11:44:54 +0000 (UTC) Received: (qmail 4827 invoked by uid 500); 21 Jul 2011 11:44:54 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 4616 invoked by uid 500); 21 Jul 2011 11:44: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 4606 invoked by uid 99); 21 Jul 2011 11:44:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jul 2011 11:44:47 +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; Thu, 21 Jul 2011 11:44:37 +0000 Received: (qmail 17908 invoked from network); 21 Jul 2011 11:44:16 -0000 Received: from unknown (HELO ?192.168.1.98?) (194.158.197.10) by vorsha.objectstyle.org with SMTP; 21 Jul 2011 11:44:16 -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: <332BF212-43C2-4533-ACAF-A6D69145363D@apple.com> Date: Thu, 21 Jul 2011 14:44:15 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <901B8069-EDCF-4EFD-A379-B672B7A8126A@objectstyle.org> References: <86ED3E6D-4576-42D5-AD15-217887F0066D@apple.com> <0D226D73-A583-4260-B1CA-B68DF49FF867@objectstyle.org> <332BF212-43C2-4533-ACAF-A6D69145363D@apple.com> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org > Sorry about the false report for a documentation problem. The pages = looked so similar that I thought they were linking to the same page. I = should have looked closer. No worries. I think we need to insert a title header into both pages to = make it more clear. Andrus On Jul 20, 2011, at 8:14 PM, Joseph Senecal wrote: > Thanks! >=20 > I have my custom templates working now :-) >=20 > Sorry about the false report for a documentation problem. The pages = looked so similar that I thought they were linking to the same page. I = should have looked closer. >=20 > Joe >=20 > On Jul 20, 2011, at 12:59 AM, Andrus Adamchik wrote: >=20 >>=20 >> On Jul 20, 2011, at 10:48 AM, Joseph Senecal wrote: >>=20 >>> 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. >>=20 >> 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": >>=20 >> http://cayenne.apache.org/doc/maven2-cgen.html >>=20 >>=20 >>> 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? >>=20 >> I haven't used it in a while, but it should be something like this: >>=20 >> =09 >> ${project.build.sourceDirectory}/../templates/mytemplate.vm =20 >> >>=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. >>=20 >> Andrus >=20 >=20