up !
I really want to understand, please, explain me :-)
On Sep 9, 2009, at 10:11 , Jean-Baptiste BRIAUD -- Novlog wrote:
Hi the list,
As soon as I try to use openjpac with ant to have built-time
enhancement, it had worked fine.
I try after that to have an learning/optimisation phase where I
could reduce classpath and dependency to the stric minimum.
Basically, its working but I'd like to understand why :-)
1. Why was it needed to include my own classes in the classpath of
the taskdef ?
<taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask">
<classpath>
<fileset dir="../common/lib/openjpa">
<include name="**/*.jar"/>
</fileset>
<fileset dir="../common/lib/jpa">
<include name="**/*.jar"/>
</fileset>
<pathelement location="blablabla/classes"/> //// why is that
line needed ?
</classpath>
</taskdef>
2. I was not able to make the taskdef outside the task who used it.
<target name="ehance">
<taskdef must be here, why can't I put it outside the target ?
<openjpac ...
3. The only way I was able to make it work was use the same
classpath for both taskdef and openjpac, why ?
I'm not discussing about ant and I know it could be less verbose by
using <classpath refid=
I want to understand why apparently redondant information have to be
provide.
<taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask">
<classpath>
<fileset dir="../common/lib/openjpa">
<include name="**/*.jar"/>
</fileset>
<fileset dir="../common/lib/jpa">
<include name="**/*.jar"/>
</fileset>
<pathelement location="blablabla/classes"/>
</classpath>
</taskdef>
<openjpac>
<config propertiesFile="../common/src/persistence.xml"/>
<classpath> /// Why do I have to add openjpa here ? I already
said that in the taskdef
<fileset dir="../common/lib/openjpa">
<include name="**/*.jar"/>
</fileset>
<fileset dir="../common/lib/jpa">
<include name="**/*.jar"/>
</fileset>
<pathelement location="blablabla/classes"/>
</classpath>
</openjpac>