are you still using ant or already using maven?

If you use maven, then have a look at the openjpa-maven-plugin [1].

LieGrue,
strub

[1] http://openjpa.apache.org/enhancement-with-maven.html
Please note that we need to tweak this section a bit. The dependency to openjpa 
itself is not needed anymore if you use the org.apache.openjpa version of the 
plugin.



----- Original Message -----
> From: Pawel Veselov <pawel.vese...@gmail.com>
> To: users@openjpa.apache.org
> Cc: 
> Sent: Tuesday, December 27, 2011 4:56 AM
> Subject: PCEnhancer / PCEnhancerTask should take in class path
> 
> Hi.
> 
> after bashing my head for awhile against the PCEnhancer, it looks like it
> really needs a way to take in the class path where to work with entities
> instead of relying on current class path. The problem is with a simple task:
> 
> <target name="openjpa.enhance">
>   <taskdef
>     name="openjpac"
>     classname="org.apache.openjpa.ant.PCEnhancerTask"
>     classpathref="war.classpath"
>   />
> 
>   <openjpac directory="${artifact.output.path}/WEB-INF/classes">
>     <fileset dir="src/java">
>         <include name="com/excelfore/entity/E_*.java"/>
>     </fileset>
>   </openjpac>
> </target>
> 
> The classpath defined in <taskdef> is not used to find the entity classes,
> instead system class loader is used, and that class loader doesn't have
> access to the entity classes. For this task to work, the ant must be
> started with the class path sufficient to reach the entities. Normally,
> during build time, these things don't exist yet, and normally, you would
> expect the enhancer to be a part of a larger build.
> 
> 
> Thank you,
>   Pawel.
>

Reply via email to