
Created - 7/2008
-------------
1. Jar the classess and descriptor file ( uniquebuildnumber.jar )
    \com\bearingpoint\acs\*.class etc
    \META-INF\build-server-plugin.xml
    In Eclipse, right click jar.jardesc, choose Create JAR, that will create uniquebuildnumber.jar 

2.Install on the server by dropping the jar into the 
   \TeamCity\webapps\ROOT\WEB-INF\lib
  directory 

3. Restart the server and the plugin should be loaded automatically
  The stdout_xxx.log should have entry similar to this, once the TeamCity server is started 
  *** UniqueBuildnumber adding listener=com.bearingpoint.acs.UniqueBuildNumber@ca8f43

4. Configure each project for the unique plugin, the plugin will examine each build number and 
  only replace the build / compile number for those marked unique.  Example 1.5.0.{unique}
  
  



Below is the email template / email-config.xml which is used by the EmailMsgInjector plugin
found in this directory 
C:\Documents and Settings\<username>\.BuildServer\config

ref: http://www.jetbrains.net/confluence/display/TCD3/TeamCity+Data+Directory
----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE email SYSTEM "email-config.dtd">

<email email-server="172.24.133.114" email-server-port="25" email-from="teamcity@bearingpoint.com" useSSL="false">
  <events>
    <event type="build_started">
      <ref template="build_started_tpl" />
    </event>
    <event type="build_failed">
      <ref template="build_failed_tpl" />
    </event>
    <event type="build_failing">
      <ref template="build_failing_tpl" />
    </event>
    <event type="build_probably_hanging">
      <ref template="build_probably_hanging_tpl" />
    </event>
    <event type="build_successful">
      <ref template="build_successful_tpl" />
    </event>
    <event type="responsible_changed">
      <ref template="responsible_changed_tpl" />
    </event>
  </events>
  <templates>
    <template id="build_started_tpl">
      <subject>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} started.</subject>
      <body>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} started.

Build info={EMAIL_MSG_INJECTION}

Build results: {BUILD_RESULTS_LINK}

{CHANGES}

============================================================================
Configure email notifications: {EDIT_NOTIFICATIONS_LINK}</body>
    </template>
    <template id="build_failing_tpl">
      <subject>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} failing {SHORT_STATUS_DESCRIPTION}</subject>
      <body>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} failing {SHORT_STATUS_DESCRIPTION}
Agent: {AGENT_NAME}

Build info={EMAIL_MSG_INJECTION}

Build results: {BUILD_RESULTS_LINK}

{COMPILATION_ERRORS}{FAILED_TESTS_ERRORS}{CHANGES}

============================================================================
Configure email notifications: {EDIT_NOTIFICATIONS_LINK}</body>
    </template>
    <template id="build_probably_hanging_tpl">
      <subject>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} is probably hanging {SHORT_STATUS_DESCRIPTION}</subject>
      <body>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} is probably hanging {SHORT_STATUS_DESCRIPTION}
Estimated duration: {BUILD_DURATION_ESTIMATE}, overtime: {BUILD_DURATION_OVERTIME}
Last message was received on: {BUILD_LAST_MESSAGE_TIMESTAMP} ({BUILD_TIME_SINCE_LAST_MESSAGE} ago)
Agent: {AGENT_NAME}

Build info={EMAIL_MSG_INJECTION}

Build results: {BUILD_RESULTS_LINK}

{CHANGES}

============================================================================
Configure email notifications: {EDIT_NOTIFICATIONS_LINK}</body>
    </template>
    <template id="build_failed_tpl">
      <subject>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} failed {SHORT_STATUS_DESCRIPTION}</subject>
      <body>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} failed {SHORT_STATUS_DESCRIPTION}
Agent: {AGENT_NAME}

Build info={EMAIL_MSG_INJECTION}

Build results: {BUILD_RESULTS_LINK}

{COMPILATION_ERRORS}{FAILED_TESTS_ERRORS}{CHANGES}

============================================================================
Configure email notifications: {EDIT_NOTIFICATIONS_LINK}</body>
    </template>
    <template id="build_successful_tpl">
      <subject>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} successful {SHORT_STATUS_DESCRIPTION}</subject>
      <body>Build {PROJECT_NAME}::{BUILD_CONFIG_NAME} {BUILD_NUMBER} successful {SHORT_STATUS_DESCRIPTION}
Build info={EMAIL_MSG_INJECTION}
Build results: {BUILD_RESULTS_LINK}

{COMPILATION_ERRORS}{FAILED_TESTS_ERRORS}{CHANGES}

============================================================================
Configure email notifications: {EDIT_NOTIFICATIONS_LINK}</body>
    </template>
    <template id="responsible_changed_tpl">
      <subject>Responsible for {PROJECT_NAME}::{BUILD_CONFIG_NAME} failure has been changed.</subject>
      <body>Responsible for {PROJECT_NAME}::{BUILD_CONFIG_NAME} failure has been changed.
Current responsible: {RESPONSIBLE}

Build info={EMAIL_MSG_INJECTION}

============================================================================
Configure email notifications: {EDIT_NOTIFICATIONS_LINK}</body>
    </template>
  </templates>
</email>

