ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Fisher" <jfis...@proxtend.com>
Subject RE: VSS task question
Date Fri, 11 May 2001 21:23:18 GMT
RE: VSS task questionActually I was looking for the situation that, if I
have three targets that rely on on task (say compile) that the compile is
only run once (the first time it is needed), but then the next target that
depends on compile doesn't compile it.

in my case, I have three applets that I need to put in to a web application.
I need to ensure I got the pages from vss and because all three appleets
depend on the pages, my vss get pages target gets the pages three times.

but thanks for advice on this.  (is still got all the files for some reason)
  -----Original Message-----
  From: Peterson, Lance [mailto:lpeterson@verticore.com]
  Sent: Friday, May 11, 2001 2:25 PM
  To: 'ant-user@jakarta.apache.org'
  Subject: RE: VSS task question


  If I don't want to download files every time from SourceSafe, I use the
exec task and call SS.EXE directly with the following options:

  <exec executable="${vss.path}\ss.exe">
          <arg value="get" />
          <arg value="${project.path}" />
          <arg value="-R" />
          <arg value="-I-" />
          <arg value="-GF" />
          <arg value="-GCC" />
          <arg value="-GTM" />
          <arg value="-y${vss.username},${vss.password}" />
  </exec>

  project.path is the SourceSafe project path (i.e.
"$/products/library/source").

  -R gets files recursively, -I- turns off input.

  The combination of -GF, -GCC, and -GTM causes SS.EXE to only get a file
from SourceSafe if it has a later file date than the local copy.  SS.EXE
will still run--it will scan the project directory (recursively if -R is
set).  But it won't download a file unless it's outdated.

  I'm not sure this is what you wanted...

  Regards,
  Lance Peterson
  Verticore Technologies Inc.

  -----Original Message-----
  From: Joe Fisher [mailto:jfisher@proxtend.com]
  Sent: Friday, May 11, 2001 1:03 PM
  To: ant-user@jakarta.apache.org
  Subject: VSS task question



  I have a few tasks that rely on files getting from vss
  Everytime the other tasks fire, they get the files.
  How can i prevent vssget task from firing evertime?



  Here is a copy of my build file
  <?xml version="1.0"?>

  <!--

 ======================================================================= -->
  <!-- Build
       -->
  <!--

 ======================================================================= -->

  <!-- note on VSS.  If the user is editing a file that will be gotten from
  vss, the
           user must close that file, as the make writable=false fails -->
  <project name="MainBuildFile" default="info" basedir=".">

          <!-- Each user must define some variables in a file called
user.properties
                   If these variables are not set, the build cannont happen
on thier
  machine -->
          <property file="user.properties"/>
      <property name="VSSEXE" value="\\Xtend-devdb\D_Drive\Program
  Files\Microsoft Visual Studio\VSS\win32"/>
      <property name="VSS_PAGE_DIR"
  value="/projects/xtendsoft/XtendSoftPages"/>
      <property name="VSS_TAG_DIR" value ="/projects/xtendsoft/CustomTags"/>
      <property name="VSS_PAGE_TEST_DIR" value
  ="/projects/xtendsoft/test/XtendSoft"/>

          <!-- info       Each call comes here first -->
          <target name="info"

depends="echoPagesRootFalse,echoCustomTagRootFalse,echoBuildRootFalse,echoVS
  S_PASSFalse,echoVSS_PASSFalse">
                  <echo message="PagesRoot=${PagesRoot}"/>
                  <echo message="CustomTagRoot=${CustomTagRoot}"/>
                  <echo message="BuildDir=${BuildDir}"/>
                  <mkdir dir="${BuildDir}"/>
                  <echo message=""/>
                  <echo message="To build everything, call 'ant rebuild'"/>
                  <echo message="Current targets are"/>
                  <echo message="--> getCustomTags -- This will get the
custom tags"/>
                  <echo message="--> getPages -- This will get all the
pages"/>
                  <echo message="--> TestPages -- This will run the tests
for the pages"/>
                  <echo message="--> XtendTree -- This will build the
XtendTree applet"/>
                  <echo message="--> XtendOutliner -- This will build the
outliner applet"/>
                  <echo message="--> clean -- This will delete everyting not
needed"/>
                  <echo message="--> rebuild -- This will delete everyting
then rebuild
  it"/>
          </target>

          <!-- check some variables -->
          <target name="echoPagesRootFalse" unless="PagesRoot">
                  <fail message="'PagesRoot' must be defined in a file
called
  user.properties and must point to where the Xtend Soft pages will be
put"/>
          </target>
          <target name="echoCustomTagRootFalse" unless="CustomTagRoot">
                  <fail message="'CustomTagRoot' must be defined in a file
called
  user.properties and must point to the directory where Coldfusion expects
the
  Custom Tags to be"/>
          </target>
          <target name="echoBuildRootFalse" unless="BuildDir">
                  <fail message="'BuildDir' must be defined in a file called
user.properties
  and must point to the directory where Java will build"/>
          </target>
          <target name="echoVSS_USERFalse" unless="VSS_USER">
                  <fail message="'VSS_USER' must be defined in a file called
user.properties
  and must be the username for VSS"/>
          </target>
          <target name="echoVSS_PASSFalse" unless="VSS_PASS">
                  <fail message="'VSS_PASS' must be defined in a file called
user.properties
  and must be the password for VSS_USER"/>
          </target>



          <!-- get custom tags -->
          <target name="getCustomTags" depends="info"
