• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PackageSubstitution with a xdoclet.DocletTask doesn't work

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks !

I'm seriously running into trouble with this problem that's turning me mad.

Here is the elements :

- Using Apache Ant version 1.6.5 compiled on June 2 2005
- Using XDoclet 1.2.2 (or 1.2.3, same result)
- Defined a custom ant target :

<target name="ldapdoclet" description="">

<taskdef name="ldapdoclet"
classname="xdoclet.DocletTask">
<classpath>
<path refid="xdoclet.classpath"/>
</classpath>
</taskdef>

<ldapdoclet
destdir="${basedir}/target/tmp/"
force="true"
excludedtags="@version,@author"
verbose="false">

<packageSubstitution
packages="fr"
substituteWith="com"/>

<fileset dir="src">
<include name="**/*.java"/>
</fileset>


<template
templateFile="etc/xdoclet/modules/web/resources/LDAPEntryTransformer.xdt"
destinationFile="{0}LDAPEntryTransformer.java"
havingClassTag="ldap.entity"
/>

</ldapdoclet>
</target>

- In /src I have 2 java classes that have the @ldap.entity class tag.

SO !

When I run "ant ldapdoclet"
-the two classes (let's call them A and B) I have under the package
fr.zobi.cg99.intra.model
generate 2 files (which content is perfect according to my xdt file)
ALDAPEntryTransformer.java
BLDAPEntryTransformer.java

BUT

those 2 files are STILL in the package
fr.zobi.cg99.intra.model.*

not in
com.zobi.cg99.intra.model.*

as expected, according to the use of <packageSubstitution .../>


I tried many parameters tweak with <packageSubstitution > (even tried to copy it inside my <template> )
but NONE worked. Tried clearing the target directory, recreate the source, copy paste the code, changed xdoclet
version...
According to the documentation, that should work, but it doesn't.

If anyone can help, any advice would be GREATLY appreciated !

Thanks in advance,

Sn.

[ November 23, 2005: Message edited by: Micheline Dax ]
[ November 23, 2005: Message edited by: Bear Bibeault ]
 
Micheline Dax
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I CAN'T believe no ever had that problem... come on, save me, please !
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its been a while since i used xdoclet1.2 Can you try this ?

 
reply
    Bookmark Topic Watch Topic
  • New Topic