ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Checkout more than one File with Clearcase
Date Tue, 19 Sep 2006 13:58:05 GMT

Hi,

some fine tasks for clearcase =
http://sourceforge.net/projects/clearantlib/

you may use them together with the cc tasks provided with ant

here is a macrodef i'm using for clearcase checkouts =

<macrodef name="xxcheckout">
        <attribute name="path" default="${web.viewpath}/${web.vob}"/>
        <attribute name="labeltype" default="${mlabel}"/>
        <attribute name="mname" default="${mname}"/>
        <attribute name="modulbase" default="@{path}/@{mname}"/>

        <sequential>

            <echo>
            ======= ClearCase Verarbeitung [ checkout ] =======
-
                
            Viewpfad/Vobname = @{path}
            Modulordner      = @{modulbase}
            Label            = @{labeltype}

            ======= ClearCase Verarbeitung [ checkout ] =======
            </echo>

            <!-- uncheckout und checkout ModulOrdner -->
            <ccuncheckout viewpath="@{modulbase}" keepcopy="false" failonerr="false"/>
            <cccheckout viewpath="@{modulbase}" reserved="true"/>

            <!-- Checkout aller ModulFiles mit Label aus Auftrag 
                 Copy aller ModulFiles in DeployOrdner/Modulname
                 Uncheckout aller ausgecheckten ModulFiles -->
            <for param="file">
              <path>
                <fileset dir="@{modulbase}" includes="**/*.*"/>
              </path>
              <sequential>
                  <ccuncheckout viewpath="@{file}" keepcopy="false" failonerr="false"/>
                  <cccheckout viewpath="@{file}@@@@@\${mlabel}" version="true" reserved="true"/>
                
                <var name="filename" unset="true" />
                <var name="fend" unset="true" />
                <var name="filemlabel" unset="true" />
                                 
                <basename property="filename" file="@{file}"/>
                
                <script language="javascript">
                <![CDATA[
                    
                    filepath=project.getProperty("filename");
                    
                    index1=filepath.lastIndexOf('.');
                    fend=filepath.substring(index1);
                    index2=filepath.indexOf(fend);
                    filebase=filepath.substring(0,index2);
                    project.setProperty("filebase",filebase);
                    
                    if (fend == ".ear")
                    {
                        project.setProperty("filemlabel", mlabel+fend);
                    }
                    if (fend == ".zip")
                    {
                        project.setProperty("filemlabel", filebase+"_"+mlabel+fend);
                    }
                    
                 ]]>   
                 </script>

                  <copy file="@{file}" tofile="${handover.artefactdir}/${mname}/${filemlabel}"
overwrite="true" />
                <ccuncheckout viewpath="@{file}" keepcopy="false" failonerr="false"/>
              </sequential>
            </for>

            <!-- uncheckout ModulOrdner -->
            <ccuncheckout viewpath="@{modulbase}" keepcopy="false" failonerr="false"/>
          

        </sequential>
    </macrodef>

when dealing with clearcase in your scripts,  _always_  have a prophylactic
mount vob and start view in the init part of your script, something like =

<target name="startcc">
     
        <!-- Starten der View -->
        <ccexec failonerror="false">
            <arg value="startview"/>
            <arg value="${web.viewname}"/>
        </ccexec>

        <!-- Mounten austausch_web -->
        <ccexec failonerror="false">
            <arg value="mount"/>
            <arg value="\${web.vob}"/>
        </ccexec>

    </target>
    

Regards, Gilbert
 

-----Original Message-----
From: "Waldmann, Jörg GKL" [mailto:joerg.waldmann@gerling.de] 
Sent: Tuesday, September 19, 2006 3:34 PM
To: 'user@ant.apache.org'
Subject: Checkout more than one File with Clearcase

Hi,

I try to checkout more than one file with the cccheckout task:

	<target name="checkout">
		<cccheckout reserved="true"
viewpath="${src}/de/gerling/vws/gui/dialoge/*.java">
		</cccheckout>
	</target>

It doesn't work. It only works, when i use only one file.

How can i checkout more than on file?

Greetings
Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message