diff --git a/openjpa-project/src/doc/manual/ref_guide_integration.xml b/openjpa-project/src/doc/manual/ref_guide_integration.xml
index f164e2cb7..6a3902656 100644
--- a/openjpa-project/src/doc/manual/ref_guide_integration.xml
+++ b/openjpa-project/src/doc/manual/ref_guide_integration.xml
@@ -236,7 +236,9 @@ files that should be processed. You can specify .java or
.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 enhancer task in a build.xml
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"/>
- <!-- invoke enhancer on all .java files below the model directory -->
- <openjpac>
- <fileset dir=".">
- <include name="**/model/*.java" />
- </fileset>
- </openjpac>
+<target name="enhance">
+ <!-- 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/" />
+
+ <!-- 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>
diff --git a/openjpa-project/src/doc/manual/ref_guide_pc.xml b/openjpa-project/src/doc/manual/ref_guide_pc.xml
index ba4f3c0ee..e02817877 100644
--- a/openjpa-project/src/doc/manual/ref_guide_pc.xml
+++ b/openjpa-project/src/doc/manual/ref_guide_pc.xml
@@ -242,6 +242,9 @@ The .class file of a class.
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