Return-Path: X-Original-To: apmail-openjpa-commits-archive@www.apache.org Delivered-To: apmail-openjpa-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B6219590 for ; Mon, 28 Nov 2011 22:24:57 +0000 (UTC) Received: (qmail 4321 invoked by uid 500); 28 Nov 2011 22:24:57 -0000 Delivered-To: apmail-openjpa-commits-archive@openjpa.apache.org Received: (qmail 4286 invoked by uid 500); 28 Nov 2011 22:24:57 -0000 Mailing-List: contact commits-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list commits@openjpa.apache.org Received: (qmail 4279 invoked by uid 99); 28 Nov 2011 22:24:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 22:24:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 22:24:54 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 634F223888CC for ; Mon, 28 Nov 2011 22:24:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1207658 - in /openjpa/trunk/openjpa-project/src/doc/manual: ref_guide_integration.xml ref_guide_pc.xml Date: Mon, 28 Nov 2011 22:24:33 -0000 To: commits@openjpa.apache.org From: curtisr7@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111128222433.634F223888CC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: curtisr7 Date: Mon Nov 28 22:24:32 2011 New Revision: 1207658 URL: http://svn.apache.org/viewvc?rev=1207658&view=rev Log: OPENJPA-302: Update user manual for PCEnhancer usage. Patch contributed by Jacob Nowosatka. Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_integration.xml openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_integration.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_integration.xml?rev=1207658&r1=1207657&r2=1207658&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_integration.xml (original) +++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_integration.xml Mon Nov 28 22:24:32 2011 @@ -236,7 +236,9 @@ files that should be processed. You can .class files. If you do not specify any files, the task will run on the classes listed in your persistence.xml or -openjpa.MetaDataFactory property. +openjpa.MetaDataFactory property. You must, however, supply the +classpath you wish the enhancer to run with. This classpath must include, at +minimum, the openjpa jar(s), persistence.xml and the target classes. Following is an example of using the enhancer task in a build.xml @@ -247,17 +249,36 @@ Following is an example of using the enh Invoking the Enhancer from Ant + <target name="enhance"> - <!-- define the openjpac task; this can be done at the top of the --> - <!-- build.xml file, so it will be available for all targets --> - <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"/> + <!-- Define the classpath to include the necessary files. --> + <!-- ex. openjpa jars, persistence.xml, orm.xml, and target classes --> + <path id="jpa.enhancement.classpath"> + <!-- Assuming persistence.xml/orm.xml are in resources/META-INF --> + <pathelement location="resources/" /> - <!-- invoke enhancer on all .java files below the model directory --> - <openjpac> - <fileset dir="."> - <include name="**/model/*.java" /> - </fileset> - </openjpac> + <!-- Location of the .class files --> + <pathelement location="bin/" /> + + <!-- Add the openjpa jars --> + <fileset dir="."> + <include name="**/lib/*.jar" /> + </fileset> + </path> + + + <!-- define the openjpac task; this can be done at the top of the --> + <!-- build.xml file, so it will be available for all targets --> + <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask" classpathref="jpa.enhancement.classpath" /> + + <!-- invoke enhancer on all .class files below the model directory --> + <openjpac> + <classpath refid="jpa.enhancement.classpath" /> + <fileset dir="."> + <include name="**/model/*.class" /> + </fileset> + </openjpac> + <echo message="Enhancement complete" /> </target> Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml?rev=1207658&r1=1207657&r2=1207658&view=diff ============================================================================== --- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml (original) +++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml Mon Nov 28 22:24:32 2011 @@ -242,6 +242,9 @@ The .class file of If you do not supply any arguments to the enhancer, it will run on the classes in your persistent class list (see ). +You must, however, supply the classpath you wish the enhancer to run with. This +classpath must include, at minimum, the openjpa jar(s), persistence.xml and +the target classes. You can run the enhancer over classes that have already been enhanced, in which