[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1533?page=comments#action_17272 ]
tom tibbetts commented on XDT-1533: ----------------------------------- One other thing: To show that fileset was working properly, I used the same fileset tag to zip up the desired files and validated that there were no files in the zip that didn't belong there. > xdoclet seems to be parsing files not included in fileset > --------------------------------------------------------- > > Key: XDT-1533 > URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1533 > Project: XDoclet > Type: Bug > Components: Web Module > Versions: 1.2.2 > Environment: Windows XP. WSAD 5.1 > Reporter: tom tibbetts > Assignee: xdoclet-devel (Use for new issues) > > > I am working on a hibred application (some legacy code and new development). > The legacy code does not understand struts so we wish to exclude this code > from being parsed by xdoclet. The legacy code also contain methods and > fields that are called after what are now Java key words, such as "ASSERT" > and "VOID". > We are using the task shown below. I'm assuming that the fileset that is > defined will only include those java files that reside in packages below > com.xyz.newcode.mortgage.frontend.web.struts. The legacy code resides in > packages below com.xyz.oldcode.mortgage.crs. Obviously, I changed some > package names to protect the company I'm working for, but the example should > still be valid. > <target name="generate_mortgage_struts_config"> > <delete > file="webApplication/WEB-INF/struts/mortgage/struts-config.xml"/> > <delete > file="webApplication/WEB-INF/struts/mortgage/sample-validation.xml"/> > <taskdef name="webdoclet" > classname="xdoclet.modules.web.WebDocletTask"> > <classpath> > <path refid="xdoclet.classpath"/> > <path refid="web.compile.classpath"/> > </classpath> > </taskdef> > <webdoclet destdir="webApplication/WEB-INF" force="true" > mergedir="metadata/mortgage"> > <fileset dir="source" > includes="com/xyz/application/mortgage/frontend/web/struts/**/*.java"> > </fileset> > <strutsconfigxml validatexml="true" version="1.2" > destinationFile="struts/mortgage/struts-config.xml" /> > <strutsvalidationxml > destinationFile="struts/mortgage/sample-validation.xml" /> > </webdoclet> > </target> > The following is the build output for this Task: > generate_mortgage_struts_config: > [delete] Deleting: > C:\view\XYZ_DEV\APPLICATION\webApplication\WEB-INF\struts\mortgage\struts-config.xml > [delete] Deleting: > C:\view\XYZ_DEV\APPLICATION\webApplication\WEB-INF\struts\mortgage\sample-validation.xml > [webdoclet] (XDocletMain.start 47 ) Running > <strutsconfigxml/> > [webdoclet] (TemplateSubTask.engineStarted 805 ) Generating output > 'struts/mortgage/struts-config.xml' using template file > 'jar:file:C:\view\XYZ_DEV\APPLICATION\build\lib\xdoclet-apache-module-1.2.2.jar!/xdoclet/modules/apache/struts/resources/struts_config_xml.xdt'. > [webdoclet] Error parsing File > C:\view\XYZ_DEV\APPLICATION\source\com\xyz\oldcode\crs\common\utilities\Utilities.java:Encountered > "void assert" at line 1885, column 23. > [webdoclet] Was expecting one of: > [webdoclet] "boolean" ... > [webdoclet] "byte" ... > [webdoclet] "char" ... > [webdoclet] "double" ... > [webdoclet] "final" ... > [webdoclet] "float" ... > [webdoclet] "int" ... > [webdoclet] "long" ... > [webdoclet] "private" ... > [webdoclet] "protected" ... > [webdoclet] "public" ... > [webdoclet] "short" ... > [webdoclet] "static" ... > [webdoclet] "transient" ... > [webdoclet] "volatile" ... > [webdoclet] <IDENTIFIER> ... > [webdoclet] "abstract" ... > [webdoclet] "strictfp" ... > [webdoclet] "class" ... > [webdoclet] "interface" ... > [webdoclet] "native" ... > [webdoclet] "synchronized" ... > [webdoclet] "void" <IDENTIFIER> ... > [webdoclet] > [webdoclet] Error parsing File > C:\view\XYZ_DEV\APPLICATION\source\com\xyz\oldcode\crs\frontend\web\operations\exception\WFException.java:Encountered > ";" at line 10, column 47. > [webdoclet] Was expecting one of: > [webdoclet] "abstract" ... > [webdoclet] "boolean" ... > [webdoclet] "byte" ... > [webdoclet] "char" ... > [webdoclet] "class" ... > [webdoclet] "double" ... > [webdoclet] "final" ... > [webdoclet] "float" ... > [webdoclet] "int" ... > [webdoclet] "interface" ... > [webdoclet] "long" ... > [webdoclet] "native" ... > [webdoclet] "private" ... > [webdoclet] "protected" ... > [webdoclet] "public" ... > [webdoclet] "short" ... > [webdoclet] "static" ... > [webdoclet] "synchronized" ... > [webdoclet] "transient" ... > [webdoclet] "void" ... > [webdoclet] "volatile" ... > [webdoclet] "strictfp" ... > [webdoclet] <IDENTIFIER> ... > [webdoclet] "{" ... > [webdoclet] "}" ... > [webdoclet] > [webdoclet] (XDocletMain.start 47 ) Running > <strutsvalidationxml/> > [webdoclet] (TemplateSubTask.engineStarted 805 ) Generating output > 'struts/mortgage/sample-validation.xml' using template file > 'jar:file:C:\view\IL_Online_DEV6\IL_Source\build\lib\xdoclet-apache-module-1.2.2.jar!/xdoclet/modules/apache/struts/resources/validation_xml.xdt'. > BUILD SUCCESSFUL > Total time: 13 seconds > This is the method on Utilties.java that the first error is erroring on: > public static void assert(Category cat,boolean isAssert,String message ) > { > if(false == isAssert) > { > if(null != cat) > { > cat.debug("ASSERT:: assert failed Message=" + > message); > } > } > } -- 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 ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel