You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rob Tanner <rt...@linfield.edu> on 2010/03/18 19:52:11 UTC
Can I edit web.xml from an ANT script
Hi,
I¹m starting to build applications using the Google Web Toolkit (GWT) in
Eclipse. When moved to the production server, web.xml needs to have a
security-constraint so as to require SSL, but in development, GWT¹s hosted
mode doesn¹t understand the security-constraint. The GWT compile does not
produce a warfile so I produce it myself using jar, but I¹m having to
manually add the security-constraint so that web.xml in the warfile has the
constraint but the copy that hosted mode uses does not.
Obviously I can use ANT to build the warfile, but can I get ANT to add the
security-constaint, perhaps replacing a comment line such as <!-- security
constraint --> with the actual XML?
Thanks,
Rob
Rob Tanner
JAVA Developer
Linfield College, McMinnville Oregon
Re: Can I edit web.xml from an ANT script
Posted by Brian Agnew <br...@oopsconsultancy.com>.
To follow up on this with more detail, XMLTask can do precisely the
below (enabling a commented-out section in a config) with the
<uncomment/> subtask.
On 18/03/2010 20:13, Brian Agnew wrote:
> XMLTask is what you want. It was specifically designed for such things.
>
> http://www.oopsconsultancy.com/software/xmltask
>
> Brian
>
> On 18/03/2010 18:52, Rob Tanner wrote:
>> Hi,
>>
>> I¹m starting to build applications using the Google Web Toolkit (GWT) in
>> Eclipse. When moved to the production server, web.xml needs to have a
>> security-constraint so as to require SSL, but in development, GWT¹s
>> hosted
>> mode doesn¹t understand the security-constraint. The GWT compile
>> does not
>> produce a warfile so I produce it myself using jar, but I¹m having to
>> manually add the security-constraint so that web.xml in the warfile
>> has the
>> constraint but the copy that hosted mode uses does not.
>>
>> Obviously I can use ANT to build the warfile, but can I get ANT to
>> add the
>> security-constaint, perhaps replacing a comment line such as<!--
>> security
>> constraint --> with the actual XML?
>>
>> Thanks,
>> Rob
>>
>>
>>
>> Rob Tanner
>> JAVA Developer
>> Linfield College, McMinnville Oregon
>>
>>
>>
>>
>
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Can I edit web.xml from an ANT script
Posted by reno <re...@free.fr>.
Or you can try this:
http://ant.apache.org/manual/CoreTasks/replace.html
(@Brian: i will have a look to XMl Task this week ;-) )
S.
> XMLTask is what you want. It was specifically designed for such things.
>
> http://www.oopsconsultancy.com/software/xmltask
>
> Brian
>
> On 18/03/2010 18:52, Rob Tanner wrote:
>> Hi,
>>
>> I¹m starting to build applications using the Google Web Toolkit (GWT) in
>> Eclipse. When moved to the production server, web.xml needs to have a
>> security-constraint so as to require SSL, but in development, GWT¹s
>> hosted
>> mode doesn¹t understand the security-constraint. The GWT compile
>> does not
>> produce a warfile so I produce it myself using jar, but I¹m having to
>> manually add the security-constraint so that web.xml in the warfile
>> has the
>> constraint but the copy that hosted mode uses does not.
>>
>> Obviously I can use ANT to build the warfile, but can I get ANT to
>> add the
>> security-constaint, perhaps replacing a comment line such as<!--
>> security
>> constraint --> with the actual XML?
>>
>> Thanks,
>> Rob
>>
>>
>>
>> Rob Tanner
>> JAVA Developer
>> Linfield College, McMinnville Oregon
>>
>>
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Can I edit web.xml from an ANT script
Posted by Martin Gainty <mg...@hotmail.com>.
Rob-
take a look at ant's quite powerful and capable exec task
just supply command line args
Nota Bene: for windows you might have to precede the launch capability with cmd.exe /C "FullPathToYourTextEditor.exe"
YMMV,
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Thu, 18 Mar 2010 14:48:27 -0700
> Subject: Re: Can I edit web.xml from an ANT script
> From: rtanner@linfield.edu
> To: brian@oopsconsultancy.com; user@ant.apache.org
>
> Brian,
>
> Thanks. I'm having some newbie issues using it but I also found that
> there's an xmltask-users email list, so I've posted my problem there.
>
> Again, thanks.
>
> -- Rob
>
>
>
> On 3/18/10 1:13 PM, "Brian Agnew" <br...@oopsconsultancy.com> wrote:
>
> > XMLTask is what you want. It was specifically designed for such things.
> >
> > http://www.oopsconsultancy.com/software/xmltask
> >
> > Brian
> >
> > On 18/03/2010 18:52, Rob Tanner wrote:
> >> Hi,
> >>
> >> I¹m starting to build applications using the Google Web Toolkit (GWT) in
> >> Eclipse. When moved to the production server, web.xml needs to have a
> >> security-constraint so as to require SSL, but in development, GWT¹s hosted
> >> mode doesn¹t understand the security-constraint. The GWT compile does not
> >> produce a warfile so I produce it myself using jar, but I¹m having to
> >> manually add the security-constraint so that web.xml in the warfile has the
> >> constraint but the copy that hosted mode uses does not.
> >>
> >> Obviously I can use ANT to build the warfile, but can I get ANT to add the
> >> security-constaint, perhaps replacing a comment line such as<!-- security
> >> constraint --> with the actual XML?
> >>
> >> Thanks,
> >> Rob
> >>
> >>
> >>
> >> Rob Tanner
> >> JAVA Developer
> >> Linfield College, McMinnville Oregon
> >>
> >>
> >>
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_3
Re: Can I edit web.xml from an ANT script
Posted by Rob Tanner <rt...@linfield.edu>.
Brian,
Thanks. I'm having some newbie issues using it but I also found that
there's an xmltask-users email list, so I've posted my problem there.
Again, thanks.
-- Rob
On 3/18/10 1:13 PM, "Brian Agnew" <br...@oopsconsultancy.com> wrote:
> XMLTask is what you want. It was specifically designed for such things.
>
> http://www.oopsconsultancy.com/software/xmltask
>
> Brian
>
> On 18/03/2010 18:52, Rob Tanner wrote:
>> Hi,
>>
>> I¹m starting to build applications using the Google Web Toolkit (GWT) in
>> Eclipse. When moved to the production server, web.xml needs to have a
>> security-constraint so as to require SSL, but in development, GWT¹s hosted
>> mode doesn¹t understand the security-constraint. The GWT compile does not
>> produce a warfile so I produce it myself using jar, but I¹m having to
>> manually add the security-constraint so that web.xml in the warfile has the
>> constraint but the copy that hosted mode uses does not.
>>
>> Obviously I can use ANT to build the warfile, but can I get ANT to add the
>> security-constaint, perhaps replacing a comment line such as<!-- security
>> constraint --> with the actual XML?
>>
>> Thanks,
>> Rob
>>
>>
>>
>> Rob Tanner
>> JAVA Developer
>> Linfield College, McMinnville Oregon
>>
>>
>>
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Can I edit web.xml from an ANT script
Posted by Brian Agnew <br...@oopsconsultancy.com>.
XMLTask is what you want. It was specifically designed for such things.
http://www.oopsconsultancy.com/software/xmltask
Brian
On 18/03/2010 18:52, Rob Tanner wrote:
> Hi,
>
> I¹m starting to build applications using the Google Web Toolkit (GWT) in
> Eclipse. When moved to the production server, web.xml needs to have a
> security-constraint so as to require SSL, but in development, GWT¹s hosted
> mode doesn¹t understand the security-constraint. The GWT compile does not
> produce a warfile so I produce it myself using jar, but I¹m having to
> manually add the security-constraint so that web.xml in the warfile has the
> constraint but the copy that hosted mode uses does not.
>
> Obviously I can use ANT to build the warfile, but can I get ANT to add the
> security-constaint, perhaps replacing a comment line such as<!-- security
> constraint --> with the actual XML?
>
> Thanks,
> Rob
>
>
>
> Rob Tanner
> JAVA Developer
> Linfield College, McMinnville Oregon
>
>
>
>
>
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org