TC 6.5.2 - build.number passed to maven runner with ???_


Here is the relevant portion of the log file, the build number format is set to %maven.project.version%_{0}.  When the build runs, maven sees ???_nn and fails to build the artifact. As can be seen, the agent passes the wrong build number.  I upgraded to 6.5.2 to see if that solves the problem.  That did not help.  Has anyone seen this problem and how can I solve this?

Thanks,
Rajesh

[21:46:46]: Publishing internal artifacts
[21:46:46]:  [Publishing internal artifacts] Sending build.start.properties file
[21:46:47]: ##teamcity[buildNumber '1.4.0_89']
[21:46:47]: Using watcher: D:\opt\tools\TeamCity\buildAgent\Node3\plugins\mavenPlugin\maven-watcher\maven-watcher-agent.jar
[21:46:47]: M2_HOME = d:\opt\tools\apache-maven-2.2.1
[21:46:47]: Initial MAVEN_OPTS not set
[21:46:47]: Current MAVEN_OPTS not set
[21:46:47]: PATH = d:\opt\tools\apache-maven-2.2.1\bin;C:\Program Files\System Center Operations Manager 2007\
[21:46:48]: Starting: D:\opt\Java\jdk1.6.0_25\bin\java.exe -Dagent.home.dir=D:\opt\tools\TeamCity\buildAgent\Node3 -Dagent.ownPort=9092 -Dagent.work.dir=D:\var\opt\tools\TeamCity\buildAgent\Node3\work -Dbuild.number=???_89
...
-Dteamcity.tests.recentlyFailedTests.file=D:\var\opt\tools\TeamCity\buildAgent\Node3\temp\buildTmp\testsToRunFirst2706831548598131057.txt "-Dteamcity.version=6.5.2 (build 17935)" -Duser.country=US -Duser.home=C:\ -Duser.language=en -Duser.name=SYSTEM -Duser.timezone=America/New_York -Duser.variant= -javaagent:D:\opt\tools\TeamCity\buildAgent\Node3\plugins\mavenPlugin\maven-watcher\maven-watcher-agent.jar -classpath d:\opt\tools\apache-maven-2.2.1\boot\classworlds-1.1.jar; org.codehaus.classworlds.Launcher -f D:\var\opt\tools\TeamCity\buildAgent\Node3\work\6b64ad985375192b\pom.xml -B -e -X clean validate assembly:assembly
[21:46:48]: in directory: D:\var\opt\tools\TeamCity\buildAgent\Node3\work\6b64ad985375192b
[21:46:56]: + Error stacktraces are turned on.

12 comments
Comment actions Permalink

Hi Rajesh

I've filed this issue as TW-17709. Please watch for its updates.

Thanks

0
Comment actions Permalink

Rajesh,

Seems, it worked this way in previous TeamCity versions too, did it?

BTW, Can you pleae describe how you use the build number in the build?

0
Comment actions Permalink

Thanks for the update. We use maven.project.version in three places.  
1. The build.number in teamcity so that it shows the correct version number of the app it is building together with the build counter
2. Use it in version cotrol to let teamcity tag successful builds in svn
3. and inside the pom file to generate the assembly with the specific build counter as well stamp a file with the same info

Since the build counter is not exposed, I've to use the build.number in the pom file to get the version + build.counter string.  This technique worked until 6.0, the only caveat being teamcity will display ??? for the version it was building and replace it to the correct version when the build was completed. Not sure what changed between 6.0 and 6.5 of teamcity, now the agent is passing ???_{build.counter} as the value while the log shows that the value was actually changed by emitting ##teamcity[build...] string

Please let me know if you need anything else.

Looking at the ticket, this patch is slated for 7.0.  Would you know the timeline for 7.0?

Thanks,
Rajesh

0
Comment actions Permalink

A little correction.  In the previous versions, the %maven.project.version% string would be passed as is and the build would succeed.  The artifact generated will have an ugly name with the string %maven...% embedded.  In the new version of teamcity, the %mav...% string is replaced by ???_ . When maven tries to use this in a file name it fails (as in windows ? are illegal in a file name). To your point, the technique never worked for us, but the build did not break in the old version. Now the build is not finishing.  As a workaround, we removed the %maven...% from the build.number format field.

0
Comment actions Permalink

Hi Rajesh,

7.0 is targeted at the beginning of 2012.
I'll try to fix it earlier in 6.5.x. Whether 6.5.3 will be issued and when depends on the number of critical fixes in this branch. If this particular problem is critical for you, then when the issue is fixed I can give you a patch which you will be able to apply over the existing TeamCity installation, so you won't have to wait for the official release.
0
Comment actions Permalink

Hi Sergey,
Thanks for the update. We were planning to use the number to link the built artifact with the tagged version in SVN and in teamcity (required for auditing purposes).  So, if you can give us a patch, I would greatly appreciate it.

Thanks for all your help,
Rajesh

0
Comment actions Permalink

Rajesh, please watch for TW-17709 issue to get notifications on its updates.

Thanks

0
Comment actions Permalink

Michael,
Great support. Thanks for the update.  I see that the issue is marked as fixed.  Is there a patch I could download for this? If not what is the timeline for 6.5.3 to be released?

Thanks,
Rajesh

0
Comment actions Permalink
Hi Rajesh,
6.5.3 should be coming soon. No specific date yet, but it's a matter of a couple of weeks, I suppose.
Nevertheless, I'll attach the updated maven plugin to the issue today.
0
Comment actions Permalink
Rajesh,
TC 6.5.3 is going to be released on the next week. Can you wait or you still need the patch?
0
Comment actions Permalink

Sergey,
If 6.5.3 is coming next week, I will wait.

Thanks,
Rajesh

0
Comment actions Permalink

Sergey,
Thanks for the quick turnaround, downloaded 6.5.3 and the builds are good.

Rajesh

0

Please sign in to leave a comment.