I'm pretty sure the 'war:webapp' goal gives you the same benefits AND
it addreses all three of your problems.

Will Holcomb <[EMAIL PROTECTED]> writes:

> I don't know if anyone else would find this useful, but I develop under 
> linux and I just set up a fake webapp made up of symlinks. Everything in 
> src/webapp is linked except for WEB-INF which is a directory and then 
> anything in src/webapp/WEB-INF is linked into that. Also though 
> WEB-INF/classes is linked to target/classes and WEB-INF/lib is linked to 
> lib.
>
> The end effect is something that looks like the end webapp, and leaves 
> the regular build structure in tact.
>
> There are three problems:
>   1. It is system dependent
>   2. Ant does not know what a symlink is and just follows them; so:
>       <a:delete dir="webapp" /> will eat up most of your project as ant 
>       follows the links and removes the originals. rm -r will only delete 
>       the symlinks.
>   3. Tomcat won't follow symlinks by default, so the resource loader has 
>       to be told to allow it. In server.xml:
>         <Context path="/ops" docBase="ops" debug="0" reloadable="true">
>           <Resources className="org.apache.naming.resources.FileDirContext"
>            allowLinking="true" />
>         </Context>
>
> After everything is set up though it just works and java:compile will be 
> enough to let you see the changes to your webapp. (Well, when changing 
> things other than java source files maven isn't needed to see changes.)
>
> Will
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to