if="${property.gotTag}">
                  <echo message="Getting ColdFusion Tags (${VSS_TAG_DIR})to
  ${CustomTagRoot}"/>
                  <vssget localPath="${CustomTagRoot}"
                          recursive="true"
                          vsspath="${VSS_TAG_DIR}"
                          ssdir="${VSSEXE}"
                          writable="false"
                          login="${VSS_USER},${VSS_PASS}"/>
          </target>

          <!-- get the pages -->
          <target name="getPages" depends="info, getCustomTags">
                  <echo message="Getting Pages (${VSS_PAGE_DIR}) specific
code to
  ${PagesRoot}"/>
                  <!-- get the pages -->
                  <vssget localPath="${PagesRoot}"
                                  recursive="true"
                          vsspath="${VSS_PAGE_DIR}"
                          ssdir="${VSSEXE}"
                          writable="false"
                          login="${VSS_USER},${VSS_PASS}"/>
          </target>

          <!-- unit testing for the pages -->
          <target name="TestPages" depends="getPages">
                  <echo message="Getting Tests (${VSS_PAGE_TEST_DIR})
specific code to
  ${BuildDir}\testPages"/>
                  <vssget localPath="${BuildDir}\testPages"
                                  recursive="true"
                          vsspath="${VSS_PAGE_TEST_DIR}"
                          ssdir="${VSSEXE}"
                          writable="false"
                          login="${VSS_USER},${VSS_PASS}"/>
                  <ant antfile="build.xml" dir="${BuildDir}\testPages"
target="test"/>    <!--
  test better be definen-->

          </target>

          <!-- get the XtendTree project -->
          <target name="XtendTree" depends="info,getPages">
                  <echo message="Getting XtendTree to
${BuildDir}/XtendTree"/>

                  <mkdir dir="${BuildDir}\XtendTree"/>
                  <vssget localPath="${BuildDir}\XtendTree"
                                  recursive="false"

vsspath="/projects/xtendsoft/java/applets/XtendTree"
                          ssdir="${VSSEXE}"
                          writable="false"
                          login="${VSS_USER},${VSS_PASS}"/>
                  <ant antfile="build.xml" dir="${BuildDir}\XtendTree"/>

                  <!-- copy the built jars, assumetions made that the jars
will be in the
  \deploy folder and be in jar files -->
                  <copy toDir="${PagesRoot}\classes">
                          <fileset dir="${BuildDir}\XtendTree\deploy">
                              <include name="**/*.jar"/>
                          </fileset>
                  </copy>
                  <!-- copy the supporting jars, assumptions made that the
jars will be in
  the \lib and have jars, zip or classes-->
                  <copy toDir="${PagesRoot}\classes\jars">
                          <fileset dir="${BuildDir}\XtendTree\lib">
                              <include name="**/*.jar"/>
                              <include name="**/*.class"/>
                              <include name="**/*.zip"/>
                          </fileset>
                  </copy>
          </target>

          <!-- get the XtendOutliner project -->
          <target name="XtendOutliner" depends="info,getPages">
                  <echo message="Getting XtendOutliner to
${BuildDir}/XtendOutliner"/>

                  <mkdir dir="${BuildDir}\XtendOutliner"/>
                  <vssget localPath="${BuildDir}\XtendOutliner"
                                  recursive="false"

vsspath="/projects/xtendsoft/java/applets/XtendOutliner"
                          ssdir="${VSSEXE}"
                          writable="false"
                          login="${VSS_USER},${VSS_PASS}"/>
                  <ant antfile="build.xml" dir="${BuildDir}\XtendOutliner"/>

                  <!-- copy the built jars, assumetions made that the jars
will be in the
  \deploy folder and be in jar files -->
                  <copy toDir="${PagesRoot}\classes">
                          <fileset dir="${BuildDir}\XtendOutliner\deploy">
                              <include name="**/*.jar"/>
                          </fileset>
                  </copy>
                  <!-- copy the supporting jars, assumptions made that the
jars will be in
  the \lib and have jars, zip or classes-->
                  <copy toDir="${PagesRoot}\classes\jars">
                          <fileset dir="${BuildDir}\XtendOutliner\lib">
                              <include name="**/*.jar"/>
                              <include name="**/*.class"/>
                              <include name="**/*.zip"/>
                          </fileset>
                  </copy>
          </target>

          <!-- clean -->
          <target name="clean" depends="info">
                  <echo message="Delete directory ${PagesRoot}"/>
                  <delete dir="${PagesRoot}"/>
                  <echo message="Delete directory ${CustomTagRoot}"/>
                  <delete dir="${CustomTagRoot}"/>
                  <echo message="Delete directory ${BuildDir}"/>
                  <delete dir="${BuildDir}"/>
              <delete>
                      <fileset dir="." includes="*.bak"/>
                  </delete>
          </target>

          <!-- build all target -->
          <target name="all" depends="info">
                  <antcall target="XtendOutliner"/>
                  <antcall target="XtendTree"/>
                  <antcall target="TestPages"/>
          </target>

          <!-- rebuild the system -->
          <target name="rebuild" depends="info">
                  <antcall target="clean"/>
                  <antcall target="all"/>
          </target>

  </project>

  Joe Fisher, Software Developer
  Xtend Inc.
  http://www.xtendsoft.com
  voice  801.825.5553 ext 309
  fax    801.825.5606
  e-mail jfisher@proxtend.com
  s-mail 1645 East Hwy 193, Suite 202
         Layton, Ut 84041


Mime
View raw message