Hello.
I use these commands to run enhancer from ant script:
   <path id="enhancer.classpath">
       <fileset dir="${lib}">
           <include name="**/*.jar"/>
       </fileset>
       <pathelement location="${deploy.classes}"/>
   </path>
   <property file="${working.dir}/jpa_enhance.properties" />
   <java classname="org.apache.openjpa.enhance.PCEnhancer"
       classpathref="enhancer.classpath" fork="true">
       <arg line="${te.jpa.classes}"/>
   </java>

where jpa_enhance.properties contents are:
te.jpa.classes=com.TE.security.Entity com.TE.security.Group

Will it repack my JAR after instrumenting all classes ?

I decided to try ANT route and it's not going very well either. Here is what
I tried:

http://pastebin.com/m4a2e7199

I'm trying to instrument only one class as experiment, but it can't find it
even though I explicitly defined classpath :(

Could you please share working ant configuration file where PCEnhancer works
?

Thank you!!


Michael Dick wrote:
Hi,

It looks like the enhancer can't find persistence.xml - it's expected to
be
in a META-INF/ directory somewhere on your classpath. Have you tried
adding
it to the classpath explicitly? The later errors look like we can't load a
given class file (presumably one that the entity depends on), have you
tried
running with a persistence.xml and a jar with all your entities on the
classpath?

-mike



Reply via email to