ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Venkatesh Babu <venkatbab...@yahoo.com>
Subject Re: Ant decomment task problem
Date Tue, 07 Nov 2006 04:30:43 GMT
Hello Peter,

Thanks for your suggestion....

The <stripjavacomments/> works for me

Regards,
Venkatesh

----- Original Message ----
From: Peter Reilly <peter.kitt.reilly@gmail.com>
To: Ant Users List <user@ant.apache.org>
Sent: Monday, November 6, 2006 10:44:52 PM
Subject: Re: Ant decomment task problem


On 11/6/06, Shatzer, Larry <Larry.Shatzer@mirotechnologies.com> wrote:
> Decomment is not a core ant task, you will have to ask the author of that
> task for help.
>
> http://andariel.uworks.net/
>
> I noticed this comment in the javadoc
>
> Warning!! The decomment process uses regular expressions. There's not a
> syntactic analysis, so there might be unexpected results if there are quoted
> comment symbols. Never overwrite your original source code without making a
> backup first!

The stripjavacomments filter may work better for this env.
It should work for javascript files as the comments are the same
and it does take into account strings.

<copy destdir="stripped">
   <fileset dir="src" includes="**/*.js"/>
   <filterchain>
      <stripjavacomments/>
   </filterchain>
</copy>

Peter

>
>
> > -----Original Message-----
> > From: Venkatesh Babu [mailto:venkatbabukr@yahoo.com]
> > Sent: Monday, November 06, 2006 5:17 AM
> > To: user@ant.apache.org
> > Subject: Ant decomment task problem
> >
> >
> > Hello All,
> >
> > I'm using the decomment task, to decomment my JavaScript
> > files. There seems to be problem in that: it is removing //
> > characters present inside strings. For ex: I have a function
> > where I'm constructing URL:
> >
> > function f1() {
> >     var url = "http://"; ....;
> > }
> >
> > the decomment task is removing the // present after "http:" string!
> >
> > Can anybody tell me about how to overcome this problem.
> >
> > Thank you,
> > Venkatesh
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message