[ http://jira.codehaus.org/browse/XDP-83?page=comments#action_43575 ]
Anatol Pomozov commented on XDP-83: ----------------------------------- Personally I do not use Struts plugin and I could not evaluate your hint. But what I see in tests that plugin could merge several plugins. See struts-plugins.xml file in test directory. For now it contains <root> <plug-in name="foo.bar.baz.Bang"> <some-plugin-child attr="true">value</some-plugin-child> </plug-in> <plug-in name="blurge.glem.Glam"> </plug-in> </root> and result file contains ..... <controller className="blam.blum.Flee"></controller> <message-resources className="blam.blum.Flee" parameter="glem"><child element="true">hi</child></message-resources> <plug-in name="foo.bar.baz.Bang"><some-plugin-child attr="true">value</some-plugin-child></plug-in> <plug-in name="blurge.glem.Glam"></plug-in> .... Seems that test work OK and do exactly what you try to do. Could you please look at the tests (in CVS) and give me feedback on this topic?? > StrutsConfigXMLPlugin merge is broken for struts-plugins.xml when merging > multiple plug-in elements > --------------------------------------------------------------------------------------------------- > > Key: XDP-83 > URL: http://jira.codehaus.org/browse/XDP-83 > Project: XDoclet 2 Plugins > Type: Bug > Versions: ejb-1.0 > Environment: xdoclet 2.0.3/plugins 1.0.1 > Reporter: Renaud Bruyeron > Assignee: Anatol Pomozov > > > It is not possible to merge multiple plugins via the merge feature. This is > because StrutsConfigXMLPlugin.jelly does this: > <!-- plugins merge contents... --> > <j:if > test="${plugin.getMergeFile('struts-plugins.xml').exists()}"> > <x:parse var="plugins" > xml="${plugin.getMergeFile('struts-plugins.xml')}"/> > </j:if> > <jsl:stylesheet select="$plugins"> > <jsl:template match="*" trim="false"> > <jsl:copy> > <jsl:applyTemplates/> > </jsl:copyf> > </jsl:template> > </jsl:stylesheet> > This restricts the merged file to a single <plug-in> element. > I modified it to make it work like so: > <!-- plugins merge contents... --> > <j:if > test="${plugin.getMergeFile('struts-plugins.xml').exists()}"> > <x:parse var="plugins" > xml="${plugin.getMergeFile('struts-plugins.xml')}"/> > </j:if> > <jsl:stylesheet select="$plugins"> > <jsl:template match="*" trim="false"> > <x:copyOf select="plug-in"> > <jsl:applyTemplates/> > </x:copyOf> > </jsl:template> > </jsl:stylesheet> > My merged file looks like this: > <struts-config> > <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> > <set-property > property="pathnames" > > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> > </plug-in> > <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> > <set-property property="contextConfigLocation" > value="/WEB-INF/application-context.xml,/WEB-INF/action-servlet.xml, > /WEB-INF/email-templates.xml"/> > </plug-in> > </struts-config> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ xdoclet-plugins-interest mailing list xdoclet-plugins-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest