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: Build time enhancer custom PersistenceProvider
Date Thu, 02 Dec 2010 16:47:52 GMT
I've never tried this particular scenario, but you can set a classpath when
you define the OpenJPA PCEnhancer task and one when you run the task. I'd
guess that you need your provider when the task runs, not when you define it
though.

Something vaguely like this should work :

        <path id="cp">
             <!-- put your classpath entries here -->
        </path>

        <taskdef name="openjpac"
                 classname="org.apache.openjpa.ant.PCEnhancerTask">
            <classpath refid="cp" />
        </taskdef>

        <!-- snip -- >

       <openjpac>
            <classpath refid="cp" />
            <fileset refid="enhance.path.ref" />
            <config log="${openjpa.Log}" />
        </openjpac>

It's probably more correct to have separate classpaths for execution and
task definition but this should help you get started.

-mike

On Thu, Dec 2, 2010 at 3:33 AM, idan <idanmo@gmail.com> wrote:

>
> Hey,
>
> I implemented a custom PersistenceProvider (i need it for injecting
> instances through spring).
> When trying to enhance at build time i'm getting a ClassNotFoundException
> saying my provider is not found.
>
> How can I include additional class path locations for the enhancement task?
>
> Thanks,
> Idan
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Build-time-enhancer-custom-PersistenceProvider-tp5795311p5795311.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>

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