Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

QB/LB Builder OGNL expressions #988

brichard ·
Hi,

QB 2.X is brand new to me (I used to work with 1.X). Will the same OGNL expressions work with 2.X (ex: ${build.formattedStartDate}, ${build.cloverHtmlReportDir})?

If so, I am looking for a complete list of builder/general OGNL expressions.

When I visit the old links I used to reference: http://www.ognl.org I have no luck.

Thank you in advance...
  • replies 3
  • views 1309
  • stars 0
robinshen ADMIN ·
Equivalent for ${build.formattedStartDate} in 2.x is ${util.formateDate(build.beginDate)}. For ${build.cloverHtmlReportDir}, I guess you are using it to publish clover html reports in your builder. If so, just add a html publish step in 2.x to get your clover html files published, and ${build.cloverHtmlReportDir} is no longer necessary. This also holds true for other publishing, such as JUnit, NCover, NUnit and Artifacts publishing.
Complete reference for 2.x scripting can be accessed by pointing mouse to the help icon when you edit a property, and click the scripting link.
brichard ·
To elaborate, I would have an ANT builder that executes a cmbuild.xml file and passes Build Properties to it. these build properties are dynamically created via the OGNL expressions and the xml file will read in these params and process accordingly.

In 1.X I would set these as the build props. Would this still work properly?

Builder type Ant
Path to Ant executable ${workingDir}/checkouts/sourceCode/cm/build/ant.${vars.get("platformShellFileExt")}
Build script path sourceCode/cm/build/cmbuild.xml
Build targets build
Build properties:
cm.settings.junit.directory=${build.junitHtmlReportDir}
cm.settings.clover.directory=${build.cloverHtmlReportDir}
cm.settings.label=${build.version}
robinshen ADMIN ·
Path to Ant executable ${workingDir}/checkouts/sourceCode/cm/build/ant.${vars.get("platformShellFileExt")}
>> QB 2.x by default uses Ant in system path. However you may edit setting of Ant plugin (Administration/Plugin Management) to specify the path as:
${configuration.workspaceDir.absolutePath}/sourceCode/cm/build/ant.${vars.get("platformShellFileExt")}
Build script path sourceCode/cm/build/cmbuild.xml
>> Remains the same
Build targets build
>> Remains the same
Build properties:
cm.settings.junit.directory=${build.junitHtmlReportDir}
>> You no longer need to pass this property. Instead, publish JUnit report using JUnit report publish step and it will reveal much more information than the default html report. Refer here for details: http://wiki.pmease.com/display/QB21/Pub ... nit+Report
cm.settings.clover.directory=${build.cloverHtmlReportDir}
>> You no longer need to pass this property. Instead, publish Clover html report using html report publish step. Refer here for details: http://wiki.pmease.com/display/QB21/Pub ... ML+Reports
cm.settings.label=${build.version}
>> Remains the same