openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <michael.d.d...@gmail.com>
Subject Re: Ant Enhancer Task not working after upgrading 0.9.7 to 1.0.1
Date Fri, 08 Feb 2008 15:13:59 GMT
Hi Hans,

I'm not sure when / what caused the change, but I think you need to add your
entities to a nested classpath tag inside <openjpac>. Ex :

    <path id="entity.cp">
        <pathelement location="${classes.location}"/>
    </path>

<target name="enhance" depends="compile">
    <taskdef name="openjpac" classname="
org.apache.openjpa.ant.PCEnhancerTask" classpathref="base.classpath" />
    <!-- invoke enhancer on all .java files below the model directory -->
    <openjpac>
        <classpath>
              <path refid="entities.classpath"/>
        </classpath>
        <fileset dir="${classes.dir}">
            <include name="**/model/*.java" />
        </fileset>
    </openjpac>
</target>



-Mike

On Feb 8, 2008 6:50 AM, Hans J. Prueller <hans.prueller@gmx.net> wrote:

>
> hi there,
>
> currently we are working with openJPA 0.9.7 and using the follwing ant
> task for the enhancer at build time:
>
> <target name="enhance" depends="compile">
> <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"
> classpathref="base.classpath" />
> <!-- invoke enhancer on all .java files below the model directory -->
> <openjpac>
> <fileset dir="${classes.dir}">
> <include name="**/model/*.java" />
> </fileset>
> </openjpac>
> </target>
>
> After upgrading to 1.0.1 release, the ant task above doesn't work any more
> - it permanently throws "ClassNotFoundExceptions" on
> the persistent classes.
>
> Is there anything that has to be changed between those 2 releases?
>
> hans
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message