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.
Hi,
I am trying to figure out how to zero-pad build number, so far I've tried couple of things and nothing seems to work. I use:
${var["iterationPart"].increaseAsInt()}
where 'iterationPart=000'
QuickBuild of coarse sets build number to 1 instead of 001. Is there anyway to zero-pad version number?
Thanks in advance,
-Igor
-
replies
9
-
views
4151
-
stars
0
-
Set the next build version like below:
${#version=var["iterator"].increaseAsInt(),system.format("%03d", #version)}
Regards.
Robin
Hi Robin,
Thank you for a quick response. I tried to read through OGNL.org guide, but wasn't able to figure this out. Is there any good OGNL tutorial or reference guide?
Thanks,
-Igor
Hi Robin,
Unfortunately your solution doesn't work, here is an output:
2008-08-12 10:20:36,654 [Thread-46] ERROR - Failed to trigger configuration.
java.lang.RuntimeException: ognl.MethodFailedException: Method "format" failed for object com.pmease.quickbuild.util.System@89f7c8 [java.lang.NoSuchMethodException: format(java.lang.String, java.lang.Integer)]
at com.pmease.quickbuild.model.Configuration.evaluateStringExpression(Configuration.java:851)
at com.pmease.quickbuild.model.Configuration.getVersionForNewBuild(Configuration.java:920)
at com.pmease.quickbuild.model.Configuration.trigger(Configuration.java:972)
at com.pmease.quickbuild.triggeringinstance.ManualTriggeringInstance.execute(ManualTriggeringInstance.java:41)
at com.pmease.quickbuild.model.Queue$BuildRunner.run(Queue.java:221)
at java.lang.Thread.run(Thread.java:613)
Caused by: ognl.MethodFailedException: Method "format" failed for object com.pmease.quickbuild.util.System@89f7c8 [java.lang.NoSuchMethodException: format(java.lang.String, java.lang.Integer)]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:796)
at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:61)
at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:819)
at ognl.ASTMethod.getValueBody(ASTMethod.java:75)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTChain.getValueBody(ASTChain.java:109)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.ASTSequence.getValueBody(ASTSequence.java:57)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)
at com.pmease.quickbuild.model.Configuration.evaluateStringExpression(Configuration.java:848)
... 5 more
It is strange, the same expression works well at my side. Are you running the latest QuickBuild version? And what 's your OS and JDK version?
For OGNL grammer reference, the ognl.org is the definitive source. And for object graph reference (for example how can I know I should call "system.format" to format my strings...), you will need refer to QuickBuild's JavaDoc. Please refer to below url for detailed instructions on how to examine the JavaDoc to get object paths:
http://www.pmease.com/public/docs/guide/apa.html
Regards.
Robin
Hi Robin,
I have QuickBuild 1.0.3 (Trial Version) and JDK 1.5.0_13-b05-237 running on OS X 10.5.
Thanks,
-Igor
Please upgrade to latest version of QuickBuild and it should works.
Regards.
Robin
Hi Robin,
Downloaded 1.2.13, extracted to my home dir, ran startup.sh. Looks like I app isn't running properly because I get:
HTTP Status 404 - /
type Status report
message /
description The requested resource (/) is not available.
Apache Tomcat/5.0.28
I went to catalina.out file and here is what I see:
Aug 15, 2008 2:24:11 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 15, 2008 2:24:11 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 480 ms
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Aug 15, 2008 2:24:12 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webdav from URL file:/Users/isarkiso/quickbuild-1.2.13/tomcat/webapps/webdav
Aug 15, 2008 2:24:12 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 15, 2008 2:24:12 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Aug 15, 2008 2:24:12 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=1/12 config=/Users/isarkiso/quickbuild-1.2.13/tomcat/conf/jk2.properties
Aug 15, 2008 2:24:12 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 517 ms
Can you check other log files (such as various localhost_*.txt) in directory "/Users/isarkiso/quickbuild-1.2.13/tomcat/logs"? It should contain some detailed information about the error.
One common reason about the error is that you are running QuickBuild 1.2.13 with JDK1.4
Regards.
Robin
Sorry that the build I mentioned earlier only works with JDK1.6. Please download below build in order to work with JDK1.5:
http://quickbuild.pmease.com/publish/23 ... 1.2.13.zip
Regards.
Robin