You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Rogers <st...@realeum.com> on 2004/05/14 03:07:16 UTC

Problem with JSPC and source jsp file timestamps causing recompile on app server

ON Weblogic 6.1 sp4, with version of ant 1.5.2 and higher (actually not
sure about 1.6x)

I have a complete build and package ant script which executs a java task
to invoke the weblogic.jspc on all my jsps.
I then create a war file, with the jsp source, and the precompiled jsp's
in the prescribed WEB-INF/classes

Everything was fine until I moved beyond ant 1.5.1, and now the first
access of the jsp on Weblogic Server causes the jsp to recompile.
This happens for EVERY jsp.

I suspect some change in either the copy task (I tried using the
preservelastmodified="true", to no avail)
or the jar task - is it modifying file timestamps???

ANyone know what changed from 1.5.1 on, to cause this?

Thanks in Advance!
Steve



Different and Present together

Posted by Pawanraj Sadhwani <pa...@elitecore.com>.
Hi all,

I am trying to create an upgrade of a version of software installed on the
client. I am using a different selector to pass the updated files.

However the upgrade directory structure mandates that new files and updated
files are in a different folder.

  <macrodef name="newfiles">
    <attribute name="destdir" description="Where to place list file" />
    <attribute name="dir1"    description="Source dir comparison. Old
version" />
    <attribute name="dir2"    description="Target dir comparison. New
version" />
    <attribute name="prefix"  description="Add before filename" />
  
    <sequential>
      <copy todir="@{destdir}">
        <fileset dir="@{dir2}">
          <not>
            <present targetdir="@{dir1}"/>
          </not>
        </fileset>
      </copy>
      <listfiles dir="@{destdir}" file="new-files.tmp" dirsep="/"
prefix="@{prefix}"/>
    </sequential>
  </macrodef>

  <macrodef name="deletedfiles">
    <attribute name="destdir" description="Where to place list file" />
    <attribute name="dir1"    description="Source dir comparison. Old
version" />
    <attribute name="dir2"    description="Target dir comparison. New
version" />
    <attribute name="prefix"  description="Add before filename" />

    <sequential>
      <copy todir="@{destdir}">
        <fileset dir="@{dir1}">
          <not>
            <present targetdir="@{dir2}"/>
          </not>
        </fileset>
      </copy>
      <listfiles dir="@{destdir}" file="@{destdir}/delete-files.txt"
dirsep="/" prefix="@{prefix}"/>
      <listfiles dir="@{destdir}" file="delete-files.tmp"
dirsep="/" prefix="@{prefix}"/>
      
    </sequential>
  </macrodef>

  <macrodef name="updatedfiles">
    <attribute name="destdir" description="Where to place list file" />
    <attribute name="dir1"    description="Source dir comparison. Old
version" />
    <attribute name="dir2"    description="Target dir comparison. New
version" />
    <attribute name="prefix"  description="Add before filename" />

    <sequential>
      <copy todir="@{destdir}">
        <fileset dir="@{dir2}">
          <different targetdir="@{dir1}" ignorefiletimes="true" />
        </fileset>
      </copy>
      <listfiles dir="@{destdir}" file="delete-files.tmp" dirsep="/"
prefix="@{prefix}"/>
    </sequential>
  </macrodef>

<different selector performs the job of "newfiles" and "updatedfiles" macro
both. is it possible to have it restrict to comparing only those files that
are present in both places?

Thanx in advance

Pawan