Home | History | Annotate | Download | only in scripts_rss
      1 <?xml version="1.0"?>
      2 
      3 <project name="Create Feed, Add Entry, Update Entry, Read Entry" default="doAll">
      4 
      5 	<taskdef name="CreateFeed" classname="org.eclipse.releng.generators.rss.RSSFeedCreateFeedTask" classpath="../feedTools.jar"/>
      6 	<taskdef name="AddEntry" classname="org.eclipse.releng.generators.rss.RSSFeedAddEntryTask" classpath="../feedTools.jar"/>
      7 	<taskdef name="GetProperty" classname="org.eclipse.releng.generators.rss.RSSFeedGetPropertyTask" classpath="../feedTools.jar"/>
      8 	<taskdef name="UpdateEntry" classname="org.eclipse.releng.generators.rss.RSSFeedUpdateEntryTask" classpath="../feedTools.jar"/>
      9 
     10 	<target name="doAll">
     11 		<antcall target="addEntry"/>
     12 		<antcall target="getProperties"/>
     13 		<antcall target="updateFeed"/>
     14 	</target>
     15 
     16 	<target name="init">
     17 		<!-- 1. Define property file -->
     18 
     19 		<property file="../properties/feedPublish.eclipse.properties"/>		
     20 		<!--
     21 			<property file="../properties/feedPublish.emf.properties"/>		
     22 			<property file="../properties/feedPublish.uml2.properties"/>		
     23 		-->
     24 	</target>
     25 	
     26 	<target name="create" depends="init">
     27 		<!-- 2. Create feed (overwrite existing) -->
     28 
     29 		<CreateFeed 
     30 			debug="${debug}" 
     31 			project="${project}" 
     32 			file="${file}" 
     33 			feedURL="${feedURL}"/>
     34 		
     35 	</target>
     36 		
     37 	<target name="addEntry" depends="init">
     38 		<!-- 3. Add an entry (and create the feed if it doesn't already exist) -->
     39 
     40 		<!-- note: if not providing a buildType, must specify buildID to generate value -->
     41 		<AddEntry 
     42 			debug="${debug}" 
     43 			file="${file}" 
     44 
     45 			project="${project}"
     46 			version="${version}"
     47 			branch="${branch}"
     48 			buildID="${buildID}"
     49 			buildType="${buildType}"
     50 			feedURL="${feedURL}"
     51 			buildURL="${buildURL}"
     52 
     53 			buildAlias="${buildAlias}"
     54 			
     55 			buildDetailURL="${buildDetailURL}"
     56 			buildConfigURL="${buildConfigURL}"
     57 			buildLogURL="${buildLogURL}"
     58 			buildMapURL="${buildMapURL}"
     59 			
     60 			dependencyURLs="${dependencyURLs}"
     61 			releases="${Releases}"
     62 			
     63 			releaseNotesURL="${releaseNotesURL}"
     64 			updateManagerURL="${updateManagerURL}"
     65 			downloadsURL="${downloadsURL}"
     66 			jarSigningStatus="${jarSigningStatus}"
     67 			coordinatedstatus="${coordinatedStatus}"
     68 			
     69 			JUnitTestURL="${JUnitTestURL}"
     70 			performanceTestURL="${performanceTestURL}"
     71 			APITestURL="${APITestURL}"
     72 			JUnitTestResults="${JUnitTestResults}"
     73 			performanceTestResults="${performanceTestResults}"
     74 			APITestResults="${APITestResults}"
     75 		/>
     76 		
     77 	</target>
     78 		
     79 	<target name="getProperties" depends="init">
     80 		<!-- 4. Display a text or attribute value (ie., get a property) -->
     81 
     82 		<!-- on the feed itself, display modified date -->
     83 		<GetProperty 
     84 			debug="${debug}" 
     85 			file="${file}"
     86 			xpath="/*[name() = 'feed']/*[name() = 'updated']/text()"
     87 		/>
     88 
     89 		<!-- on the first entry, display the modified date -->
     90 		<GetProperty 
     91 			debug="${debug}" 
     92 			file="${file}"
     93 			xpath="/*/*[name() = 'entry'][1]/*[name() = 'updated']/text()"
     94 		/>
     95 
     96 		<!-- on the first entry, display the build's folder, filename, and type -->
     97 		<GetProperty 
     98 			file="${file}"
     99 			xpath="/*/*[name() = 'entry'][1]/*/*[name() = 'build']/@href"
    100 		/>
    101 		<GetProperty 
    102 			file="${file}"
    103 			xpath="/*/*[name() = 'entry'][1]/*/*[name() = 'build']/*[name() = 'releases']/*[@os = 'linux'][@ws = 'gtk'][@type = 'SDK']/text()"
    104 		/>
    105 		<GetProperty 
    106 			file="${file}"
    107 			xpath="/*/*[name() = 'entry'][1]/*/*[name() = 'build']/@type"
    108 		/>
    109 
    110 	</target>
    111 		
    112 	<target name="updateFeed" depends="init">
    113 		<!-- 5. Update an existing entry by changing a property value to something else -->
    114 		
    115 		<!-- on the first entry, change the coordinated status to COMPLETE -->
    116 		<UpdateEntry 
    117 			file="${file}"
    118 			xpath="/*/*[name() = 'entry'][1]/*/*/*[name() = 'coordinated']/@status"
    119 			replacement="COMPLETE"
    120 		/>
    121 		<!-- on the first entry, change the performance results (os-ws = RHEL4-3GHz-2.5GB-gtk) to PENDING -->
    122 		<UpdateEntry 
    123 			file="${file}"
    124 			xpath="/*/*[name() = 'entry'][1]/*/*/*/*[@type = 'performance']/*[name() = 'result'][@id = 'RHEL4-3GHz-2.5GB']/text()"
    125 			replacement="PENDING"
    126 		/>
    127 
    128 	</target>
    129 	
    130 </project>
    131