[XDoclet-JIRA] Commented: (XDT-1616) If invoked twice springdoclet ignores destDir attribute

"Chris Nappin (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.xdoclet.devel
Message-ID <[email protected]>
    [ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1616?page=comments#action_17513 ] 

Chris Nappin commented on XDT-1616:
-----------------------------------

Please ignore my third comment, this was actually due to Ant not copying files. Adding "overwrite=true" to the copy task fixes this.

A simpler work around that appears to work for me is to use a common merge and dest dir, and split each call into a dependent sub-target. But your mileage may vary...  

> If invoked twice springdoclet ignores destDir attribute
> -------------------------------------------------------
>
>          Key: XDT-1616
>          URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1616
>      Project: XDoclet
>         Type: Bug

>   Components: Spring Module
>     Versions: 1.2.3
>  Environment: Windows XP, JDK 1.4.2, Spring 1.2.5, Ant 1.6.1
>     Reporter: Chris Nappin
>     Assignee: xdoclet-devel (Use for new issues)

>
>
> If "springdoclet" is invoked twice, with different "destDir" attribute values, then on the second invocation the attribute value is ignored and the first one is used.
> For example:
>     <target name="springdoclet">
>         <taskdef name="springdoclet" classpathref="ant.path"
>          classname="xdoclet.modules.spring.SpringDocletTask"/>
>         
>         <!-- copy the application context merge files -->
>         <copy file="${config}/application-beans.xml" 
>          tofile="${build.springdoclet.application}/spring-beans.xml"/>
>         
>         <!-- Generate the top level Spring application context -->
>         <springdoclet destDir="${build.springdoclet.application}"
>             mergeDir="${build.springdoclet.application}">
>             <fileset dir="${admin.java}">
>                 <exclude name="com/abmuk/oms/admin/control/**/*Controller.java"/>
>             </fileset>
>             <springxml destinationFile="applicationContext.xml" validateXML="true"/>
>         </springdoclet>
>         
>         <!-- copy the dispatcher merge files -->
>         <copy file="${config}/dispatcher-beans.xml" 
>          tofile="${build.springdoclet.dispatcher}/spring-beans.xml"/>
>         
>         <!-- Generate the Spring dispatcher context -->
>         <springdoclet destDir="${build.springdoclet.dispatcher}" 
>          mergeDir="${build.springdoclet.dispatcher}">
>             <fileset dir="${admin.java}">
>                 <include name="com/abmuk/oms/admin/control/**/*Controller.java"/>
>             </fileset>
>             <springxml destinationFile="dispatcher-servlet.xml" validateXML="true"/>
>         </springdoclet>
>     </target>
> The file "dispatcher-servlet.xml" is created in the directory corresponding to ${build.springdoclet.application}, not ${build.springdoclet.dispatcher} as expected. If the first "springdoclet" call is commented out, then the file is created in the expected directory.
> Note that specifying the destDir on the "springxml" task instead of the "springdoclet" task causes an error (destDir is mandatory on springdoclet), contrary to the XDoclet 1.2.3 documentation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.