hello all

i'm attempting to get my ant script to check out
labeled files from VSS and i'm having a couple of
problems. :)  if i label individual files in my
project '2.0' and then try to get '2.0' from VSS i get
the following error:

extract_label:
     [echo] Extracting Label: 2.0 from VSS...
   [vssget] Set D:\Development\Build\Marketing as the
default folder for project
 $/MKTG?(Y/N)N
   [vssget] Version not found

BUILD FAILED

D:\DEVELO~1\MARKET~1\build.xml:43: Failed executing:
"D:\Program Files\Microsoft
 Visual Studio\VSS\\win32\ss" Get $/MKTG
-GLD:\Development\Build\Marketing -I- -
R -VL2.0 "-YLocalBuild, LocalBuild"
        at
org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET.execute(MSVSSGET.
java:185)
        at org.apache.tools.ant.Task.perform

but if i label the project root '2.0' and thus label
each file(the latest version of the file) in the
project '2.0', my ant script works fine.  however, i
don't want the latest version of each file to be
labeled '2.0'.  we have added files, made changes,
etc. and want to release things that work(no runtime
errors) from a couple of days ago.  the VSS help is
pretty sparse on checking out labeled files from the
command line and how to label them.

attached is the ant script we're attempting to use.
thanks for any help.

andy

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
<project name="MKTG_TEST_BUILD" default="ftp_ear" basedir="."> 
    <target name="init"> 
        <property name="sourceDir" value="D:\Development\Build\Marketing" /> 
        <property name="output_com" value="${sourceDir}\Deployment" /> 
        <property name="output_webappclasses" value="${sourceDir}\Deployment\WebApp\WEB-INF\classes" /> 		
        <property name="libDir" value=".;D:\java\lib\j2ee.jar;d:\WebGain\Bea\wlserver6.1\lib\weblogic.jar" /> 
        <property name="dist" value="${output_com}" />		
        <property name="ssDir" value="D:\Program Files\Microsoft Visual Studio\VSS\" />
        <property name="deploymentDir" value="D:\WebGain\Bea\wlserver6.1\config\mydomain\applications" />
	<property name="ftp_devl_dir" value="/development/mktg/devl/webroot" />
	<property name="ftp_itt_dir" value="" />
	<property name="ftp_prod_dir" value="" />
	<property name="ftp_dir" value="${ftp_devl_dir}" />
	<property name="ftp_user" value="wlmktgdevl" />
	<property name="ftp_pass" value="wlmktgdevl" />
    </target> 

    <target name="clean" depends="init"> 
        <delete dir="${sourceDir}" />   
        <delete dir="${output_com}" />
        <delete dir="${output_webappclasses}" /> 
    </target> 

    <target name="prepare" depends="clean"> 
        <mkdir dir="${output_com}" />
        <mkdir dir="${output_webappclasses}" />		
        <mkdir dir="${sourceDir}" />	   
    </target> 

    <target name="extract" depends="prepare" unless="VersionLabel"> 
        <echo message="Extracting latest from VSS..." />
        <vssget localPath="${sourceDir}"
        recursive="true" 
        login="LocalBuild, LocalBuild"
        vsspath="/MKTG"
        ssdir="${ssDir}\win32"
        writable="false"/>
    </target>	
    
    <target name="extract_label" depends="extract" if="VersionLabel"> 
        <echo message="Extracting Label: ${VersionLabel} from VSS..." />
        <vssget localPath="${sourceDir}"
        recursive="true" 
        login="LocalBuild, LocalBuild"
        vsspath="/MKTG"
        ssdir="${ssDir}\win32"
        label="${VersionLabel}"
        writable="false"/>
    </target>	

    <target name="compile_com" depends="extract_label">
        <javac srcdir="${sourceDir}\SourceCode"
            includes="com\**"
            excludes="WebApp\**,WebAppClasses\**"
            destdir="${output_com}"
            classpath="${libDir}"
            debug="on"
        />
        <delete dir="${output_com}\WebAppClasses" />
    </target>

    <target name="compile_webappclasses" depends="compile_com">
        <javac srcdir="${sourceDir}\SourceCode"
          includes="WebAppClasses\**"
          excludes="com\**,WebApp\**"
          destdir="${output_webappclasses}"
          classpath="${libDir};${output_com}"
          debug="on"
        />
    </target>

    <target name="copy_webapp" depends="compile_webappclasses">
        <copy todir="${output_com}\WebApp" >
        <fileset dir="${sourceDir}\SourceCode\WebApp\" >
            <exclude name="**\*.java"/>
        </fileset>
        </copy>
    </target>

    <target name="build_ejb_jar" depends="copy_webapp">
        <jar jarfile="${dist}\ear\ejb.jar"
            basedir="${sourceDir}\deployment"
            includes="com\**"
        >
            <fileset dir="${sourceDir}\deployment"
                includes="META-INF\"
            />		  
        </jar>
    </target>
        
<!--
    <target name="ejbc" depends="build_ejb_jar">
        <ejbjar 
            descriptordir="${output_com}/META-INF"
            srcdir="${output_com}"
            destdir="${output_com}/Ear"
            basejarname="ejb_mkt"
            genericjarsuffix=".jar"
            classpath="${output_com}/com">
            <weblogic 
                destdir="${output_com}/Ear" 
                classpath="${libDir};${output_com}"
                compiler="javac -nowarn"
                keepgeneric="false"
                keepgenerated="false"
                newCMP="true"
                noEJBC="false">
            </weblogic>
            <include name="**/ejb-jar.xml"/>
            <exclude name="**/weblogic*.xml"/>
        </ejbjar>
    </target>
-->
    
    <target name="weblogic_ejbc" depends="build_ejb_jar">
        <java classname="weblogic.ejbc20" 
            classpath="${libDir};D:\Java\jdk1.3.1\bin"
            fork="true">
            <arg value="D:\Development\Build\Marketing\Deployment\Ear\ejb.jar" />
            <arg value="D:\Development\Build\Marketing\Deployment\Ear\ejb_mkt.jar" />
        </java>
        <delete file="${output_com}\Ear\ejb.jar" />                
    </target>

    <target name="build_war" depends="weblogic_ejbc">
        <war warfile="${dist}\Ear\mkt.war" 
            webxml="${sourceDir}\Deployment\WebApp\Web-inf\web.xml"
        >
            <fileset dir="${sourceDir}\deployment\WebApp"/>
        </war>
    </target>	

    <target name="build_ear" depends="build_war">
        <jar jarfile="${dist}\mkt.ear"
            basedir="${dist}\Ear\"
        />
    </target>
    
<!--
    <target name="build_ear" depends="build_war">
        <ear earfile="${dist}\mkt.ear"
            appxml="${output_com}\Ear\META-INF\application.xml"
            basedir="${dist}\Ear\"
        />
    </target>	
-->

    <target name="copy_ear" depends="build_ear">
        <copy todir="${deploymentDir}">
        <fileset dir="${dist}">
            <include name="mkt.ear"/>
        </fileset>
        </copy>
    </target>		

    <target name="ftp_ear" depends="build_ear">
        <ftp server="jas1"
                     remotedir="${ftp_dir}"
                     userid="${ftp_user}"
                     password="${ftp_pass}"
                     binary="yes"
        >
            <fileset dir="${dist}">
                <include name="mkt.ear"/>
            </fileset>
        </ftp>
    </target>		

</project>	

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to