Thanks! It is working now. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of BOHRA, NINJU [AG-Contractor/1000] Sent: Wednesday, July 25, 2007 12:56 PM To: xmltask-users@lists.sourceforge.net Subject: Re: [Xmltask-users] Comments added to ejb-jar.xml?
I believe there is a 'preserveType' attribute on <xmlTask> that will copy over all the DOCTYPE components. Later, Ninju -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Youmans, Damon Sent: Wednesday, July 25, 2007 11:16 AM To: Brian Agnew Cc: xmltask-users@lists.sourceforge.net Subject: Re: [Xmltask-users] Comments added to ejb-jar.xml? Ok, I misspoke due to some incorrect testing. The comments are not the issue. However, the task removed my DOCTYPE reference from the original XML. This IS required to be in the final XML. Do I have to hard code it to re-add it or can I get it to carry over from the original? Here it is: <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"> Sorry for the confusion.... -----Original Message----- From: Brian Agnew [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 25, 2007 10:29 AM To: Youmans, Damon Cc: xmltask-users@lists.sourceforge.net Subject: Re: [Xmltask-users] Comments added to ejb-jar.xml? I suspect that comment is coming from the DTD related to your ejb-jar.xml and is automatically inserted by the XML infrastructure under XMLTask (XMLTask wouldn't do this unprompted itself). If it's causing you problems (and I'm surprised that it is if it's a valid XML comment), then you can remove it by using XMLTask again. e.g. <remove path="//child::comment()"/> removes all comments. You'll probably want to modify appropriately. I'm still disturbed that you're having problems with a valid XML comment, however! Brian On Wed, July 25, 2007 16:10, Youmans, Damon wrote: > I am using the following XML task to update an ejb-jar.xml file during > ANT assembly. It is working fine for me except the xmltask inserts a > set of comments at the top of the file. With the comments present I > cannot install the EJB on my application server. Manually removing the > comments allows me to install. Any ideas on why there are inserted and > how to suppress? > > > > <xmltask source="${jarSourceDirectory}ejbModule/META-INF/ejb-jar.xml" > dest="c:\tmp\META-INF\ejb-jar.xml"> > <insert > path="/ejb-jar/enterprise-beans/message-driven/resource-ref/res-ref-name > " xml="${contextRootSuffix}" position="under"/> > </xmltask> > > > The comment inserted starts like this: > <!-- > DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. > > Copyright 2000-2007 Sun Microsystems, Inc. All rights reserved. > > The contents of this file are subject to the terms of either the GNU > General Public License Version 2 only ("GPL") or the Common Development > and Distribution License("CDDL") (collectively, the "License"). You > may not use this file except in compliance with the License. You can > obtain > a copy of the License at > https://glassfish.dev.java.net/public/CDDL+GPL.html > or glassfish/bootstrap/legal/LICENSE.txt. See the License for the > specific > language governing permissions and limitations under the License. > > When distributing the software, include this License Header Notice in > each > file and include the License file at > glassfish/bootstrap/legal/LICENSE.txt. > Sun designates this particular file as subject to the "Classpath" > exception > as provided by Sun in the GPL Version 2 section of the License file that > accompanied this code. If applicable, add the following below the > License > Header, with the fields enclosed by brackets [] replaced by your own > identifying information: "Portions Copyrighted [year] > [name of copyright owner]" > > Contributor(s): > > If you wish your version of this file to be governed by only the CDDL or > only the GPL Version 2, indicate your decision by adding "[Contributor] > elects to include this software in this distribution under the [CDDL or > GPL > Version 2] license." If you don't indicate a single choice of license, > a > recipient has the option to distribute your version of this file under > either the CDDL, the GPL Version 2 or to extend the choice of license to > its licensees as provided above. However, if you add GPL Version 2 code > and therefore, elected the GPL Version 2 license, then the option > applies > only if the new code is made subject to such option by the copyright > holder. > --> > <!-- > This is the XML DTD for the EJB 2.0 deployment descriptor. > All EJB 2.0 deployment descriptors must include a DOCTYPE > of the following form: > > <!DOCTYPE ejb-jar PUBLIC > > truncated.... > > > ====================== > Damon Youmans > GuideOne Insurance > 515.267.5774 (voice) > 515.229.7190 (cell) > [EMAIL PROTECTED] > > > <HTML><BODY> > > DISCLAIMER: This message and accompanying documents are covered by the > Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, and contains > information intended for the specified individual(s) only. This > information is confidential. If you are not the intended recipient or an > agent responsible for delivering it to the intended recipient, you are > hereby notified that you have received this document in error and that any > review, dissemination, copying, or the taking of any action based on the > contents of this information is strictly prohibited. If you have received > this communication in error, please notify us immediately by e-mail, and > delete the original message. > </BODY></HTML>---------------------------------------------------------- --------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> > http://get.splunk.com/_______________________________________________ > Xmltask-users mailing list > Xmltask-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xmltask-users > -- Brian Agnew http://www.oopsconsultancy.com OOPS Consultancy Ltd Tel: +44 (0)7720 397526 Fax: +44 (0)20 8682 0012 ------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users ------------------------------------------------------------------------ --------------------------------- This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited. All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. ------------------------------------------------------------------------ --------------------------------- ------------------------------------------------------------------------ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users