Therefore, I could not get it to work without the undocumented propertiesFile . Here is the version that works for me. Also, specifying a persistence unit through # makes it fail with a NullReferenceException.
<target name="enhance"> <taskdef name="openjpac" classname="org.apache.openjpa.ant.PCEnhancerTask"> <classpath refid="library.openjpa.classpath"/> </taskdef> <openjpac> <classpath refid="library.openjpa.classpath"/> <classpath location="${reporting.output.dir}"/> <config propertiesFile = "${basedir}/src/META-INF/persistence.xml"/> </openjpac> </target>
source share