Hi

Just as an extra here is my ant task in NetBeans, I also override the
-post-jar target as well.

<target name="-pre-jar">
        <taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask" > <classpath>
                <pathelement location="${build.classes.dir}"/>
                <pathelement path="${javac.classpath}"/>
            </classpath>
        </taskdef>
        <echo message="openjpa enhancer started"/>
        <openjpac>
            <config propertiesFile="openjpa-dev.xml"/>
            <classpath>
                <pathelement location="${build.classes.dir}"/>
                <pathelement path="${javac.classpath}"/>
            </classpath>
            <fileset dir="${build.classes.dir}">
                <include name="**/*.class"/>
                <exclude name="**/DatabaseConnection.class"/>
                <exclude name="**/DatabaseFunctions.class"/>
            </fileset> 
        </openjpac>
        <echo message="openjpa enhancer finished"/>
    </target>

Thanks

David

On Thu, 18 Jun 2009 11:42:55 -0400 Richard Rak
<richard....@gmail.com> wrote:

> I've attached my build.xml file that I use for Netbeans and have had  
> no issues with it.  It assumes that your Netbeans library is called  
> openjpa for loading the enhancer.
> 
> Here is my build.xml (the important part is within the <target></ 
> target> tags):
> 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="one-entities" default="default" basedir="."  
> xmlns:ejbjarproject="http://www.netbeans.org/ns/j2ee-ejbjarproject/3";>
> 
>      <description>Builds, tests, and runs the project one-entities.</ 
> description>
>      <import file="nbproject/build-impl.xml"/>
> 
>      <target name="-post-compile">
>        <taskdef name="openjpac"  
> classname="org.apache.openjpa.ant.PCEnhancerTask"
>                 classpath="${libs.openjpa.classpath}"/>
> 
>        <openjpac enforcePropertyRestrictions="true"  
> tmpClassLoader="true">
>               <classpath>
>                       <pathelement
> path="${libs.openjpa.classpath}"/> <pathelement
> path="${basedir}/build/jar"/> <pathelement
> path="${basedir}/src/java"/> </classpath>
>          <fileset dir="build/jar">
>            <include name="**/*.class"/>
>          </fileset>
> 
>               <config propertiesFile="src/conf/persistence.xml"/>
>        </openjpac>
>      </target>
> </project>
> 
> If you have any questions, I'll help out as much as I can (sorry it  
> took so long to respond to this thread).
> 
> Regards,
> 
> 
> 
> 
> 
> Richard Rak
> (richard....@gmail.com)
> 
> 
> On 18-Jun-09, at 11:34 AM, Rick Curtis wrote:
> 
> >
> > I don't think many (if any) people around here have NetBeans  
> > experience... so
> > it sounds like you're blazing a trail. I spent an hour this
> > morning trying
> > NB out, and I can't get things working... please let us know
> > if/when you
> > figure out what's going on.
> >
> > Is there a particular reason that you're running on NB? Most of us  
> > around
> > here run Eclipse(I assume).
> >
> > -Rick
> > -- 
> > View this message in context:
> > http://n2.nabble.com/-Newbie--OPenJPA-%281.2.1%29-Enhancement-woes-tp3085661p3114030.html
> > Sent from the OpenJPA Users mailing list archive at Nabble.com.
> >
> 

Reply via email to