ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Rodriguez <Anth...@WeddingChannel.com>
Subject RE: ClearCase updates
Date Thu, 15 Nov 2001 19:46:08 GMT
I've attached the perl file setcs.pl.  Below I've pasted the ant task from
my build.xml.

Variable snippet from build.properties:
---------------------------------------
buildpath=c\:\\ant_Build         #This is where all the ant files are stored
viewpath=c\:\\build_view         #Path of the view being built
view.storage=c\:\\build_view.vws #Storage dir of the view.  Usually ends
with ".vws"
newbranch=main                   #Name of new branch/view profile to get new
config spec from.

snippet from build.xml:
-----------------------
  <!--  This changes the config spec of the build view -->
  <target name="setcs" description="Changes config spec of build view">
    <property file="c:\ant_Build\build.properties"/>
    <exec dir="${buildpath}" executable="perl">
      <arg line="setcs.pl"/>
      <arg line="${view.storage}"/>
      <arg line="${newbranch}"/>
    </exec>
    <exec dir="${viewpath}" executable="cleartool">
      <arg line="setcs"/>
      <arg line="-current"/>
    </exec>
  </target>


> -----Original Message-----
> From: Zak Saurin [mailto:zak.saurin@netsystechnologies.com]
> Sent: Thursday, November 15, 2001 2:30 AM
> To: 'Ant Users List'
> Subject: RE: ClearCase updates
> 
> 
> Ah I see!  At the moment I just ensure that the load rules are the
> same for all config specs used in the build, but I also like your
> idea.
> 
> I would be interested in seeing (and using) the scripts and ant
> files, if you care to post them on the list.
> 
> If the java development of an optional task goes well (I'm
> referring to the response by Stephane Bailliez) that would
> be the best solution of course.  Maybe the task could be programmed
> to provide a default of yes to the unload questions, rather than
> do what the script does (which is a nice work around ;-) )
> 
> Thank you very much for your input.  It's nice to know that I don't
> suffer alone!!
> 
> Zak Saurin.
> 
> > -----Original Message-----
> > From: Anthony Rodriguez [mailto:Anthony@WeddingChannel.com]
> > Sent: 14 November 2001 17:55
> > To: 'Ant Users List'
> > Cc: 'zak.saurin@netsystechnologies.com'
> > Subject: RE: ClearCase updates
> >
> >
> > Zak:
> >
> > I've had to deal with this annoying ClearCase problem as
> > well.  It is an
> > issue with setcs and snapshot views.  The setcs command asks
> > for user input
> > when the new config spec being used has different load rules
> > from the old
> > config spec.  It then prompts the user for a yes or no for
> > unloading VOBs.
> > After many hours of phone calls and email tag with Rational,
> > I came up with
> > a solution myself.  My workplace uses snapshot views to 
> build and view
> > profiles to make new views.
> > I created a task in ant called setcs.  It's basically an exec
> > task that
> > first calls a perl script that I wrote called setcs.pl.  This
> > script goes to
> > the view storage dir (*.vws dir) of the view I want change
> > and reads the
> > load rules from the old config spec file into an array.  It
> > then goes to the
> > directory of the new view profile I want to use, and copies
> > the "Rules" file
> > into the view storage dir (renaming it to "config spec").  It
> > then appends
> > the old load rules to the new config spec file, thereby
> > ensuring the same
> > load rules as the previous config spec meaning no user input
> > when I run
> > setcs.  After the perl script is done, the setcs task in 
> Ant execs the
> > cleartool setcs -current command.  This reads in the new
> > config spec and
> > updates the view accordingly.
> > I know it's a bit of a perl hack, but it's been working for
> > me really well.
> > If people are interested, I could post a copy of the perl
> > script and ant
> > task I use.  But it would probably be cooler if a Java guru
> > out there could
> > write a class/optional task that could do this.
> >
> > -Anthony


Mime
View raw message