On Fri, 2005-07-08 at 16:04, raj cheek wrote: > I am not able to to merge the xml files > "ejb-security-roles.xml" and > "weblogic-security-role-assignment.xml" > into the deployment descriptors ejb-jar.xml and > weblogic-ejb-jar.xml > using the EJBDoclet task. > > I don't see any of the content in the xmls > "ejb-security-roles.xml" and > "weblogic-security-role-assignment.xml" > added to my deployment descriptors ejb-jar.xml and > weblogic-ejb-jar.xml. > > My xml files are in samples.conf.dir and I am using a > mergeDir attribute to point to it in the ejbdoclet > task.
Pardon me if I'm asking the obvious, but when you say "samples.conf.dir", do you mean that's literally the name of the directory you've put them in, or just the name of the Ant property containing the location (as indicated by the "${}" characters). Without the rest of the build script, I can't see if it's defined okay. > Following is my ant script. > <ejbdoclet > destdir="${samples.gen-src.dir}" > excludedtags="@version,@author,@todo" > addedtags="@xdoclet-generated at ${TODAY},@copyright > The XDoclet Team,@author XDoclet,@version ${version}" > mergeDir="${samples.conf.dir}" > ejbspec="2.0" > force="true" > verbose="true"> > > Should I define anything else corresponding to this > merge files in my EJBs. > I have defined in my MDB the following descriptors. > * @xdoclet.merge-file > * file="weblogic-security-role-assignment.xml" > * relates-to="weblogic-ejb-jar.xml" > * description="An XML unparsed entity containing > security-role-assignment elements." > * > * @xdoclet.merge-file > * file="ejb-security-roles.xml" > * relates-to="ejb-jar.xml" > * description="An XML unparsed entity containing > role-name elements." No, you don't need to use any @xdoclet.merge-file tags, and putting it in your bean code won't actually do anything. That tag is only used by XDoclet's own build scripts to generate documentation of the subtasks (by running XDoclet over its own source files!). That's what produced the "Merge Files" section in the docs at e.g. http://xdoclet.sourceforge.net/xdoclet/ant/xdoclet/modules/bea/wls/ejb/WebLogicSubTask.html There's nothing in the EJB module's templates that says "if there's a @xdoclet.merge-file tag in the bean class then merge the specified file here". The weblogic-security-role-assignment.xml merge point doesn't appear to be inside any version checks or anything like that, and there's no {0} in the name so it won't need to follow the package hierarchy like the per-bean ones do; all you should need to do it place a file of that name in the merge directory root, as specified by the mergedir parameter. Try outputting that value in your build script (with <echo message="${samples.conf.dir}"/>), just before the ejbdoclet call, to make sure it really is looking in the right place. As far as I know, the subtasks will inherit whatever's specified on the doclet task. However, if that's not working for you, try putting it on the subtasks as well. > I have mentioned some of the role names in > "ejb-security-roles.xml" in the following way. > <security-role> > <role-name>resource</role-name> > </security-role> > > and in "weblogic-security-role-assignment.xml" > > <security-role-assignment> > <role-name>Administrator</role-name> > <principal-name>Fred</principal-name> > <principal-name>system</principal-name> > </security-role-assignment> You sure those are right? I'd have expected the role names to match up (though, since I've never used weblogic myself, I could be wrong about that). That wouldn't stop them being included in the generated DDs, though it might stop them deploying to the server. > I am currently running Ant 1.6.2 w/ XDoclet 1.2.3 on > Win2000 with JDK 1.4.2_08. > > If anyone could point me in the right direction, I > would be extremely appreciative. Can you build the samples that come in the distribution archive? I believe there's a weblogic-security-role-assignment.xml merge file in those; does that get included okay? If so, the problem has to be some difference between the samples' environment & build script and your own. Andrew. -- ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ xdoclet-user mailing list xdoclet-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-user