You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Sonnathi, Venkat" <Ve...@contractor.thomson.com> on 2004/09/11 00:35:07 UTC

war plugin and dependant webapps

Hi,

I have webapps depending upon a common webapp (for jsps, images, js...).
Each webapp can override stuff in common webapp and contains the files in
its own project.

common/src/webapp/welcome.jsp

webmoduleA/src/webapp/welcome.jsp

To accomplish building webmoduleA, I tried copying files from common to
${maven.war.webapp.dir} as pre-goal but the war plug-in when copying the
webmoduleA/src/webapp/ files does specify the ant:copy overwrite=true

    <j:if test="${webSourcesPresent == 'true'}">
      <ant:copy todir="${maven.war.webapp.dir}" preservelastmodified="true">
        <ant:fileset dir="${maven.war.src}"
          includes="${maven.war.src.includes}"
          excludes="${maven.war.src.excludes}">
        </ant:fileset>
      </ant:copy>
    </j:if>

and hence the file is not overwritten.

I made it as a post-goal and copy the files from common after the war:webapp
but the problem comes if the common/.../welcome.jsp has been modified after
webModuleA/.../welcome.jsp then it is overwritten.

How to handle this case?

Thanks,
--Venkat.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: war plugin and dependant webapps

Posted by dan tran <da...@gmail.com>.
in post goal of war:wepapp

<ant:touch> every thing in ${maven.war.webapp.dir} 
then then do a copy from common to ${maven.war.webapp.dir}
files which share the same name on both projects  are not 
copied over 

Hope it helps.

-D

On Fri, 10 Sep 2004 18:35:07 -0400, Sonnathi, Venkat
<ve...@contractor.thomson.com> wrote:
> Hi,
> 
> I have webapps depending upon a common webapp (for jsps, images, js...).
> Each webapp can override stuff in common webapp and contains the files in
> its own project.
> 
> common/src/webapp/welcome.jsp
> 
> webmoduleA/src/webapp/welcome.jsp
> 
> To accomplish building webmoduleA, I tried copying files from common to
> ${maven.war.webapp.dir} as pre-goal but the war plug-in when copying the
> webmoduleA/src/webapp/ files does specify the ant:copy overwrite=true
> 
>    <j:if test="${webSourcesPresent == 'true'}">
>      <ant:copy todir="${maven.war.webapp.dir}" preservelastmodified="true">
>        <ant:fileset dir="${maven.war.src}"
>          includes="${maven.war.src.includes}"
>          excludes="${maven.war.src.excludes}">
>        </ant:fileset>
>      </ant:copy>
>    </j:if>
> 
> and hence the file is not overwritten.
> 
> I made it as a post-goal and copy the files from common after the war:webapp
> but the problem comes if the common/.../welcome.jsp has been modified after
> webModuleA/.../welcome.jsp then it is overwritten.
> 
> How to handle this case?
> 
> Thanks,
> --Venkat.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org