ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: Tricky JSP precompilation mapping
Date Tue, 11 Mar 2003 16:08:11 GMT
One can write a custom mapper without modifing
ant.

<mapper classname="my.custom.Mapper"
              classpathref="my.class.path"
              from="*.jsp"/>

It is custom conditions that one cannot have - and the
fact that syntax for custom filters, mappers and conditions
are different from build-in fiters, mappers and conditions - this
is addressed by 17199.

Peter
On Tuesday 11 March 2003 15:40, Dominique Devienne wrote:
> I think you meant
>
> from=  (.*)/(.*/)(.*/)(.*/)(.*/)(.*\.jsp)
> to  =  _\1/_\2_\3_\4_\5_\6.java
>
> since the previous to didn't add the _ prefix... But even that does not
> work, since adding extraneous underscores.
>
> If you have .jsp in more that one directory, I suspect you need to have one
> fileset per directory to make the mapper work.
>
> Otherwise, I'd have to either write you own mapper (but then you have no
> way of pluging it in to Ant without modifying Ant... A major pet peeve of
> mine about Ant. I guess I should do something about that one... Oh wait,
> somebody already did ;-)
>
> VOTE FOR http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17199
>
> End of long parenthesis)
>
> Or write a <script> that gathers the OutOfDate jsp files manually.
>
> Sorry, not the answer you expected right... --DD
>
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
> Sent: Tuesday, March 11, 2003 7:06 AM
> To: user@ant.apache.org
> Subject: AW: Tricky JSP precompilation mapping
>
> I haven´t used mapper and haven´t tried this, but maybe ...
>
> from=  (.*)/(.*/)(.*/)(.*/)(.*/)(.*\.jsp)
> to  =  \1/\2\3\4\5\6.java
>
>
> Jan Matèrne
>
> -----Ursprüngliche Nachricht-----
> Von: Karsten Silz [mailto:karsten.silz@epost.de]
> Gesendet am: Dienstag, 11. März 2003 13:54
> An: user@ant.apache.org
> Betreff: Tricky JSP precompilation mapping
>
> Im working on an Oracle project where I need to precompile JSPs.  Now the
> problem is that the JSP precompiler always compiles all files, no matter
> whether they have changed or not.  The Ant solution seems to be build a
> file set of all changed JSPs with the <depend> selector and a <mapper>.
>
> The problem is: the directory names and the file names of the precompiled
> JSPs are different.  If the JSP is in "htdocs/pages/page.jsp", then the
> translated page will be in "_htdocs/_pages/_page.java" and have a package
> declaration of "_htdocs._pages".
>
> Does anybody know a mapper that can translate all JSP in a directory to
> the above mentioned Java class path, independent of the actual directory
> depth?  I suppose that only the "regexp" mapper can do but I'm not familiar
> with it.
>
> Thanx!
>
> ---
> Karsten Silz (karsten.silz@epost.de)
>
> "So J2EE makes the hard stuff possible but [...] it still makes the easy
> stuff difficult to do [...]. Whereas from the .NET perspective, it makes
> the easy stuff easy, and the jury is still out whether it makes the hard
> stuff possible." Dennis Leung, head of Oracle9iAS TopLink Development,
> http://www.theserverside.com/home/thread.jsp?thread_id=17708
>
> ________________________________________
> Mehr Power für Ihre eMail - mit den neuen Leistungspaketen bei
> http://www.epost.de
>
>
>
> ---------------------------------------------------------------------
> 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