forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Error in running Forrest as a webapp
Date Thu, 11 Sep 2003 23:17:49 GMT
On Thu, Sep 11, 2003 at 02:26:31PM -0400, Dave Brondsema wrote:
> 
> 
> On Thu, 11 Sep 2003, Johan Kok wrote:
> 
> > While being at it, something usefull that can be added to backcopy is also
> > to clear the original source. If one delete a file in e.g. the contents
> > directory within webapp, and perform a backcopy, the source directory will
> > still contain the 'deleted' file.
> >
> > Regards
> > Johan Kok
> 
> 
> Ant 1.6's <sync> task does this.

It's a bit more complicated in Forrest, because some of the content in
build/webapp/ comes from Forrest itself, not the user's project.  The
current 'backcopy' target will only backcopy the project's files, or
modified versions of the Forrest files:

<copy toDir="${project.content-dir}" filtering="false" overwrite="false">
  <fileset dir="${project.webapp}" excludes="${forrest.backcopy.excludes}">
    <or>
      <not>
        <present targetdir="${forrest.home}/context"/>
      </not>
      <and>
        <present targetdir="${forrest.home}/context"/>
        <different targetdir="${forrest.home}/context"/>
        <type type="file"/>
      </and>
    </or>
  </fileset>
</copy>

We could have an additional <delete> to remove files deleted from
build/webapp/, but that is dangerous, as users could have created new
content in src/.  I'm rather work on eliminating the need for backcopy
entirely, by having the webapp read XML from src/.


--Jeff


> Dave Brondsema
> 
> > > -----Original Message-----
> > > From: Juan Jose Pablos [mailto:cheche@che-che.com]
> > > Sent: 10 September 2003 08:51
> > > To: forrest-dev@xml.apache.org
> > > Subject: Re: Error in running Forrest as a webapp
> > >
> > >
> > > Eirik,
> > >
> > > Eirik Bjørsnøs wrote:
> > > >
> > > > Ant has a task "uptodate" that could be used to check that files
> > > > are not changed in the build/webapp dir. By checking this, the
> > > > clean target could choose to refuse to delete the build directory
> > > > before the user has done a backcopy.
> > >
> > > but what about if a user wants to remove its changes and start again?
> > >
> > > I think a clean target is mean to clear all intermediate and output
> > > files from the process.
> > >
> > > Cheers,
> > > Cheche
> > >
> > >
> >
> >
> >
> 

Mime
View raw message