troubleshooting Question

Filterset begintoken

Avatar of Mickeys
MickeysFlag for Sweden asked on
Editors IDEs
6 Comments1 Solution914 ViewsLast Modified:
I am trying to use filterset. I have managed to do it in one way but when I try to do it in a diffent way it wont work. It has to do with that the filterset cant be empty. How can I make this work?

So this is the situations.
1. Hudson builds with build.xml file
2. Hudson puts in all info from version.template to (this works fine)
3. sync_to_clearcase.xml is running but it wont change the label gal.version.hudson.clearcase.tag=No tag. No sync yet.

So this is where it goes wrong
<filterset begintoken="No tag" endtoken="yet.">

What should I write so it finds the NO tag. No sync yet and exchange it?
<target name="compile_after_ext">
	        <echo>Substituting values in</echo>
	                <format property="build_tstamp" pattern="yyyy-MM-dd,HH:mm:ss" />

	        <property environment="env" />
	        <property name="env.JOB_NAME" value="Not built from Hudson" />
	        <property name="env.BUILD_ID" value="Not built from Hudson - ${build_tstamp}" />
	        <property name="env.BUILD_TAG" value="Not built from Hudson - no tag" />
	        <property name="env.SVN_BRANCH" value="SVN_BRANCH was not specified" />
	        <property name="env.BUILD_NUMBER" value="Not built from Hudson - ${build_tstamp}" />
	        <property name="env.HUDSON_BUILD" value="Not built from Hudson" />
	        <property name="env.CLEARCASE_TAG" value="Not built from Hudson" /> 
	        <property name="env.VERSION_TAG" value="" /> 

	        <copy file="resources/version/" toFile="resources/version/" overwrite="true" >
	            <filterset begintoken="$${" endtoken="}">
	                <filter token="" value="${env.JOB_NAME}"/>
	                <filter token="" value="${env.BUILD_ID}"/>
	                <filter token="" value="${env.BUILD_TAG}"/>
	                <filter token="hudson.svn.branch" value="${env.SVN_BRANCH}"/>
	                <filter token="" value="${env.BUILD_NUMBER}"/>
	                <filter token="hudson.subversion.tag" value="trunk-V2-${env.BUILD_NUMBER}-${env.BUILD_ID}"/>    
	                <filter token="hudson.clearcase.tag" value="No tag. No sync yet."/>   
	                <filter token="hudson.version.tag" value=""/>           

--------------------------------------- built from Hudson - 2009-12-04,13:57:40
gal.version.number=Not built from Hudson - 2009-12-04,13:57:40
gal.version.tag=SVN_BRANCH was not specified-Not built from Hudson - 2009-12-04,13:57:40 built from Hudson
gal.version.hudson.clearcase.tag=No tag. No sync yet.


<target name="start5" >
		<property name="subversion.tag" value="P_trunk_${env.BUILD_ID}" /> 
		<echo>Substituting values in for P view in clearcase</echo>
  	<property environment="env" />        
 		 <copy file="../../resources/version/" toFile="../../Dresources/version/" overwrite="true" >
  			<filterset begintoken="No tag" endtoken="yet.">
  					<filter token="No tag. No sync yet." value="P_trunk_${env.BUILD_ID}"/>              
 		 <move file="../../Dresources/version/" toFile="../../resources/version/" overwrite="true" />
		<antcall target="do-the-stuff"/>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros